changeset 36793:e2c0c0884b1f

py3: make test-commit-multiple.t byte-safe
author Yuya Nishihara <yuya@tcha.org>
date Sun, 04 Mar 2018 18:41:09 -0500
parents e3732c3ab92d
children ed46d48453e8
files contrib/python3-whitelist tests/test-commit-multiple.t
diffstat 2 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Sun Mar 04 18:34:46 2018 -0500
+++ b/contrib/python3-whitelist	Sun Mar 04 18:41:09 2018 -0500
@@ -46,6 +46,7 @@
 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
--- a/tests/test-commit-multiple.t	Sun Mar 04 18:34:46 2018 -0500
+++ b/tests/test-commit-multiple.t	Sun Mar 04 18:41:09 2018 -0500
@@ -90,23 +90,25 @@
   >     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()