diff hgext/convert/git.py @ 36365:aefb75730ea3

convert: don't use type as a variable name Differential Revision: https://phab.mercurial-scm.org/D2358
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Feb 2018 23:47:53 +0530
parents ab11af15a149
children ce566e0f73d0
line wrap: on
line diff
--- a/hgext/convert/git.py	Mon Feb 19 23:47:15 2018 +0530
+++ b/hgext/convert/git.py	Mon Feb 19 23:47:53 2018 +0530
@@ -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