Mercurial > hg
diff tests/test-log.out @ 10826:717c35d55fb3
color: colorize based on output labels instead of parsing output
By overriding ui.write(), ui.write_err(), ui.popbuffer(), and ui.label(),
the color extension can avoid parsing command output and simply colorize
output based on labels.
As before, the color extension provides a list of default colors for
core commands/labels. Other extensions can provide their own defaults by
specifying a colortable dict (similar to cmdtable).
In this process, --color is promoted to a global option and the deprecated
--no-color option is removed.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Fri, 02 Apr 2010 15:22:17 -0500 |
parents | 08870cf7d388 |
children | 0d5f139b23c1 |
line wrap: on
line diff
--- a/tests/test-log.out Fri Apr 02 15:22:15 2010 -0500 +++ b/tests/test-log.out Fri Apr 02 15:22:17 2010 -0500 @@ -279,6 +279,33 @@ summary: r1 % log -d -1 +% log -p -l2 --color=always +[0;33mchangeset: 6:2404bbcab562[0m +tag: tip +user: test +date: Thu Jan 01 00:00:01 1970 +0000 +summary: b1.1 + +[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1[0m +[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000[0m +[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000[0m +[0;35m@@ -1,1 +1,2 @@[0m + b1 +[0;32m+postm[0m + +[0;33mchangeset: 5:302e9dd6890d[0m +parent: 3:e62f78d544b4 +parent: 4:ddb82e70d1a1 +user: test +date: Thu Jan 01 00:00:01 1970 +0000 +summary: m12 + +[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2[0m +[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000[0m +[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000[0m +[0;35m@@ -0,0 +1,1 @@[0m +[0;32m+b2[0m + adding a adding b changeset: 0:29a4c94f1924