D4246: beautifygraph: use slicing instead of subscripting on bytestr

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Aug 10 08:25:55 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGde3a9d7ec1c2: beautifygraph: use slicing instead of subscripting on bytestr (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4246?vs=10280&id=10299

REVISION DETAIL
  https://phab.mercurial-scm.org/D4246

AFFECTED FILES
  hgext/beautifygraph.py

CHANGE DETAILS

diff --git a/hgext/beautifygraph.py b/hgext/beautifygraph.py
--- a/hgext/beautifygraph.py
+++ b/hgext/beautifygraph.py
@@ -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):



To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list