D3522: tests: port test-filelog.py to Python 3
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu May 10 15:14:29 UTC 2018
durin42 created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
1. skip-blame just some bytes prefixes
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3522
AFFECTED FILES
contrib/python3-whitelist
tests/test-filelog.py
CHANGE DETAILS
diff --git a/tests/test-filelog.py b/tests/test-filelog.py
--- a/tests/test-filelog.py
+++ b/tests/test-filelog.py
@@ -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):
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -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
To: durin42, pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list