Mercurial > public > mercurial-scm > hg
diff hgext/color.py @ 11969:52ec5c813723
color: enable branches support
This commit updates the branches command to use ui.label for the branch names
and the changeset. This implementation allows assigning colors to the four
states of a branch: active, closed, current and inactive. While you can
configure color for the four states, only current and closed have default colors
of green and black bold respectively.
author | Jeremy Whitlock <jcscoobyrs@gmail.com> |
---|---|
date | Wed, 28 Jul 2010 23:05:03 -0600 |
parents | 26e413f55b5e |
children | c327bfa5e831 |
line wrap: on
line diff
--- a/hgext/color.py Wed Aug 18 23:37:26 2010 +0200 +++ b/hgext/color.py Wed Jul 28 23:05:03 2010 -0600 @@ -62,6 +62,11 @@ bookmarks.current = green + branches.active = none + branches.closed = black bold + branches.current = green + branches.inactive = none + The color extension will try to detect whether to use ANSI codes or Win32 console APIs, unless it is made explicit:: @@ -87,6 +92,10 @@ 'cyan_background': 46, 'white_background': 47} _styles = {'grep.match': 'red bold', + 'branches.active': 'none', + 'branches.closed': 'black bold', + 'branches.current': 'green', + 'branches.inactive': 'none', 'diff.changed': 'white', 'diff.deleted': 'red', 'diff.diffline': 'bold',