Patchwork D2267: py3: replace file() with open() in transplant.py

login
register
mail settings
Submitter phabricator
Date Feb. 14, 2018, 12:36 p.m.
Message ID <differential-rev-PHID-DREV-lubnrmbffbaok7kl5qwf-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27902/
State Superseded
Headers show

Comments

phabricator - Feb. 14, 2018, 12:36 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2267

AFFECTED FILES
  hgext/transplant.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -274,7 +274,7 @@ 
                                     },
                            onerr=error.Abort, errprefix=_('filter failed'),
                            blockedtag='transplant_filter')
-            user, date, msg = self.parselog(file(headerfile))[1:4]
+            user, date, msg = self.parselog(open(headerfile, 'rb'))[1:4]
         finally:
             os.unlink(headerfile)