mercurial/dagparser.py
changeset 16683 525fdb738975
parent 12387 4f8067c94729
child 17500 8ac8db8dc346
equal deleted inserted replaced
16676:654b9e1966f7 16683:525fdb738975
   266             i = 0
   266             i = 0
   267             while c != '\0' and i < 10:
   267             while c != '\0' and i < 10:
   268                 s += c
   268                 s += c
   269                 i += 1
   269                 i += 1
   270                 c = nextch()
   270                 c = nextch()
   271             raise util.Abort(_("invalid character in dag description: %s...") % s)
   271             raise util.Abort(_('invalid character in dag description: '
       
   272                                '%s...') % s)
   272 
   273 
   273 def dagtextlines(events,
   274 def dagtextlines(events,
   274                  addspaces=True,
   275                  addspaces=True,
   275                  wraplabels=False,
   276                  wraplabels=False,
   276                  wrapannotations=False,
   277                  wrapannotations=False,
   434     Annotations:
   435     Annotations:
   435 
   436 
   436         >>> dagtext([('n', (0, [-1])), ('a', 'ann'), ('n', (1, [0]))])
   437         >>> dagtext([('n', (0, [-1])), ('a', 'ann'), ('n', (1, [0]))])
   437         '+1 @ann +1'
   438         '+1 @ann +1'
   438 
   439 
   439         >>> dagtext([('n', (0, [-1])), ('a', 'my annotation'), ('n', (1, [0]))])
   440         >>> dagtext([('n', (0, [-1])),
       
   441         ...          ('a', 'my annotation'),
       
   442         ...          ('n', (1, [0]))])
   440         '+1 @"my annotation" +1'
   443         '+1 @"my annotation" +1'
   441 
   444 
   442     Commands:
   445     Commands:
   443 
   446 
   444         >>> dagtext([('n', (0, [-1])), ('c', 'cmd'), ('n', (1, [0]))])
   447         >>> dagtext([('n', (0, [-1])), ('c', 'cmd'), ('n', (1, [0]))])
   445         '+1 !cmd +1'
   448         '+1 !cmd +1'
   446 
   449 
   447         >>> dagtext([('n', (0, [-1])), ('c', 'my command'), ('n', (1, [0]))])
   450         >>> dagtext([('n', (0, [-1])), ('c', 'my command'), ('n', (1, [0]))])
   448         '+1 !"my command" +1'
   451         '+1 !"my command" +1'
   449 
   452 
   450         >>> dagtext([('n', (0, [-1])), ('C', 'my command line'), ('n', (1, [0]))])
   453         >>> dagtext([('n', (0, [-1])),
       
   454         ...          ('C', 'my command line'),
       
   455         ...          ('n', (1, [0]))])
   451         '+1 !!my command line\\n+1'
   456         '+1 !!my command line\\n+1'
   452 
   457 
   453     Comments:
   458     Comments:
   454 
   459 
   455         >>> dagtext([('n', (0, [-1])), ('#', ' comment'), ('n', (1, [0]))])
   460         >>> dagtext([('n', (0, [-1])), ('#', ' comment'), ('n', (1, [0]))])