vfs: stop using repo.join/wjoin

Mercurial 4.3 has completelu dropped the join and wjoin functions. Let's use the
appropriate repo.vfs.join and repo.wvfs.join functions instead.

I ran the tests against each version of Mercurial from 2.8 to 4.2. Things
before 2.8 seem to already be broken for unrelated reasons.
This commit is contained in:
Durham Goode 2017-05-09 14:33:28 -07:00
parent 74c113f44d
commit 7ddcbbea43
2 changed files with 3 additions and 3 deletions

View File

@ -210,7 +210,7 @@ def reposetup(ui, repo):
if (getattr(dirstate, 'rootcache', False) and
(not ignoremod or getattr(ignore, 'readpats', False)) and
hgutil.safehasattr(repo, 'join') and
hgutil.safehasattr(repo, 'vfs') and
os.path.exists(repo.vfs.join('git'))):
# only install our dirstate wrapper if it has a hope of working
import gitdirstate

View File

@ -106,7 +106,7 @@ class GitHandler(object):
self.ui = ui
if ui.configbool('git', 'intree'):
self.gitdir = self.repo.wjoin('.git')
self.gitdir = self.repo.wvfs.join('.git')
else:
self.gitdir = self.repo.vfs.join('git')
@ -159,7 +159,7 @@ class GitHandler(object):
def init_author_file(self):
self.author_map = {}
if self.ui.config('git', 'authors'):
with open(self.repo.wjoin(self.ui.config('git', 'authors'))) as f:
with open(self.repo.wvfs.join(self.ui.config('git', 'authors'))) as f:
for line in f:
line = line.strip()
if not line or line.startswith('#'):