Mercurial > hg > hg-git
changeset 1019:715cbf3fa24c
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.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 09 May 2017 14:33:28 -0700 |
parents | 63d23880098d |
children | d356f8479295 |
files | hggit/__init__.py hggit/git_handler.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -210,7 +210,7 @@ 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
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -106,7 +106,7 @@ 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 @@ 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('#'):