comparison mercurial/pvec.py @ 43746:10662ac7849e stable

pvec: fix a `str` type conditional for py3 Differential Revision: https://phab.mercurial-scm.org/D7538
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 30 Nov 2019 03:15:17 -0500
parents 4aa72cdf616f
children 29adf0a087a1
comparison
equal deleted inserted replaced
43745:24d0189238f1 43746:10662ac7849e
180 return pvec(util.b85encode(bs)) 180 return pvec(util.b85encode(bs))
181 181
182 182
183 class pvec(object): 183 class pvec(object):
184 def __init__(self, hashorctx): 184 def __init__(self, hashorctx):
185 if isinstance(hashorctx, str): 185 if isinstance(hashorctx, bytes):
186 self._bs = hashorctx 186 self._bs = hashorctx
187 self._depth, self._vec = _split(util.b85decode(hashorctx)) 187 self._depth, self._vec = _split(util.b85decode(hashorctx))
188 else: 188 else:
189 self._vec = ctxpvec(hashorctx) 189 self._vec = ctxpvec(hashorctx)
190 190