changeset 41950:e7b84ffb06d9

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
author Ian Moody <moz-ian@perix.co.uk>
date Sat, 09 Mar 2019 00:44:26 +0000
parents e1ceefab9bca
children 42dd69985778
files hgext/phabricator.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/phabricator.py	Thu Mar 14 14:46:29 2019 -0700
+++ b/hgext/phabricator.py	Sat Mar 09 00:44:26 2019 +0000
@@ -675,7 +675,7 @@
     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)