# HG changeset patch # User Siddharth Agarwal # Date 1409762815 -7200 # Node ID 4a9057b16f407a6d5be713bfb6a92c540934c6c8 # Parent 86efc570f41d84e07820c56ecd7087c80e299747 git_handler: rename mapfile to map_file for PEP8 compat diff -r 86efc570f41d -r 4a9057b16f40 hggit/__init__.py --- a/hggit/__init__.py Wed Sep 03 18:45:18 2014 +0200 +++ b/hggit/__init__.py Wed Sep 03 18:46:55 2014 +0200 @@ -162,11 +162,11 @@ def git_cleanup(ui, repo): '''clean up Git commit map after history editing''' new_map = [] - for line in repo.opener(GitHandler.mapfile): + for line in repo.opener(GitHandler.map_file): gitsha, hgsha = line.strip().split(' ', 1) if hgsha in repo: new_map.append('%s %s\n' % (gitsha, hgsha)) - f = repo.opener(GitHandler.mapfile, 'wb') + f = repo.opener(GitHandler.map_file, 'wb') map(f.write, new_map) ui.status(_('git commit map cleaned\n')) diff -r 86efc570f41d -r 4a9057b16f40 hggit/git_handler.py --- a/hggit/git_handler.py Wed Sep 03 18:45:18 2014 +0200 +++ b/hggit/git_handler.py Wed Sep 03 18:46:55 2014 +0200 @@ -92,7 +92,7 @@ self.ui.note(msg + '\n') class GitHandler(object): - mapfile = 'git-mapfile' + map_file = 'git-mapfile' tagsfile = 'git-tags' def __init__(self, dest_repo, ui): @@ -168,7 +168,7 @@ self._map_hg_real[hgsha] = gitsha def save_map(self): - file = self.repo.opener(self.mapfile, 'w+', atomictemp=True) + file = self.repo.opener(self.map_file, 'w+', atomictemp=True) for hgsha, gitsha in sorted(self._map_hg.iteritems()): file.write("%s %s\n" % (gitsha, hgsha)) # If this complains, atomictempfile no longer has close @@ -318,7 +318,7 @@ return ret def clear(self): - mapfile = self.repo.join(self.mapfile) + mapfile = self.repo.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: