# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-02-28 16:33:47 # Node ID 5a029f04985435d243d9d26926a7a633dbedf2fe # Parent 14d2371216ba1871e101de8f934808fa31110a79 py3: make sure we open the file in bytes mode This makes the test pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2507 diff --git a/tests/test-revlog-ancestry.py b/tests/test-revlog-ancestry.py --- a/tests/test-revlog-ancestry.py +++ b/tests/test-revlog-ancestry.py @@ -15,7 +15,7 @@ def commit(text, time): repo.commit(text=text, date=b"%d 0" % time) def addcommit(name, time): - f = open(name, 'w') + f = open(name, 'wb') f.write(b'%s\n' % name) f.close() repo[None].add([name])