py3: slice on bytes instead of indexing
Indexing returns the ascii value on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1793
--- 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