changeset 31707:00f996f05522

templates: add "changeset.obsolete" label in command line style Following respective change in cmdutil.changeset_printer.
author Denis Laxalde <denis@laxalde.org>
date Sat, 25 Mar 2017 10:40:29 +0100
parents ca971140ca76
children cda83a1bfb3a
files mercurial/templates/map-cmdline.default tests/test-obsolete.t
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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