D7538: pvec: fix a `str` type conditional for py3

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Mon Dec 2 21:55:54 UTC 2019


Closed by commit rHG10662ac7849e: pvec: fix a `str` type conditional for py3 (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7538?vs=18414&id=18431

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

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

AFFECTED FILES
  mercurial/pvec.py

CHANGE DETAILS

diff --git a/mercurial/pvec.py b/mercurial/pvec.py
--- a/mercurial/pvec.py
+++ b/mercurial/pvec.py
@@ -182,7 +182,7 @@
 
 class pvec(object):
     def __init__(self, hashorctx):
-        if isinstance(hashorctx, str):
+        if isinstance(hashorctx, bytes):
             self._bs = hashorctx
             self._depth, self._vec = _split(util.b85decode(hashorctx))
         else:



To: mharbison72, #hg-reviewers, dlax, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list