# HG changeset patch # User Ian Moody # Date 2019-03-09 00:44:26 # Node ID e7b84ffb06d982f3467b4240c41adff836ab36d1 # Parent e1ceefab9bcad1bb472e261d73a5e3fda74fdf18 py3: use pycompat.iterbytestr to convert memoryview slice to bytestring Otherwise ch is the int value of the byte in py3 rather than the actual character. Differential Revision: https://phab.mercurial-scm.org/D6103 diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -675,7 +675,7 @@ def _tokenize(text): length = len(text) while pos < length: symbol = b''.join(itertools.takewhile(lambda ch: ch not in special, - view[pos:])) + pycompat.iterbytestr(view[pos:]))) if symbol: yield (b'symbol', symbol, pos) pos += len(symbol)