Mercurial > hg > hg-git
diff hggit/git_handler.py @ 1014:7835460756d4
repo: update repo.join to be repo.vfs.join
Upstream has deprecated repo.join in favor of repo.vfs.join, so let's update to
match them. Old hg should have repo.vfs.join so I don't think this breaks
backwards compatibility.
author | Durham Goode <durham@fb.com> |
---|---|
date | Wed, 15 Mar 2017 13:37:02 -0700 |
parents | a4f4f861fc5e |
children | 715cbf3fa24c |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -108,7 +108,7 @@ if ui.configbool('git', 'intree'): self.gitdir = self.repo.wjoin('.git') else: - self.gitdir = self.repo.join('git') + self.gitdir = self.repo.vfs.join('git') self.init_author_file() @@ -182,7 +182,7 @@ def load_map(self): map_git_real = {} map_hg_real = {} - if os.path.exists(self.repo.join(self.map_file)): + if os.path.exists(self.repo.vfs.join(self.map_file)): for line in self.repo.vfs(self.map_file): # format is <40 hex digits> <40 hex digits>\n if len(line) != 82: @@ -210,7 +210,7 @@ def load_tags(self): self.tags = {} - if os.path.exists(self.repo.join(self.tags_file)): + if os.path.exists(self.repo.vfs.join(self.tags_file)): for line in self.repo.vfs(self.tags_file): sha, name = line.strip().split(' ', 1) self.tags[name] = sha @@ -402,7 +402,7 @@ return ret def clear(self): - mapfile = self.repo.join(self.map_file) + mapfile = self.repo.vfs.join(self.map_file) if os.path.exists(self.gitdir): for root, dirs, files in os.walk(self.gitdir, topdown=False): for name in files: