# HG changeset patch # User Durham Goode <durham@fb.com> # Date 1494365608 25200 # Tue May 09 14:33:28 2017 -0700 # Node ID 715cbf3fa24cea90baec3b9c6f4736640ae4360e # Parent 63d23880098dcbb703a1651a631dc0dfe45e1eed 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. diff --git a/hggit/__init__.py b/hggit/__init__.py --- 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 diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- 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('#'):