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

login
register
mail settings
Submitter phabricator
Date Nov. 11, 2019, 1:27 p.m.
Message ID <6a417fd1d827781fbc75e03fa94ed8af@localhost.localdomain>
Download mbox | patch
Permalink /patch/43119/
State Not Applicable
Headers show

Comments

phabricator - Nov. 11, 2019, 1:27 p.m.
Closed by commit rHGbf87f5ff2ebf: py3: avoid `b&#039;%s&#039; % type(...)` in a ProgrammingError (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7363?vs=17794&id=18015

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7363/new/

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

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)