# HG changeset patch # User FUJIWARA Katsunori # Date 1436457591 -32400 # 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 -r 5471965af5cb -r de654a83fe1c mercurial/subrepo.py --- a/mercurial/subrepo.py Fri Jul 10 00:59:51 2015 +0900 +++ b/mercurial/subrepo.py Fri Jul 10 00:59:51 2015 +0900 @@ -1206,7 +1206,8 @@ 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