Patchwork D2358: convert: don't use type as a variable name

login
register
mail settings
Submitter phabricator
Date Feb. 20, 2018, 1:34 p.m.
Message ID <e93328f21aecca228486ab0cea776c1f@localhost.localdomain>
Download mbox | patch
Permalink /patch/28172/
State Not Applicable
Headers show

Comments

phabricator - Feb. 20, 2018, 1:34 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGaefb75730ea3: convert: don&#039;t use type as a variable name (authored by pulkit, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2358?vs=5926&id=5935#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2358?vs=5926&id=5935

REVISION DETAIL
  https://phab.mercurial-scm.org/D2358

AFFECTED FILES
  hgext/convert/git.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/hgext/convert/git.py b/hgext/convert/git.py
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -168,19 +168,19 @@ 
                     raise error.Abort(_('cannot retrieve git head "%s"') % rev)
         return heads
 
-    def catfile(self, rev, type):
+    def catfile(self, rev, ftype):
         if rev == nodemod.nullhex:
             raise IOError
         self.catfilepipe[0].write(rev+'\n')
         self.catfilepipe[0].flush()
         info = self.catfilepipe[1].readline().split()
-        if info[1] != type:
-            raise error.Abort(_('cannot read %r object at %s') % (type, rev))
+        if info[1] != ftype:
+            raise error.Abort(_('cannot read %r object at %s') % (ftype, rev))
         size = int(info[2])
         data = self.catfilepipe[1].read(size)
         if len(data) < size:
             raise error.Abort(_('cannot read %r object at %s: unexpected size')
-                             % (type, rev))
+                              % (ftype, rev))
         # read the trailing newline
         self.catfilepipe[1].read(1)
         return data