# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1514505420 -19800 # Node ID 2f123f309f617ff70a0951a9e2f633dc312db287 # Parent 72b91f905065c366e3a2ce3dcb9bb24ffd66b109 py3: slice on bytes instead of indexing Indexing returns the ascii value on Python 3. Differential Revision: https://phab.mercurial-scm.org/D1793 diff -r 72b91f905065 -r 2f123f309f61 mercurial/mdiff.py --- 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