D2528: error: fix isinstnace check to use bytes instead of str

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Mar 1 19:32:57 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe28a7a07bb73: error: fix isinstnace check to use bytes instead of str (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2528?vs=6304&id=6309

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

AFFECTED FILES
  mercurial/error.py

CHANGE DETAILS

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -47,7 +47,7 @@
         # this can't be called 'message' because at least some installs of
         # Python 2.6+ complain about the 'message' property being deprecated
         self.lookupmessage = message
-        if isinstance(name, str) and len(name) == 20:
+        if isinstance(name, bytes) and len(name) == 20:
             from .node import short
             name = short(name)
         RevlogError.__init__(self, '%s@%s: %s' % (index, name, message))



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


More information about the Mercurial-devel mailing list