D2541: verify: fix exception formatting bug in Python 3

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Mar 2 14:50:24 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/verify.py

CHANGE DETAILS

diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -70,8 +70,7 @@
         self.errors += 1
 
     def exc(self, linkrev, msg, inst, filename=None):
-        if not str(inst):
-            inst = repr(inst)
+        inst = util.forcebytestr(inst)
         self.err(linkrev, "%s: %s" % (msg, inst), filename)
 
     def checklog(self, obj, name, linkrev):



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


More information about the Mercurial-devel mailing list