hgext/beautifygraph.py
changeset 49284 d44e3c45f0e4
parent 48875 6000f5b25c9b
child 50774 caa0a25f7243
equal deleted inserted replaced
49283:44b26349127b 49284:d44e3c45f0e4
    15 from mercurial.i18n import _
    15 from mercurial.i18n import _
    16 from mercurial import (
    16 from mercurial import (
    17     encoding,
    17     encoding,
    18     extensions,
    18     extensions,
    19     graphmod,
    19     graphmod,
    20     pycompat,
       
    21     templatekw,
    20     templatekw,
    22 )
    21 )
    23 
    22 
    24 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    23 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    25 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    24 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    51 
    50 
    52 
    51 
    53 def convertedges(line):
    52 def convertedges(line):
    54     line = b' %s ' % line
    53     line = b' %s ' % line
    55     pretty = []
    54     pretty = []
    56     for idx in pycompat.xrange(len(line) - 2):
    55     for idx in range(len(line) - 2):
    57         pretty.append(
    56         pretty.append(
    58             prettyedge(
    57             prettyedge(
    59                 line[idx : idx + 1],
    58                 line[idx : idx + 1],
    60                 line[idx + 1 : idx + 2],
    59                 line[idx + 1 : idx + 2],
    61                 line[idx + 2 : idx + 3],
    60                 line[idx + 2 : idx + 3],