Mercurial > hg
changeset 24695:419528cb05b6
subrepo: convert the os.path references in git to vfs
There are a handful of os.path references in the free functions at the top of
the module that will be trickier to remove.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 07 Feb 2015 12:57:40 -0500 |
parents | f282db2834f9 |
children | 553dc2b094d9 |
files | mercurial/subrepo.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/subrepo.py Sat Apr 11 00:47:09 2015 +0900 +++ b/mercurial/subrepo.py Sat Feb 07 12:57:40 2015 -0500 @@ -1290,7 +1290,7 @@ return retdata, p.returncode def _gitmissing(self): - return not os.path.exists(os.path.join(self._abspath, '.git')) + return not self.wvfs.exists('.git') def _gitstate(self): return self._gitcommand(['rev-parse', 'HEAD']) @@ -1804,8 +1804,7 @@ bakname = "%s.orig" % name self.ui.note(_('saving current version of %s as %s\n') % (name, bakname)) - util.rename(os.path.join(self._abspath, name), - os.path.join(self._abspath, bakname)) + self.wvfs.rename(name, bakname) if not opts.get('dry_run'): self.get(substate, overwrite=True)