##// END OF EJS Templates
py3: use list of bytes rather than bytestring while extending bytes into lists...
Pulkit Goyal -
r32160:906da898 default
parent child Browse files
Show More
@@ -273,7 +273,7 b' def _getpaddingline(echars, idx, ncols, '
273 # | | | | | |
273 # | | | | | |
274 line.extend(echars[idx * 2:(idx + 1) * 2])
274 line.extend(echars[idx * 2:(idx + 1) * 2])
275 else:
275 else:
276 line.extend(' ')
276 line.extend([' ', ' '])
277 # all edges to the right of the current node
277 # all edges to the right of the current node
278 remainder = ncols - idx - 1
278 remainder = ncols - idx - 1
279 if remainder > 0:
279 if remainder > 0:
@@ -410,14 +410,17 b' def ascii(ui, state, type, char, text, c'
410 # shift_interline is the line containing the non-vertical
410 # shift_interline is the line containing the non-vertical
411 # edges between this entry and the next
411 # edges between this entry and the next
412 shift_interline = echars[:idx * 2]
412 shift_interline = echars[:idx * 2]
413 shift_interline.extend(' ' * (2 + coldiff))
413 for i in xrange(2 + coldiff):
414 shift_interline.append(' ')
414 count = ncols - idx - 1
415 count = ncols - idx - 1
415 if coldiff == -1:
416 if coldiff == -1:
416 shift_interline.extend('/ ' * count)
417 for i in xrange(count):
418 shift_interline.extend(['/', ' '])
417 elif coldiff == 0:
419 elif coldiff == 0:
418 shift_interline.extend(echars[(idx + 1) * 2:ncols * 2])
420 shift_interline.extend(echars[(idx + 1) * 2:ncols * 2])
419 else:
421 else:
420 shift_interline.extend(r'\ ' * count)
422 for i in xrange(count):
423 shift_interline.extend(['\\', ' '])
421
424
422 # draw edges from the current node to its parents
425 # draw edges from the current node to its parents
423 _drawedges(echars, edges, nodeline, shift_interline)
426 _drawedges(echars, edges, nodeline, shift_interline)
General Comments 0
You need to be logged in to leave comments. Login now