merge with some older backport stable
authorPierre-Yves David <pyd@fb.com>
Mon, 16 Jun 2014 14:31:49 -0700
branchstable
changeset 1400 ff43167ed0ba
parent 973 6d691fefdbd1 (current diff)
parent 1399 9ff6d9240f16 (diff)
child 1401 20ff4ef75b87
merge with some older backport
hgext/evolve.py
tests/test-evolve.t
--- a/hgext/evolve.py	Thu Jun 05 18:07:39 2014 -0400
+++ b/hgext/evolve.py	Mon Jun 16 14:31:49 2014 -0700
@@ -594,6 +594,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                                       ###
 #####################################################################
--- a/tests/test-evolve.t	Thu Jun 05 18:07:39 2014 -0400
+++ b/tests/test-evolve.t	Mon Jun 16 14:31:49 2014 -0700
@@ -341,6 +341,27 @@
   $ hg commit --amend -m 'dansk!'
   2 new unstable changesets
 
+(ninja test for the {trouble} template:
+
+  $ hg log -G --template '{rev} {troubles}\n'
+  @  13
+  |
+  | o  11 unstable
+  | |
+  | o  10 unstable
+  | |
+  | x  9
+  |/
+  o  7
+  |
+  o  6
+  |
+  o  0
+  
+
+
+(/ninja)
+
   $ hg evolve --all --traceback
   move:[10] dansk 2!
   atop:[13] dansk!