From 7ddcbbea432c85f92071a10774bfe098df63d0b9 Mon Sep 17 00:00:00 2001 From: Durham Goode Date: Tue, 9 May 2017 14:33:28 -0700 Subject: [PATCH] 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. --- hggit/__init__.py | 2 +- hggit/git_handler.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hggit/__init__.py b/hggit/__init__.py index a4b6cc5a64..ba7a398d5d 100644 --- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -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 diff --git a/hggit/git_handler.py b/hggit/git_handler.py index 84d814a0d4..d2ee45e302 100644 --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -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('#'):