diff hgext/evolve.py @ 1399:9ff6d9240f16 stable

template: add a troubles keyword This keyword list all evolution troubles that affect a changeset. Evolution troubles can be "unstable", "divergent" and "bumped".
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 12 Jun 2014 16:10:01 -0700
parents 2b2a4ab0eb68
children ff43167ed0ba
line wrap: on
line diff
--- a/hgext/evolve.py	Tue Jun 03 14:29:24 2014 -0700
+++ b/hgext/evolve.py	Thu Jun 12 16:10:01 2014 -0700
@@ -525,6 +525,13 @@
         return 'unstable'
     return 'stable'
 
+@eh.templatekw('troubles')
+def showtroubles(repo, ctx, **args):
+    """:troubles: List of strings. Evolution troubles affecting the changeset
+    (zero or more of "unstable", "divergent" or "bumped")."""
+    return templatekw.showlist('trouble', ctx.troubles(), plural='troubles',
+                               **args)
+
 #####################################################################
 ### Various trouble warning                                       ###
 #####################################################################