subrepo: use vfs.removedirs instead of os.removedirs
This patch also removes useless composing absolute path by "repo.wjoin()".
--- 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