Mercurial > public > mercurial-scm > hg-stable
diff mercurial/graphmod.py @ 36218:34e850440271
py3: slice over bytes to prevent getting ascii values
Differential Revision: https://phab.mercurial-scm.org/D2256
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 14 Feb 2018 15:43:03 +0530 |
parents | 5e1d4ccab455 |
children | 24e517600b29 |
line wrap: on
line diff
--- a/mercurial/graphmod.py Wed Feb 14 00:18:35 2018 -0500 +++ b/mercurial/graphmod.py Wed Feb 14 15:43:03 2018 +0530 @@ -454,7 +454,7 @@ if any(len(char) > 1 for char in edgemap.values()): # limit drawing an edge to the first or last N lines of the current # section the rest of the edge is drawn like a parent line. - parent = state['styles'][PARENT][-1] + parent = state['styles'][PARENT][-1:] def _drawgp(char, i): # should a grandparent character be drawn for this line? if len(char) < 2: @@ -463,7 +463,7 @@ # either skip first num lines or take last num lines, based on sign return -num <= i if num < 0 else (len(lines) - i) <= num for i, line in enumerate(lines): - line[:] = [c[-1] if _drawgp(c, i) else parent for c in line] + line[:] = [c[-1:] if _drawgp(c, i) else parent for c in line] edgemap.update( (e, (c if len(c) < 2 else parent)) for e, c in edgemap.items())