Mercurial > hg
comparison mercurial/subrepo.py @ 25773:de654a83fe1c
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.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 10 Jul 2015 00:59:51 +0900 |
parents | a7178d8fe7ee |
children | 0ae07173881d |
comparison
equal
deleted
inserted
replaced
25772:5471965af5cb | 25773:de654a83fe1c |
---|---|
1204 return | 1204 return |
1205 self.ui.note(_('removing subrepo %s\n') % self._path) | 1205 self.ui.note(_('removing subrepo %s\n') % self._path) |
1206 | 1206 |
1207 self.wvfs.rmtree(forcibly=True) | 1207 self.wvfs.rmtree(forcibly=True) |
1208 try: | 1208 try: |
1209 self._ctx.repo().wvfs.removedirs(os.path.dirname(self._path)) | 1209 pwvfs = self._ctx.repo().wvfs |
1210 pwvfs.removedirs(pwvfs.dirname(self._path)) | |
1210 except OSError: | 1211 except OSError: |
1211 pass | 1212 pass |
1212 | 1213 |
1213 @annotatesubrepoerror | 1214 @annotatesubrepoerror |
1214 def get(self, state, overwrite=False): | 1215 def get(self, state, overwrite=False): |