mercurial/graphmod.py
changeset 49284 d44e3c45f0e4
parent 48946 642e31cb55f0
child 51686 493034cc3265
equal deleted inserted replaced
49283:44b26349127b 49284:d44e3c45f0e4
    20 
    20 
    21 from .node import nullrev
    21 from .node import nullrev
    22 from .thirdparty import attr
    22 from .thirdparty import attr
    23 from . import (
    23 from . import (
    24     dagop,
    24     dagop,
    25     pycompat,
       
    26     smartset,
    25     smartset,
    27     util,
    26     util,
    28 )
    27 )
    29 
    28 
    30 CHANGESET = b'C'
    29 CHANGESET = b'C'
   461     )
   460     )
   462 
   461 
   463     # shift_interline is the line containing the non-vertical
   462     # shift_interline is the line containing the non-vertical
   464     # edges between this entry and the next
   463     # edges between this entry and the next
   465     shift_interline = echars[: idx * 2]
   464     shift_interline = echars[: idx * 2]
   466     for i in pycompat.xrange(2 + coldiff):
   465     for i in range(2 + coldiff):
   467         shift_interline.append(b' ')
   466         shift_interline.append(b' ')
   468     count = ncols - idx - 1
   467     count = ncols - idx - 1
   469     if coldiff == -1:
   468     if coldiff == -1:
   470         for i in pycompat.xrange(count):
   469         for i in range(count):
   471             shift_interline.extend([b'/', b' '])
   470             shift_interline.extend([b'/', b' '])
   472     elif coldiff == 0:
   471     elif coldiff == 0:
   473         shift_interline.extend(echars[(idx + 1) * 2 : ncols * 2])
   472         shift_interline.extend(echars[(idx + 1) * 2 : ncols * 2])
   474     else:
   473     else:
   475         for i in pycompat.xrange(count):
   474         for i in range(count):
   476             shift_interline.extend([b'\\', b' '])
   475             shift_interline.extend([b'\\', b' '])
   477 
   476 
   478     # draw edges from the current node to its parents
   477     # draw edges from the current node to its parents
   479     _drawedges(echars, edges, nodeline, shift_interline)
   478     _drawedges(echars, edges, nodeline, shift_interline)
   480 
   479