mercurial/subrepo.py
changeset 24726 747748766421
parent 24724 95eb067b2b5e
child 24778 a48b65ab428d
--- a/mercurial/subrepo.py	Sat Apr 11 23:00:04 2015 +0900
+++ b/mercurial/subrepo.py	Sat Apr 11 23:00:04 2015 +0900
@@ -303,7 +303,7 @@
         raise util.Abort(_("default path for subrepository not found"))
 
 def _sanitize(ui, vfs, ignore):
-    for dirname, dirs, names in os.walk(vfs.base):
+    for dirname, dirs, names in vfs.walk():
         for i, d in enumerate(dirs):
             if d.lower() == ignore:
                 del dirs[i]
@@ -313,8 +313,8 @@
         for f in names:
             if f.lower() == 'hgrc':
                 ui.warn(_("warning: removing potentially hostile 'hgrc' "
-                          "in '%s'\n") % dirname)
-                os.unlink(os.path.join(dirname, f))
+                          "in '%s'\n") % vfs.join(dirname))
+                vfs.unlink(vfs.reljoin(dirname, f))
 
 def subrepo(ctx, path):
     """return instance of the right subrepo class for subrepo in path"""