Patchwork [1,of,3] color: document that labels are used for colourising text

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date Aug. 25, 2014, 9:07 p.m.
Message ID <c5f6568355f263842344.1409000839@Iris>
Download mbox | patch
Permalink /patch/5596/
State Superseded
Headers show

Comments

Jordi Gutiérrez Hermoso - Aug. 25, 2014, 9:07 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1408916136 14400
#      Sun Aug 24 17:35:36 2014 -0400
# Node ID c5f6568355f263842344e08dd2b74051c869324d
# Parent  258f682b167cdbbbc65eeb0ad37a824e6650c42f
color: document that labels are used for colourising text

It is a deeply hidden secret that it's possible to colorise so many
things with so many different labels. This is an attempt to document
this and give an option to view the labels.

Patch

diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -19,7 +19,12 @@  terminal codes used to change color and 
 available, then effects are rendered with the ECMA-48 SGR control
 function (aka ANSI escape codes).
 
-Default effects may be overridden from your configuration file::
+Text receives color effects depending on the labels that it has. Many
+default Mercurial commands emit labelled text. You can also define
+your own labels in templates using the label function, see :hg:`help templates`.
+
+The following are the default effects for some default labels. Default
+effects may be overridden from your configuration file::
 
   [color]
   status.modified = blue bold underline red_background