[PATCH 3 of 4] py3: make test-commit-multiple.t byte-safe
Yuya Nishihara
yuya at tcha.org
Tue Mar 6 07:54:48 EST 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1520206869 18000
# Sun Mar 04 18:41:09 2018 -0500
# Node ID e121d58f97b1cb94d3a45972bbfb7cf9f477d3cf
# Parent db161596cd95de9da2ac0fc4b2496ac295f63672
py3: make test-commit-multiple.t byte-safe
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -46,6 +46,7 @@ test-clone-r.t
test-clone-update-order.t
test-command-template.t
test-commit-amend.t
+test-commit-multiple.t
test-commit-unresolved.t
test-commit.t
test-committer.t
diff --git a/tests/test-commit-multiple.t b/tests/test-commit-multiple.t
--- a/tests/test-commit-multiple.t
+++ b/tests/test-commit-multiple.t
@@ -90,23 +90,25 @@ now test that we fixed the bug for all s
> f.close()
>
> def printfiles(repo, rev):
- > print("revision %s files: %s" % (rev, repo[rev].files()))
+ > repo.ui.status(b"revision %d files: [%s]\n"
+ > % (rev, b', '.join(b"'%s'" % f
+ > for f in repo[rev].files())))
>
- > repo = hg.repository(ui.ui.load(), '.')
+ > repo = hg.repository(ui.ui.load(), b'.')
> assert len(repo) == 6, \
> "initial: len(repo): %d, expected: 6" % len(repo)
>
- > replacebyte("bugfix", "u")
+ > replacebyte(b"bugfix", b"u")
> sleep(2)
> try:
- > print("PRE: len(repo): %d" % len(repo))
+ > repo.ui.status(b"PRE: len(repo): %d\n" % len(repo))
> wlock = repo.wlock()
> lock = repo.lock()
- > replacebyte("file1", "x")
- > repo.commit(text="x", user="test", date=(0, 0))
- > replacebyte("file1", "y")
- > repo.commit(text="y", user="test", date=(0, 0))
- > print("POST: len(repo): %d" % len(repo))
+ > replacebyte(b"file1", b"x")
+ > repo.commit(text=b"x", user=b"test", date=(0, 0))
+ > replacebyte(b"file1", b"y")
+ > repo.commit(text=b"y", user=b"test", date=(0, 0))
+ > repo.ui.status(b"POST: len(repo): %d\n" % len(repo))
> finally:
> lock.release()
> wlock.release()
More information about the Mercurial-devel
mailing list