hgext3rd/topic/stack.py
changeset 4436 ef155f624670
parent 4435 7915aef191ff
child 4474 931c8f6f4b1b
equal deleted inserted replaced
4435:7915aef191ff 4436:ef155f624670
   319     # super crude initial version
   319     # super crude initial version
   320     for idx, isentry, ctx in entries[::-1]:
   320     for idx, isentry, ctx in entries[::-1]:
   321 
   321 
   322         symbol = None
   322         symbol = None
   323         states = []
   323         states = []
   324         iscurrentrevision = repo.revs('%d and parents()', ctx.rev())
       
   325         if opts.get('children'):
   324         if opts.get('children'):
   326             expr = 'children(%d) and merge() - %ld'
   325             expr = 'children(%d) and merge() - %ld'
   327             revisions = repo.revs(expr, ctx.rev(), st.revs[1:])
   326             revisions = repo.revs(expr, ctx.rev(), st.revs[1:])
   328             if len(revisions) > 0:
   327             if len(revisions) > 0:
   329                 states.append('external-children')
   328                 states.append('external-children')
   330 
   329 
       
   330         if ctx.orphan():
       
   331             symbol = '$'
       
   332             states.append('orphan')
       
   333 
       
   334         if ctx.contentdivergent():
       
   335             symbol = '$'
       
   336             states.append('content divergent')
       
   337 
       
   338         if ctx.phasedivergent():
       
   339             symbol = '$'
       
   340             states.append('phase divergent')
       
   341 
       
   342         iscurrentrevision = repo.revs('%d and parents()', ctx.rev())
   331         if iscurrentrevision:
   343         if iscurrentrevision:
   332             symbol = '@'
   344             symbol = '@'
   333             states.append('current')
   345             states.append('current')
   334 
       
   335         if ctx.orphan():
       
   336             symbol = '$'
       
   337             states.append('orphan')
       
   338 
       
   339         if ctx.contentdivergent():
       
   340             symbol = '$'
       
   341             states.append('content divergent')
       
   342 
       
   343         if ctx.phasedivergent():
       
   344             symbol = '$'
       
   345             states.append('phase divergent')
       
   346 
   346 
   347         if not isentry:
   347         if not isentry:
   348             symbol = '^'
   348             symbol = '^'
   349             # "base" is kind of a "ghost" entry
   349             # "base" is kind of a "ghost" entry
   350             states.append('base')
   350             states.append('base')