mercurial/dagparser.py
changeset 34137 a8994d08e4a2
parent 34131 0fa781320203
child 34138 0f9936d80e01
equal deleted inserted replaced
34136:414a3513c2bd 34137:a8994d08e4a2
   153         >>> list(parsedag(b'+1 # comment\\n+1'))
   153         >>> list(parsedag(b'+1 # comment\\n+1'))
   154         [('n', (0, [-1])), ('n', (1, [0]))]
   154         [('n', (0, [-1])), ('n', (1, [0]))]
   155 
   155 
   156     Error:
   156     Error:
   157 
   157 
       
   158         >>> from . import pycompat
   158         >>> try: list(parsedag(b'+1 bad'))
   159         >>> try: list(parsedag(b'+1 bad'))
   159         ... except Exception, e: print(e)
   160         ... except Exception, e: print(pycompat.sysstr(bytes(e)))
   160         invalid character in dag description: bad...
   161         invalid character in dag description: bad...
   161 
   162 
   162     '''
   163     '''
   163     if not desc:
   164     if not desc:
   164         return
   165         return