equal
deleted
inserted
replaced
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: |