color: document that changeset phases have labels
authorJordi Gutiérrez Hermoso <jordigh@octave.org>
Sun, 24 Aug 2014 17:27:28 -0400
changeset 22465 f8e2aebbb24c
parent 22464 964dd1c491ca
child 22466 e1b68c0a9363
color: document that changeset phases have labels It's very useful to be able to colourise csets according to their phases. There was no indication anywhere in the docs that this is possible. We use e.g. `changeset.secret = ` instead of `changeset.secret ='none'`, because otherwise this is a BC: it would nullify the effects given to log.changeset label that usually surrounds the changeset.{phase} labels. Specifying the label without any effect instead of 'none' is a true no-op change and purely documentation.
hgext/color.py
--- a/hgext/color.py	Fri Sep 19 12:51:15 2014 -0500
+++ b/hgext/color.py	Sun Aug 24 17:27:28 2014 -0400
@@ -63,6 +63,11 @@
   diff.changed = white
   diff.trailingwhitespace = bold red_background
 
+  # Blank so it inherits the style of the surrounding label
+  changeset.public =
+  changeset.draft =
+  changeset.secret =
+
   resolve.unresolved = red bold
   resolve.resolved = green bold
 
@@ -275,6 +280,9 @@
            'diff.hunk': 'magenta',
            'diff.inserted': 'green',
            'diff.trailingwhitespace': 'bold red_background',
+           'changeset.public' : '',
+           'changeset.draft' : '',
+           'changeset.secret' : '',
            'diffstat.deleted': 'red',
            'diffstat.inserted': 'green',
            'histedit.remaining': 'red bold',