diff -r 8fa2b5c85a46 -r 1978abdb216c mercurial/crecord.py --- 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: