changeset 41261:1198c86beb73

fastannotate: fix isinstance checks to be against bytes instead of str Differential Revision: https://phab.mercurial-scm.org/D5611
author Augie Fackler <augie@google.com>
date Wed, 16 Jan 2019 11:55:01 -0500
parents c146651a78e1
children e40b7a504b1d
files hgext/fastannotate/context.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/fastannotate/context.py	Wed Jan 16 11:33:43 2019 -0500
+++ b/hgext/fastannotate/context.py	Wed Jan 16 11:55:01 2019 -0500
@@ -602,7 +602,7 @@
         the best case, the user provides a node and we don't need to read the
         filelog or construct any filecontext.
         """
-        if isinstance(f, str):
+        if isinstance(f, bytes):
             hsh = f
         else:
             hsh = f.node()
@@ -625,7 +625,7 @@
         if showpath:
             result = self._addpathtoresult(result)
         if showlines:
-            if isinstance(f, str): # f: node or fctx
+            if isinstance(f, bytes): # f: node or fctx
                 llrev = self.revmap.hsh2rev(f)
                 fctx = self._resolvefctx(f, self.revmap.rev2path(llrev))
             else: