Mercurial > hg
diff tests/test-filelog.py @ 37933:f71c97d9b97b
tests: port test-filelog.py to Python 3
# skip-blame just some bytes prefixes
Differential Revision: https://phab.mercurial-scm.org/D3522
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 27 Apr 2018 13:17:24 -0400 |
parents | d83ca854fa21 |
children | 2372284d9457 |
line wrap: on
line diff
--- 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):