diff hgext/relink.py @ 36424:4bc983568016

py3: replace file() with open() file() is not present in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2417
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 24 Feb 2018 16:07:45 +0530
parents 46ba2cdda476
children 9e2866065982
line wrap: on
line diff
--- a/hgext/relink.py	Sat Feb 24 16:06:21 2018 +0530
+++ b/hgext/relink.py	Sat Feb 24 16:07:45 2018 +0530
@@ -168,8 +168,8 @@
         source = os.path.join(src, f)
         tgt = os.path.join(dst, f)
         # Binary mode, so that read() works correctly, especially on Windows
-        sfp = file(source, 'rb')
-        dfp = file(tgt, 'rb')
+        sfp = open(source, 'rb')
+        dfp = open(tgt, 'rb')
         sin = sfp.read(CHUNKLEN)
         while sin:
             din = dfp.read(CHUNKLEN)