transaction: fix an error string with bytestr() on a repr()d value
authorAugie Fackler <augie@google.com>
Sun, 04 Mar 2018 16:11:15 -0500
changeset 36735 ef345f9e4295
parent 36734 b77ff4fbe9ad
child 36736 5c72b52d3dd0
transaction: fix an error string with bytestr() on a repr()d value Fixes test-rollback.t on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2674
contrib/python3-whitelist
mercurial/transaction.py
--- a/contrib/python3-whitelist	Sun Mar 04 16:23:10 2018 -0500
+++ b/contrib/python3-whitelist	Sun Mar 04 16:11:15 2018 -0500
@@ -347,6 +347,7 @@
 test-revlog-packentry.t
 test-revset-dirstate-parents.t
 test-revset-outgoing.t
+test-rollback.t
 test-run-tests.py
 test-schemes.t
 test-serve.t
--- a/mercurial/transaction.py	Sun Mar 04 16:23:10 2018 -0500
+++ b/mercurial/transaction.py	Sun Mar 04 16:11:15 2018 -0500
@@ -18,6 +18,7 @@
 from .i18n import _
 from . import (
     error,
+    pycompat,
     util,
 )
 
@@ -604,7 +605,8 @@
             f, o = l.split('\0')
             entries.append((f, int(o), None))
         except ValueError:
-            report(_("couldn't read journal entry %r!\n") % l)
+            report(
+                _("couldn't read journal entry %r!\n") % pycompat.bytestr(l))
 
     backupjournal = "%s.backupfiles" % file
     if opener.exists(backupjournal):