changeset 36735:ef345f9e4295

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
author Augie Fackler <augie@google.com>
date Sun, 04 Mar 2018 16:11:15 -0500
parents b77ff4fbe9ad
children 5c72b52d3dd0
files contrib/python3-whitelist mercurial/transaction.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):