Patchwork D2674: transaction: fix an error string with bytestr() on a repr()d value

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 9:50 p.m.
Message ID <differential-rev-PHID-DREV-j625cfuphgaiqizizuk6-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29014/
State Superseded
Headers show

Comments

phabricator - March 4, 2018, 9:50 p.m.
durin42 created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Fixes test-rollback.t on Python 3.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2674

AFFECTED FILES
  contrib/python3-whitelist
  mercurial/transaction.py

CHANGE DETAILS




To: durin42, pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/transaction.py b/mercurial/transaction.py
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -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):
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -344,6 +344,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