mercurial/graphmod.py
changeset 38783 e7aa113b14f7
parent 38150 24e517600b29
child 39286 3c4b2e880273
equal deleted inserted replaced
38782:7eba8f83129b 38783:e7aa113b14f7
    20 from __future__ import absolute_import
    20 from __future__ import absolute_import
    21 
    21 
    22 from .node import nullrev
    22 from .node import nullrev
    23 from . import (
    23 from . import (
    24     dagop,
    24     dagop,
       
    25     pycompat,
    25     smartset,
    26     smartset,
    26     util,
    27     util,
    27 )
    28 )
    28 
    29 
    29 CHANGESET = 'C'
    30 CHANGESET = 'C'
   424             state['lastcoldiff'], fix_nodeline_tail))
   425             state['lastcoldiff'], fix_nodeline_tail))
   425 
   426 
   426     # shift_interline is the line containing the non-vertical
   427     # shift_interline is the line containing the non-vertical
   427     # edges between this entry and the next
   428     # edges between this entry and the next
   428     shift_interline = echars[:idx * 2]
   429     shift_interline = echars[:idx * 2]
   429     for i in xrange(2 + coldiff):
   430     for i in pycompat.xrange(2 + coldiff):
   430         shift_interline.append(' ')
   431         shift_interline.append(' ')
   431     count = ncols - idx - 1
   432     count = ncols - idx - 1
   432     if coldiff == -1:
   433     if coldiff == -1:
   433         for i in xrange(count):
   434         for i in pycompat.xrange(count):
   434             shift_interline.extend(['/', ' '])
   435             shift_interline.extend(['/', ' '])
   435     elif coldiff == 0:
   436     elif coldiff == 0:
   436         shift_interline.extend(echars[(idx + 1) * 2:ncols * 2])
   437         shift_interline.extend(echars[(idx + 1) * 2:ncols * 2])
   437     else:
   438     else:
   438         for i in xrange(count):
   439         for i in pycompat.xrange(count):
   439             shift_interline.extend(['\\', ' '])
   440             shift_interline.extend(['\\', ' '])
   440 
   441 
   441     # draw edges from the current node to its parents
   442     # draw edges from the current node to its parents
   442     _drawedges(echars, edges, nodeline, shift_interline)
   443     _drawedges(echars, edges, nodeline, shift_interline)
   443 
   444