# HG changeset patch # User Augie Fackler # Date 1519966708 18000 # Node ID d85ef895d5f6044d75b5827e4c4fe623f62ce04f # Parent cfd0c1df5e333ea2e47b507d72aeefe67b1cdd50 verify: fix exception formatting bug in Python 3 Differential Revision: https://phab.mercurial-scm.org/D2541 diff -r cfd0c1df5e33 -r d85ef895d5f6 mercurial/verify.py --- a/mercurial/verify.py Fri Mar 02 13:50:31 2018 -0500 +++ b/mercurial/verify.py Thu Mar 01 23:58:28 2018 -0500 @@ -70,9 +70,10 @@ self.errors += 1 def exc(self, linkrev, msg, inst, filename=None): - if not str(inst): - inst = repr(inst) - self.err(linkrev, "%s: %s" % (msg, inst), filename) + fmsg = pycompat.bytestr(inst) + if not fmsg: + fmsg = pycompat.byterepr(inst) + self.err(linkrev, "%s: %s" % (msg, fmsg), filename) def checklog(self, obj, name, linkrev): if not len(obj) and (self.havecl or self.havemf):