hgext3rd/evolve/templatekw.py
changeset 2926 1abafae41fe2
parent 2840 dfad30be866c
child 3003 ddf28837f5af
child 3042 93ea1d9d6ad3
child 3051 204a6947a920
equal deleted inserted replaced
2925:9efedcedd9dd 2926:1abafae41fe2
    26 ### template keywords
    26 ### template keywords
    27 # XXX it does not handle troubles well :-/
    27 # XXX it does not handle troubles well :-/
    28 
    28 
    29 @eh.templatekw('obsolete')
    29 @eh.templatekw('obsolete')
    30 def obsoletekw(repo, ctx, templ, **args):
    30 def obsoletekw(repo, ctx, templ, **args):
    31     """:obsolete: String. Whether the changeset is ``obsolete``.
    31     """String. Whether the changeset is ``obsolete``.
    32     """
    32     """
    33     if ctx.obsolete():
    33     if ctx.obsolete():
    34         return 'obsolete'
    34         return 'obsolete'
    35     return ''
    35     return ''
    36 
    36 
    37 @eh.templatekw('troubles')
    37 @eh.templatekw('troubles')
    38 def showtroubles(**args):
    38 def showtroubles(**args):
    39     """:troubles: List of strings. Evolution troubles affecting the changeset
    39     """List of strings. Evolution troubles affecting the changeset
    40     (zero or more of "unstable", "divergent" or "bumped")."""
    40     (zero or more of "unstable", "divergent" or "bumped")."""
    41     ctx = args['ctx']
    41     ctx = args['ctx']
    42     try:
    42     try:
    43         # specify plural= explicitly to trigger TypeError on hg < 4.2
    43         # specify plural= explicitly to trigger TypeError on hg < 4.2
    44         return templatekw.showlist('trouble', ctx.instabilities(), args,
    44         return templatekw.showlist('trouble', ctx.instabilities(), args,