py3: replace file() with open() in transplant.py
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 14 Feb 2018 17:41:27 +0530
changeset 36189 2f309b8846cf
parent 36188 4e33aa8639d0
child 36190 7fda2a8ed24e
py3: replace file() with open() in transplant.py Differential Revision: https://phab.mercurial-scm.org/D2267
hgext/transplant.py
--- a/hgext/transplant.py	Wed Feb 14 17:40:51 2018 +0530
+++ b/hgext/transplant.py	Wed Feb 14 17:41:27 2018 +0530
@@ -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)