This revision was automatically updated to reflect the committed changes.
Closed by commit rHG34e850440271: py3: slice over bytes to prevent getting
ascii values (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2256?vs=5696=5712
REVISION DETAIL
https://phab.mercurial-scm.org/D2256
AFFECTED FILES
mercurial/graphmod.py
mercurial/hgweb/webutil.py
CHANGE DETAILS
diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -619,7 +619,7 @@
websubdefs += repo.ui.configitems('interhg')
for key, pattern in websubdefs:
# grab the delimiter from the character after the "s"
-unesc = pattern[1]
+unesc = pattern[1:2]
delim = re.escape(unesc)
# identify portions of the pattern, taking care to avoid escaped
diff --git a/mercurial/graphmod.py b/mercurial/graphmod.py
--- a/mercurial/graphmod.py
+++ b/mercurial/graphmod.py
@@ -454,16 +454,16 @@
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:
return True
num = int(char[:-1])
# 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())
To: pulkit, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel