comparison mercurial/subrepo.py @ 20870:6500a2eebee8

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 01 Apr 2014 15:11:19 -0500
parents 308344d80fe5 9658a79968c6
children 70312c95f2f7
comparison
equal deleted inserted replaced
20864:9a75d2559cff 20870:6500a2eebee8
319 if os.path.basename(dirname).lower() != '.hg': 319 if os.path.basename(dirname).lower() != '.hg':
320 return 320 return
321 for f in names: 321 for f in names:
322 if f.lower() == 'hgrc': 322 if f.lower() == 'hgrc':
323 ui.warn( 323 ui.warn(
324 _("warning: removing potentially hostile .hg/hgrc in '%s'" 324 _("warning: removing potentially hostile .hg/hgrc in '%s'")
325 % path)) 325 % path)
326 os.unlink(os.path.join(dirname, f)) 326 os.unlink(os.path.join(dirname, f))
327 os.walk(path, v, None) 327 os.walk(path, v, None)
328 328
329 def subrepo(ctx, path): 329 def subrepo(ctx, path):
330 """return instance of the right subrepo class for subrepo in path""" 330 """return instance of the right subrepo class for subrepo in path"""
1009 1009
1010 @annotatesubrepoerror 1010 @annotatesubrepoerror
1011 def remove(self): 1011 def remove(self):
1012 if self.dirty(): 1012 if self.dirty():
1013 self._ui.warn(_('not removing repo %s because ' 1013 self._ui.warn(_('not removing repo %s because '
1014 'it has changes.\n' % self._path)) 1014 'it has changes.\n') % self._path)
1015 return 1015 return
1016 self._ui.note(_('removing subrepo %s\n') % self._path) 1016 self._ui.note(_('removing subrepo %s\n') % self._path)
1017 1017
1018 def onerror(function, path, excinfo): 1018 def onerror(function, path, excinfo):
1019 if function is not os.remove: 1019 if function is not os.remove: