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.
--- 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)