Submitter | Katsunori FUJIWARA |
---|---|
Date | April 10, 2015, 3:54 p.m. |
Message ID | <17c9d35176133223e448.1428681263@juju> |
Download | mbox | patch |
Permalink | /patch/8592/ |
State | Accepted |
Commit | 897a0715ee71a24af14416277aa7c0b28e75e82a |
Headers | show |
Comments
Patch
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -1632,11 +1632,11 @@ class gitsubrepo(abstractsubrepo): # 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)