# HG changeset patch # User Matt Harbison # Date 2015-02-07 17:57:40 # Node ID 419528cb05b6176c8685f1dba0de73aa78c833b0 # Parent f282db2834f9f67f71e708b982b774c7672a7eea 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. diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -1290,7 +1290,7 @@ class gitsubrepo(abstractsubrepo): 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 @@ class gitsubrepo(abstractsubrepo): 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)