hgext/beautifygraph.py
changeset 38783 e7aa113b14f7
parent 38340 9abe91a503da
child 39053 836433f3bdd6
equal deleted inserted replaced
38782:7eba8f83129b 38783:e7aa113b14f7
    16 from mercurial.i18n import _
    16 from mercurial.i18n import _
    17 from mercurial import (
    17 from mercurial import (
    18     encoding,
    18     encoding,
    19     extensions,
    19     extensions,
    20     graphmod,
    20     graphmod,
       
    21     pycompat,
    21     templatekw,
    22     templatekw,
    22 )
    23 )
    23 
    24 
    24 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    25 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    25 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    26 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    51     return edge
    52     return edge
    52 
    53 
    53 def convertedges(line):
    54 def convertedges(line):
    54     line = ' %s ' % line
    55     line = ' %s ' % line
    55     pretty = []
    56     pretty = []
    56     for idx in xrange(len(line) - 2):
    57     for idx in pycompat.xrange(len(line) - 2):
    57         pretty.append(prettyedge(line[idx], line[idx + 1], line[idx + 2]))
    58         pretty.append(prettyedge(line[idx], line[idx + 1], line[idx + 2]))
    58     return ''.join(pretty)
    59     return ''.join(pretty)
    59 
    60 
    60 def getprettygraphnode(orig, *args, **kwargs):
    61 def getprettygraphnode(orig, *args, **kwargs):
    61     node = orig(*args, **kwargs)
    62     node = orig(*args, **kwargs)