subrepo: use vfs.dirname instead of os.path.dirname
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 10 Jul 2015 00:59:51 +0900
changeset 25773 de654a83fe1c
parent 25772 5471965af5cb
child 25774 4f8c20fe66f0
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.
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