Mercurial > hg
changeset 39054:de3a9d7ec1c2
beautifygraph: use slicing instead of subscripting on bytestr
Differential Revision: https://phab.mercurial-scm.org/D4246
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 10 Aug 2018 00:08:06 -0400 |
parents | 836433f3bdd6 |
children | dcecf772756a |
files | hgext/beautifygraph.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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):