Patchwork [3,of,3] color: document that changeset phases have labels

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date Sept. 3, 2014, 1:39 p.m.
Message ID <ee01f03638e59043f9bb.1409751548@Iris>
Download mbox | patch
Permalink /patch/5690/
State Accepted
Headers show

Comments

Jordi Gutiérrez Hermoso - Sept. 3, 2014, 1:39 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1408915648 14400
#      Sun Aug 24 17:27:28 2014 -0400
# Node ID ee01f03638e59043f9bbc81481e83fe470142326
# Parent  cfa2b9f3d8b7e58be5422a2c5e3ee79393955303
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.
Pierre-Yves David - Sept. 18, 2014, 12:16 a.m.
On 09/03/2014 06:39 AM, Jordi Gutiérrez Hermoso wrote:
> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> # Date 1408915648 14400
> #      Sun Aug 24 17:27:28 2014 -0400
> # Node ID ee01f03638e59043f9bbc81481e83fe470142326
> # Parent  cfa2b9f3d8b7e58be5422a2c5e3ee79393955303
> color: document that changeset phases have labels

sounds reasonable to me.

Pushed to the clowncopter.

Patch

diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -64,6 +64,11 @@  effects may be overridden from your conf
   diff.tab = none
   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
 
@@ -277,6 +282,9 @@  except ImportError:
            'diff.inserted': 'green',
            'diff.tab': 'none',
            'diff.trailingwhitespace': 'bold red_background',
+           'changeset.public' : '',
+           'changeset.draft' : '',
+           'changeset.secret' : '',
            'diffstat.deleted': 'red',
            'diffstat.inserted': 'green',
            'histedit.remaining': 'red bold',