diff --git a/hggit/__init__.py b/hggit/__init__.py index 438b2fc587011d4680d8b28c9151bd346c7f97e5_aGdnaXQvX19pbml0X18ucHk=..a4f4f861fc5e70c2582e6ec1335fb92378b54311_aGdnaXQvX19pbml0X18ucHk= 100644 --- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -262,7 +262,7 @@ def git_cleanup(ui, repo): '''clean up Git commit map after history editing''' new_map = [] - for line in repo.opener(GitHandler.map_file): + for line in repo.vfs(GitHandler.map_file): gitsha, hgsha = line.strip().split(' ', 1) if hgsha in repo: new_map.append('%s %s\n' % (gitsha, hgsha)) @@ -266,7 +266,7 @@ gitsha, hgsha = line.strip().split(' ', 1) if hgsha in repo: new_map.append('%s %s\n' % (gitsha, hgsha)) - f = repo.opener(GitHandler.map_file, 'wb') + f = repo.vfs(GitHandler.map_file, 'wb') map(f.write, new_map) ui.status(_('git commit map cleaned\n')) diff --git a/hggit/git_handler.py b/hggit/git_handler.py index 438b2fc587011d4680d8b28c9151bd346c7f97e5_aGdnaXQvZ2l0X2hhbmRsZXIucHk=..a4f4f861fc5e70c2582e6ec1335fb92378b54311_aGdnaXQvZ2l0X2hhbmRsZXIucHk= 100644 --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -183,7 +183,7 @@ map_git_real = {} map_hg_real = {} if os.path.exists(self.repo.join(self.map_file)): - for line in self.repo.opener(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: raise ValueError( @@ -197,7 +197,7 @@ self._map_hg_real = map_hg_real def save_map(self, map_file): - file = self.repo.opener(map_file, 'w+', atomictemp=True) + file = self.repo.vfs(map_file, 'w+', atomictemp=True) map_hg = self._map_hg buf = cStringIO.StringIO() bwrite = buf.write @@ -211,8 +211,8 @@ def load_tags(self): self.tags = {} if os.path.exists(self.repo.join(self.tags_file)): - for line in self.repo.opener(self.tags_file): + for line in self.repo.vfs(self.tags_file): sha, name = line.strip().split(' ', 1) self.tags[name] = sha def save_tags(self): @@ -215,8 +215,8 @@ sha, name = line.strip().split(' ', 1) self.tags[name] = sha def save_tags(self): - file = self.repo.opener(self.tags_file, 'w+', atomictemp=True) + file = self.repo.vfs(self.tags_file, 'w+', atomictemp=True) for name, sha in sorted(self.tags.iteritems()): if not self.repo.tagtype(name) == 'global': file.write("%s %s\n" % (sha, name))