changeset 769:4a9057b16f40

git_handler: rename mapfile to map_file for PEP8 compat
author Siddharth Agarwal <sid0@fb.com>
date Wed, 03 Sep 2014 18:46:55 +0200
parents 86efc570f41d
children 4b786698329c
files hggit/__init__.py hggit/git_handler.py
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/__init__.py
+++ b/hggit/__init__.py
@@ -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'))
 
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -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: