##// END OF EJS Templates
subrepo: use vfs.readdir instead of os.listdir to avoid expensive stat calls...
FUJIWARA Katsunori -
r24688:897a0715 default
parent child Browse files
Show More
@@ -1632,11 +1632,11 b' class gitsubrepo(abstractsubrepo):'
1632 1632 # local-only history
1633 1633 self.ui.note(_('removing subrepo %s\n') % self._relpath)
1634 1634 self._gitcommand(['config', 'core.bare', 'true'])
1635 for f in os.listdir(self._abspath):
1635 for f, kind in self.wvfs.readdir():
1636 1636 if f == '.git':
1637 1637 continue
1638 1638 path = os.path.join(self._abspath, f)
1639 if os.path.isdir(path) and not os.path.islink(path):
1639 if kind == stat.S_IFDIR:
1640 1640 shutil.rmtree(path)
1641 1641 else:
1642 1642 os.remove(path)
General Comments 0
You need to be logged in to leave comments. Login now