D7363: py3: avoid `b'%s' % type(...)` in a ProgrammingError

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Nov 8 18:21:14 UTC 2019


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

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1568,7 +1568,7 @@
             else:
                 raise error.ProgrammingError(
                     b"unsupported changeid '%s' of type %s"
-                    % (changeid, type(changeid))
+                    % (changeid, pycompat.sysstr(type(changeid)))
                 )
 
             return context.changectx(self, rev, node)



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


More information about the Mercurial-devel mailing list