Mercurial > hg-stable
changeset 35583:2f123f309f61
py3: slice on bytes instead of indexing
Indexing returns the ascii value on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1793
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 29 Dec 2017 05:27:00 +0530 |
parents | 72b91f905065 |
children | 6f62a1c3e11d |
files | mercurial/mdiff.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mdiff.py Fri Dec 29 05:25:27 2017 +0530 +++ b/mercurial/mdiff.py Fri Dec 29 05:27:00 2017 +0530 @@ -356,7 +356,7 @@ # the previous hunk context until we find a line starting with an # alphanumeric char. for i in xrange(astart - 1, lastpos - 1, -1): - if l1[i][0].isalnum(): + if l1[i][0:1].isalnum(): func = ' ' + l1[i].rstrip()[:40] lastfunc[1] = func break