beautifygraph: use slicing instead of subscripting on bytestr
Differential Revision: https://phab.mercurial-scm.org/D4246
--- a/hgext/beautifygraph.py Fri Aug 10 00:07:45 2018 -0400
+++ b/hgext/beautifygraph.py Fri Aug 10 00:08:06 2018 -0400
@@ -55,7 +55,9 @@
line = ' %s ' % line
pretty = []
for idx in pycompat.xrange(len(line) - 2):
- pretty.append(prettyedge(line[idx], line[idx + 1], line[idx + 2]))
+ pretty.append(prettyedge(line[idx:idx + 1],
+ line[idx + 1:idx + 2],
+ line[idx + 2:idx + 3]))
return ''.join(pretty)
def getprettygraphnode(orig, *args, **kwargs):