# HG changeset patch # User Augie Fackler # Date 2019-01-16 16:55:01 # Node ID 1198c86beb736ff47d03957a7713bdd631fa1df4 # Parent c146651a78e12840902da95acef712c8fec48624 fastannotate: fix isinstance checks to be against bytes instead of str Differential Revision: https://phab.mercurial-scm.org/D5611 diff --git a/hgext/fastannotate/context.py b/hgext/fastannotate/context.py --- a/hgext/fastannotate/context.py +++ b/hgext/fastannotate/context.py @@ -602,7 +602,7 @@ class _annotatecontext(object): 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 @@ class _annotatecontext(object): 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: