mercurial/subrepo.py
changeset 24688 897a0715ee71
parent 24675 47e7d5fbbf04
child 24690 d1ddf1fe5d33
--- a/mercurial/subrepo.py	Fri Apr 10 08:05:50 2015 +0300
+++ b/mercurial/subrepo.py	Sat Apr 11 00:47:09 2015 +0900
@@ -1632,11 +1632,11 @@
         # local-only history
         self.ui.note(_('removing subrepo %s\n') % self._relpath)
         self._gitcommand(['config', 'core.bare', 'true'])
-        for f in os.listdir(self._abspath):
+        for f, kind in self.wvfs.readdir():
             if f == '.git':
                 continue
             path = os.path.join(self._abspath, f)
-            if os.path.isdir(path) and not os.path.islink(path):
+            if kind == stat.S_IFDIR:
                 shutil.rmtree(path)
             else:
                 os.remove(path)