mercurial/templatekw.py
changeset 36513 6ad140dc4269
parent 36501 169ac2bb3c9c
child 36514 7b74afec6772
equal deleted inserted replaced
36512:d697e39f61a6 36513:6ad140dc4269
   526 
   526 
   527 @templatekeyword('graphnode')
   527 @templatekeyword('graphnode')
   528 def showgraphnode(repo, ctx, **args):
   528 def showgraphnode(repo, ctx, **args):
   529     """String. The character representing the changeset node in an ASCII
   529     """String. The character representing the changeset node in an ASCII
   530     revision graph."""
   530     revision graph."""
       
   531     return getgraphnode(repo, ctx)
       
   532 
       
   533 def getgraphnode(repo, ctx):
   531     wpnodes = repo.dirstate.parents()
   534     wpnodes = repo.dirstate.parents()
   532     if wpnodes[1] == nullid:
   535     if wpnodes[1] == nullid:
   533         wpnodes = wpnodes[:1]
   536         wpnodes = wpnodes[:1]
   534     if ctx.node() in wpnodes:
   537     if ctx.node() in wpnodes:
   535         return '@'
   538         return '@'