changeset 35918:e35616bb6ede

py3: use open() instead of file() file() is not present in Python 3 Differential Revision: https://phab.mercurial-scm.org/D2044
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 05 Feb 2018 13:12:36 +0530
parents 3d8b0020f470
children 143d7b27b09c
files hgext/mq.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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('+++ '))):