Mercurial > public > mercurial-scm > hg-stable
diff hgext/fastannotate/protocol.py @ 41262:e40b7a504b1d
fastannotate: slice strings to get single character
Behaves identically on Python 3 and Python 2.
Differential Revision: https://phab.mercurial-scm.org/D5612
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 16 Jan 2019 11:55:49 -0500 |
parents | d8a7690ccc74 |
children | dfc73c803b77 |
line wrap: on
line diff
--- a/hgext/fastannotate/protocol.py Wed Jan 16 11:55:01 2019 -0500 +++ b/hgext/fastannotate/protocol.py Wed Jan 16 11:55:49 2019 -0500 @@ -98,7 +98,7 @@ state = 0 # 0: vfspath, 1: size vfspath = size = '' while i < l: - ch = payload[i] + ch = payload[i:i + 1] if ch == '\0': if state == 1: result[vfspath] = buffer(payload, i + 1, int(size))