diff hgext/rebase.py @ 36424:4bc983568016

py3: replace file() with open() file() is not present in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2417
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 24 Feb 2018 16:07:45 +0530
parents 238646784294
children 7b86aa31b004
line wrap: on
line diff
--- a/hgext/rebase.py	Sat Feb 24 16:06:21 2018 +0530
+++ b/hgext/rebase.py	Sat Feb 24 16:07:45 2018 +0530
@@ -1440,7 +1440,7 @@
 def isagitpatch(repo, patchname):
     'Return true if the given patch is in git format'
     mqpatch = os.path.join(repo.mq.path, patchname)
-    for line in patch.linereader(file(mqpatch, 'rb')):
+    for line in patch.linereader(open(mqpatch, 'rb')):
         if line.startswith('diff --git'):
             return True
     return False