changeset 24694:f282db2834f9

subrepo: use vfs.removedirs instead of os.removedirs This patch also removes useless composing absolute path by "repo.wjoin()".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 11 Apr 2015 00:47:09 +0900
parents 0d28b0df77ea
children 419528cb05b6
files mercurial/subrepo.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Sat Apr 11 00:47:09 2015 +0900
+++ b/mercurial/subrepo.py	Sat Apr 11 00:47:09 2015 +0900
@@ -1115,10 +1115,9 @@
             return
         self.ui.note(_('removing subrepo %s\n') % self._path)
 
-        path = self._ctx.repo().wjoin(self._path)
         self.wvfs.rmtree(forcibly=True)
         try:
-            os.removedirs(os.path.dirname(path))
+            self._ctx.repo().wvfs.removedirs(os.path.dirname(self._path))
         except OSError:
             pass