py3: use open() instead of file()
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 05 Feb 2018 13:12:36 +0530
changeset 35918 e35616bb6ede
parent 35917 3d8b0020f470
child 35919 143d7b27b09c
py3: use open() instead of file() file() is not present in Python 3 Differential Revision: https://phab.mercurial-scm.org/D2044
hgext/mq.py
--- a/hgext/mq.py	Mon Feb 05 13:12:01 2018 +0530
+++ b/hgext/mq.py	Mon Feb 05 13:12:36 2018 +0530
@@ -281,7 +281,7 @@
         nodeid = None
         diffstart = 0
 
-        for line in file(pf):
+        for line in open(pf, 'rb'):
             line = line.rstrip()
             if (line.startswith('diff --git')
                 or (diffstart and line.startswith('+++ '))):