# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-02-05 07:42:36 # Node ID e35616bb6ede1b75561e850c3f41ae5637cca2ba # Parent 3d8b0020f470e2de938aae3027f442f4cf9a5617 py3: use open() instead of file() file() is not present in Python 3 Differential Revision: https://phab.mercurial-scm.org/D2044 diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -281,7 +281,7 @@ class patchheader(object): 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('+++ '))):