templates: add "changeset.obsolete" label in command line style
authorDenis Laxalde <denis@laxalde.org>
Sat, 25 Mar 2017 10:40:29 +0100
changeset 31702 00f996f05522
parent 31701 ca971140ca76
child 31703 cda83a1bfb3a
templates: add "changeset.obsolete" label in command line style Following respective change in cmdutil.changeset_printer.
mercurial/templates/map-cmdline.default
tests/test-obsolete.t
--- a/mercurial/templates/map-cmdline.default	Tue Mar 28 22:38:45 2017 +0200
+++ b/mercurial/templates/map-cmdline.default	Sat Mar 25 10:40:29 2017 +0100
@@ -30,7 +30,8 @@
 # General templates
 _trouble_label = 'trouble.{trouble}'
 _troubles_labels = '{if(troubles, "changeset.troubled {troubles%_trouble_label}")}'
-_cset_labels = '{separate(" ", "log.changeset", "changeset.{phase}", "{_troubles_labels}")}'
+_obsolete_label = '{if(obsolete, "changeset.obsolete")}'
+_cset_labels = '{separate(" ", "log.changeset", "changeset.{phase}", "{_obsolete_label}", "{_troubles_labels}")}'
 cset = '{label("{_cset_labels}",
                "changeset:   {rev}:{node|short}")}\n'
 
--- a/tests/test-obsolete.t	Tue Mar 28 22:38:45 2017 +0200
+++ b/tests/test-obsolete.t	Sat Mar 25 10:40:29 2017 +0100
@@ -830,6 +830,13 @@
   trouble:     unstable, bumped
   summary:     add babar
   
+  $ hg log -T default -r 'obsolete()'
+  changeset:   6:3de5eca88c00
+  parent:      3:6f9641995072
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add obsolete_e
+  
 
 test summary output