# HG changeset patch # User Augie Fackler # Date 1524849444 14400 # Node ID f71c97d9b97b9983bdcf6b82d66beec7581bee3c # Parent bf6bb710b40f888470201d2b6fcdb1f510e9727e tests: port test-filelog.py to Python 3 # skip-blame just some bytes prefixes Differential Revision: https://phab.mercurial-scm.org/D3522 diff -r bf6bb710b40f -r f71c97d9b97b contrib/python3-whitelist --- a/contrib/python3-whitelist Fri Apr 27 13:15:16 2018 -0400 +++ b/contrib/python3-whitelist Fri Apr 27 13:17:24 2018 -0400 @@ -153,6 +153,7 @@ test-extra-filelog-entry.t test-filebranch.t test-filecache.py +test-filelog.py test-fileset-generated.t test-fix-topology.t test-flags.t diff -r bf6bb710b40f -r f71c97d9b97b tests/test-filelog.py --- a/tests/test-filelog.py Fri Apr 27 13:15:16 2018 -0400 +++ b/tests/test-filelog.py Fri Apr 27 13:17:24 2018 -0400 @@ -14,21 +14,21 @@ ) myui = uimod.ui.load() -repo = hg.repository(myui, path='.', create=True) +repo = hg.repository(myui, path=b'.', create=True) -fl = repo.file('foobar') +fl = repo.file(b'foobar') def addrev(text, renamed=False): if renamed: # data doesn't matter. Just make sure filelog.renamed() returns True - meta = {'copyrev': hex(nullid), 'copy': 'bar'} + meta = {b'copyrev': hex(nullid), b'copy': b'bar'} else: meta = {} lock = t = None try: lock = repo.lock() - t = repo.transaction('commit') + t = repo.transaction(b'commit') node = fl.add(text, meta, t, 0, nullid, nullid) return node finally: @@ -40,8 +40,8 @@ def error(text): print('ERROR: ' + text) -textwith = '\1\nfoo' -without = 'foo' +textwith = b'\1\nfoo' +without = b'foo' node = addrev(textwith) if not textwith == fl.read(node):