# HG changeset patch # User FUJIWARA Katsunori # Date 2015-07-09 15:59:51 # Node ID de654a83fe1c95949effe7e6e7598d60364d8b3a # Parent 5471965af5cb00700a3c8e7772e1888c5e55d069 subrepo: use vfs.dirname instead of os.path.dirname This patch uses "wvfs of the parent repository" ('pwvfs') instead of 'wvfs' of own repository, because 'self._path' is the path to this subrepository as seen from the parent repository. diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -1206,7 +1206,8 @@ class svnsubrepo(abstractsubrepo): self.wvfs.rmtree(forcibly=True) try: - self._ctx.repo().wvfs.removedirs(os.path.dirname(self._path)) + pwvfs = self._ctx.repo().wvfs + pwvfs.removedirs(pwvfs.dirname(self._path)) except OSError: pass