diff mercurial/crecord.py @ 38082:1978abdb216c

py3: make sure we open files in bytes mode we internally deal with bytes and should read files in bytes mode. Differential Revision: https://phab.mercurial-scm.org/D3606
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 19 May 2018 18:47:20 +0530
parents dabc2237963c
children 96871ca32270
line wrap: on
line diff
--- a/mercurial/crecord.py	Sat May 19 18:45:53 2018 +0530
+++ b/mercurial/crecord.py	Sat May 19 18:47:20 2018 +0530
@@ -554,7 +554,7 @@
     """
     chunkselector = curseschunkselector(headerlist, ui, operation)
     if testfn and os.path.exists(testfn):
-        testf = open(testfn)
+        testf = open(testfn, 'rb')
         testcommands = [x.rstrip('\n') for x in testf.readlines()]
         testf.close()
         while True: