Show More
@@ -187,10 +187,11 b" testedwith = 'ships-with-hg-core'" | |||
|
187 | 187 | |
|
188 | 188 | def extsetup(ui): |
|
189 | 189 | # change default color config |
|
190 | color._enabledbydefault = True | |
|
190 | 191 | for idx, entry in enumerate(commands.globalopts): |
|
191 | 192 | if entry[1] == 'color': |
|
192 |
patch = ( |
|
|
193 |
new = entry[: |
|
|
193 | patch = (entry[3].replace(' (EXPERIMENTAL)', ''),) | |
|
194 | new = entry[:3] + patch + entry[4:] | |
|
194 | 195 | commands.globalopts[idx] = new |
|
195 | 196 | break |
|
196 | 197 |
@@ -43,6 +43,9 b' except ImportError:' | |||
|
43 | 43 | curses = None |
|
44 | 44 | _terminfo_params = {} |
|
45 | 45 | |
|
46 | # allow the extensions to change the default | |
|
47 | _enabledbydefault = False | |
|
48 | ||
|
46 | 49 | # start and stop parameters for effects |
|
47 | 50 | _effects = { |
|
48 | 51 | 'none': 0, |
@@ -167,25 +170,29 b' def _terminfosetup(ui, mode):' | |||
|
167 | 170 | "ECMA-48 color\n")) |
|
168 | 171 | _terminfo_params.clear() |
|
169 | 172 | |
|
170 |
def setup(ui |
|
|
173 | def setup(ui): | |
|
171 | 174 | """configure color on a ui |
|
172 | 175 | |
|
173 | The 'coloropts' argument is the value of the '--color' command line | |
|
174 | argument. That function both set the colormode for the ui object and read | |
|
176 | That function both set the colormode for the ui object and read | |
|
175 | 177 | the configuration looking for custom colors and effect definitions.""" |
|
176 |
mode = _modesetup(ui |
|
|
178 | mode = _modesetup(ui) | |
|
177 | 179 | ui._colormode = mode |
|
178 | 180 | if mode and mode != 'debug': |
|
179 | 181 | configstyles(ui) |
|
180 | 182 | |
|
181 |
def _modesetup(ui |
|
|
183 | def _modesetup(ui): | |
|
182 | 184 | if ui.plain(): |
|
183 | 185 | return None |
|
184 | if coloropt == 'debug': | |
|
186 | default = 'never' | |
|
187 | if _enabledbydefault: | |
|
188 | default = 'auto' | |
|
189 | # experimental config: ui.color | |
|
190 | config = ui.config('ui', 'color', default) | |
|
191 | if config == 'debug': | |
|
185 | 192 | return 'debug' |
|
186 | 193 | |
|
187 |
auto = (co |
|
|
188 |
always = not auto and util.parsebool(co |
|
|
194 | auto = (config == 'auto') | |
|
195 | always = not auto and util.parsebool(config) | |
|
189 | 196 | if not always and not auto: |
|
190 | 197 | return None |
|
191 | 198 |
@@ -77,7 +77,7 b' globalopts = [' | |||
|
77 | 77 | _('do not prompt, automatically pick the first choice for all prompts')), |
|
78 | 78 | ('q', 'quiet', None, _('suppress output')), |
|
79 | 79 | ('v', 'verbose', None, _('enable additional output')), |
|
80 |
('', 'color', ' |
|
|
80 | ('', 'color', '', | |
|
81 | 81 | # i18n: 'always', 'auto', 'never', and 'debug' are keywords |
|
82 | 82 | # and should not be translated |
|
83 | 83 | _("when to colorize (boolean, always, auto, never, or debug)" |
@@ -765,8 +765,11 b' def _dispatch(req):' | |||
|
765 | 765 | ui_.insecureconnections = True |
|
766 | 766 | |
|
767 | 767 | # setup color handling |
|
768 | coloropt = options['color'] | |
|
768 | 769 | for ui_ in uis: |
|
769 | color.setup(ui_, options['color']) | |
|
770 | if coloropt: | |
|
771 | ui_.setconfig('ui', 'color', coloropt, '--color') | |
|
772 | color.setup(ui_) | |
|
770 | 773 | |
|
771 | 774 | if options['version']: |
|
772 | 775 | return commands.version_(ui) |
@@ -1,10 +1,10 b'' | |||
|
1 | 1 | Setup |
|
2 | 2 | |
|
3 | 3 | $ cat <<EOF >> $HGRCPATH |
|
4 | > [ui] | |
|
5 | > color = always | |
|
4 | 6 | > [color] |
|
5 | 7 | > mode = ansi |
|
6 | > [extensions] | |
|
7 | > color = | |
|
8 | 8 | > EOF |
|
9 | 9 | $ hg init repo |
|
10 | 10 | $ cd repo |
@@ -35,7 +35,7 b' Setup' | |||
|
35 | 35 | |
|
36 | 36 | default context |
|
37 | 37 | |
|
38 |
$ hg diff --nodates |
|
|
38 | $ hg diff --nodates | |
|
39 | 39 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
40 | 40 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
41 | 41 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
@@ -51,7 +51,7 b' default context' | |||
|
51 | 51 | |
|
52 | 52 | --unified=2 |
|
53 | 53 | |
|
54 |
$ hg diff --nodates -U 2 |
|
|
54 | $ hg diff --nodates -U 2 | |
|
55 | 55 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
56 | 56 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
57 | 57 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
@@ -65,10 +65,11 b' default context' | |||
|
65 | 65 | |
|
66 | 66 | diffstat |
|
67 | 67 | |
|
68 |
$ hg diff --stat |
|
|
68 | $ hg diff --stat | |
|
69 | 69 | a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) |
|
70 | 70 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
71 | 71 | $ cat <<EOF >> $HGRCPATH |
|
72 | > [extensions] | |
|
72 | 73 | > record = |
|
73 | 74 | > [ui] |
|
74 | 75 | > interactive = true |
@@ -81,7 +82,7 b' diffstat' | |||
|
81 | 82 | record |
|
82 | 83 | |
|
83 | 84 | $ chmod +x a |
|
84 |
$ hg record |
|
|
85 | $ hg record -m moda a <<EOF | |
|
85 | 86 | > y |
|
86 | 87 | > y |
|
87 | 88 | > EOF |
@@ -111,7 +112,7 b' record' | |||
|
111 | 112 | |
|
112 | 113 | qrecord |
|
113 | 114 | |
|
114 |
$ hg qrecord |
|
|
115 | $ hg qrecord -m moda patch <<EOF | |
|
115 | 116 | > y |
|
116 | 117 | > y |
|
117 | 118 | > EOF |
@@ -151,7 +152,7 b' issue3712: test colorization of subrepo ' | |||
|
151 | 152 | $ echo aa >> a |
|
152 | 153 | $ echo bb >> sub/b |
|
153 | 154 | |
|
154 |
$ hg diff |
|
|
155 | $ hg diff -S | |
|
155 | 156 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
156 | 157 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
157 | 158 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
@@ -176,7 +177,7 b' test tabs' | |||
|
176 | 177 | > mid tab |
|
177 | 178 | > all tabs |
|
178 | 179 | > EOF |
|
179 |
$ hg diff --nodates |
|
|
180 | $ hg diff --nodates | |
|
180 | 181 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
181 | 182 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
182 | 183 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
@@ -192,7 +193,7 b' test tabs' | |||
|
192 | 193 | \x1b[0;32m+\x1b[0m \x1b[0;32mall\x1b[0m \x1b[0;32mtabs\x1b[0m\x1b[0;1;41m \x1b[0m (esc) |
|
193 | 194 | $ echo "[color]" >> $HGRCPATH |
|
194 | 195 | $ echo "diff.tab = bold magenta" >> $HGRCPATH |
|
195 |
$ hg diff --nodates |
|
|
196 | $ hg diff --nodates | |
|
196 | 197 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
197 | 198 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
198 | 199 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
@@ -533,7 +533,7 b' hide outer repo' | |||
|
533 | 533 | -q --quiet suppress output |
|
534 | 534 | -v --verbose enable additional output |
|
535 | 535 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
536 |
debug) (EXPERIMENTAL) |
|
|
536 | debug) (EXPERIMENTAL) | |
|
537 | 537 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
538 | 538 | --debug enable debugging output |
|
539 | 539 | --debugger start debugger |
@@ -572,7 +572,7 b' hide outer repo' | |||
|
572 | 572 | -q --quiet suppress output |
|
573 | 573 | -v --verbose enable additional output |
|
574 | 574 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
575 |
debug) (EXPERIMENTAL) |
|
|
575 | debug) (EXPERIMENTAL) | |
|
576 | 576 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
577 | 577 | --debug enable debugging output |
|
578 | 578 | --debugger start debugger |
@@ -854,7 +854,7 b' extension help itself' | |||
|
854 | 854 | -q --quiet suppress output |
|
855 | 855 | -v --verbose enable additional output |
|
856 | 856 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
857 |
debug) (EXPERIMENTAL) |
|
|
857 | debug) (EXPERIMENTAL) | |
|
858 | 858 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
859 | 859 | --debug enable debugging output |
|
860 | 860 | --debugger start debugger |
@@ -891,7 +891,7 b" Make sure that single '-v' option shows " | |||
|
891 | 891 | -q --quiet suppress output |
|
892 | 892 | -v --verbose enable additional output |
|
893 | 893 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
894 |
debug) (EXPERIMENTAL) |
|
|
894 | debug) (EXPERIMENTAL) | |
|
895 | 895 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
896 | 896 | --debug enable debugging output |
|
897 | 897 | --debugger start debugger |
@@ -966,7 +966,7 b" help options '-v' and '-v -e' should be " | |||
|
966 | 966 | -q --quiet suppress output |
|
967 | 967 | -v --verbose enable additional output |
|
968 | 968 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
969 |
debug) (EXPERIMENTAL) |
|
|
969 | debug) (EXPERIMENTAL) | |
|
970 | 970 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
971 | 971 | --debug enable debugging output |
|
972 | 972 | --debugger start debugger |
@@ -1002,7 +1002,7 b" help options '-v' and '-v -e' should be " | |||
|
1002 | 1002 | -q --quiet suppress output |
|
1003 | 1003 | -v --verbose enable additional output |
|
1004 | 1004 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
1005 |
debug) (EXPERIMENTAL) |
|
|
1005 | debug) (EXPERIMENTAL) | |
|
1006 | 1006 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
1007 | 1007 | --debug enable debugging output |
|
1008 | 1008 | --debugger start debugger |
@@ -317,7 +317,7 b' Test short command list with verbose opt' | |||
|
317 | 317 | -q --quiet suppress output |
|
318 | 318 | -v --verbose enable additional output |
|
319 | 319 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
320 |
debug) (EXPERIMENTAL) |
|
|
320 | debug) (EXPERIMENTAL) | |
|
321 | 321 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
322 | 322 | --debug enable debugging output |
|
323 | 323 | --debugger start debugger |
@@ -417,7 +417,7 b' Verbose help for add' | |||
|
417 | 417 | -q --quiet suppress output |
|
418 | 418 | -v --verbose enable additional output |
|
419 | 419 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
420 |
debug) (EXPERIMENTAL) |
|
|
420 | debug) (EXPERIMENTAL) | |
|
421 | 421 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
422 | 422 | --debug enable debugging output |
|
423 | 423 | --debugger start debugger |
@@ -2521,7 +2521,7 b' Dish up an empty repo; serve it cold.' | |||
|
2521 | 2521 | <td>enable additional output</td></tr> |
|
2522 | 2522 | <tr><td></td> |
|
2523 | 2523 | <td>--color TYPE</td> |
|
2524 |
<td>when to colorize (boolean, always, auto, never, or debug) (EXPERIMENTAL) |
|
|
2524 | <td>when to colorize (boolean, always, auto, never, or debug) (EXPERIMENTAL)</td></tr> | |
|
2525 | 2525 | <tr><td></td> |
|
2526 | 2526 | <td>--config CONFIG [+]</td> |
|
2527 | 2527 | <td>set/override config option (use 'section.name=value')</td></tr> |
@@ -2722,7 +2722,7 b' Dish up an empty repo; serve it cold.' | |||
|
2722 | 2722 | <td>enable additional output</td></tr> |
|
2723 | 2723 | <tr><td></td> |
|
2724 | 2724 | <td>--color TYPE</td> |
|
2725 |
<td>when to colorize (boolean, always, auto, never, or debug) (EXPERIMENTAL) |
|
|
2725 | <td>when to colorize (boolean, always, auto, never, or debug) (EXPERIMENTAL)</td></tr> | |
|
2726 | 2726 | <tr><td></td> |
|
2727 | 2727 | <td>--config CONFIG [+]</td> |
|
2728 | 2728 | <td>set/override config option (use 'section.name=value')</td></tr> |
@@ -1,6 +1,6 b'' | |||
|
1 | 1 | $ cat <<EOF >> $HGRCPATH |
|
2 | > [extensions] | |
|
3 | > color = | |
|
2 | > [ui] | |
|
3 | > color = always | |
|
4 | 4 | > [color] |
|
5 | 5 | > mode = ansi |
|
6 | 6 | > EOF |
@@ -14,7 +14,7 b' Terminfo codes compatibility fix' | |||
|
14 | 14 | |
|
15 | 15 | hg status in repo root: |
|
16 | 16 | |
|
17 |
$ hg status |
|
|
17 | $ hg status | |
|
18 | 18 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
19 | 19 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
20 | 20 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
@@ -41,7 +41,7 b' hg status with template' | |||
|
41 | 41 | |
|
42 | 42 | hg status . in repo root: |
|
43 | 43 | |
|
44 |
$ hg status |
|
|
44 | $ hg status . | |
|
45 | 45 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
46 | 46 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
47 | 47 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
@@ -49,17 +49,17 b' hg status . in repo root:' | |||
|
49 | 49 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
50 | 50 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
51 | 51 | |
|
52 |
$ hg status -- |
|
|
52 | $ hg status --cwd a | |
|
53 | 53 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
54 | 54 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
55 | 55 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
56 | 56 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
57 | 57 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
58 | 58 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
59 |
$ hg status -- |
|
|
59 | $ hg status --cwd a . | |
|
60 | 60 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
61 | 61 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
62 |
$ hg status -- |
|
|
62 | $ hg status --cwd a .. | |
|
63 | 63 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
64 | 64 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
65 | 65 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/1/in_b_1\x1b[0m (esc) |
@@ -67,18 +67,18 b' hg status . in repo root:' | |||
|
67 | 67 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/in_b\x1b[0m (esc) |
|
68 | 68 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
69 | 69 | |
|
70 |
$ hg status -- |
|
|
70 | $ hg status --cwd b | |
|
71 | 71 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
72 | 72 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
73 | 73 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
74 | 74 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
75 | 75 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
76 | 76 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
77 |
$ hg status -- |
|
|
77 | $ hg status --cwd b . | |
|
78 | 78 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
|
79 | 79 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) |
|
80 | 80 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
81 |
$ hg status -- |
|
|
81 | $ hg status --cwd b .. | |
|
82 | 82 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/1/in_a_1\x1b[0m (esc) |
|
83 | 83 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/in_a\x1b[0m (esc) |
|
84 | 84 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
@@ -86,43 +86,43 b' hg status . in repo root:' | |||
|
86 | 86 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
87 | 87 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
88 | 88 | |
|
89 |
$ hg status -- |
|
|
89 | $ hg status --cwd a/1 | |
|
90 | 90 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
91 | 91 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
92 | 92 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
93 | 93 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
94 | 94 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
95 | 95 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
96 |
$ hg status -- |
|
|
96 | $ hg status --cwd a/1 . | |
|
97 | 97 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
98 |
$ hg status -- |
|
|
98 | $ hg status --cwd a/1 .. | |
|
99 | 99 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
100 | 100 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_a\x1b[0m (esc) |
|
101 | 101 | |
|
102 |
$ hg status -- |
|
|
102 | $ hg status --cwd b/1 | |
|
103 | 103 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
104 | 104 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
105 | 105 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
106 | 106 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
107 | 107 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
108 | 108 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
109 |
$ hg status -- |
|
|
109 | $ hg status --cwd b/1 . | |
|
110 | 110 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
111 |
$ hg status -- |
|
|
111 | $ hg status --cwd b/1 .. | |
|
112 | 112 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
113 | 113 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../2/in_b_2\x1b[0m (esc) |
|
114 | 114 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
|
115 | 115 | |
|
116 |
$ hg status -- |
|
|
116 | $ hg status --cwd b/2 | |
|
117 | 117 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
118 | 118 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
119 | 119 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
120 | 120 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
121 | 121 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
122 | 122 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
123 |
$ hg status -- |
|
|
123 | $ hg status --cwd b/2 . | |
|
124 | 124 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
125 |
$ hg status -- |
|
|
125 | $ hg status --cwd b/2 .. | |
|
126 | 126 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc) |
|
127 | 127 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
128 | 128 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
@@ -137,7 +137,7 b' Make sure --color=never works' | |||
|
137 | 137 | ? in_root |
|
138 | 138 | |
|
139 | 139 | Make sure ui.formatted=False works |
|
140 | $ hg status --config ui.formatted=False | |
|
140 | $ hg status --color=auto --config ui.formatted=False | |
|
141 | 141 | ? a/1/in_a_1 |
|
142 | 142 | ? a/in_a |
|
143 | 143 | ? b/1/in_b_1 |
@@ -179,7 +179,7 b' templates should be.' | |||
|
179 | 179 | |
|
180 | 180 | hg status: |
|
181 | 181 | |
|
182 |
$ hg status |
|
|
182 | $ hg status | |
|
183 | 183 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
184 | 184 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
185 | 185 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
@@ -187,7 +187,7 b' hg status:' | |||
|
187 | 187 | |
|
188 | 188 | hg status modified added removed deleted unknown never-existed ignored: |
|
189 | 189 | |
|
190 |
$ hg status |
|
|
190 | $ hg status modified added removed deleted unknown never-existed ignored | |
|
191 | 191 | never-existed: * (glob) |
|
192 | 192 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
193 | 193 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
@@ -198,7 +198,7 b' hg status modified added removed deleted' | |||
|
198 | 198 | |
|
199 | 199 | hg status -C: |
|
200 | 200 | |
|
201 |
$ hg status |
|
|
201 | $ hg status -C | |
|
202 | 202 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
203 | 203 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
204 | 204 | \x1b[0;0m modified\x1b[0m (esc) |
@@ -208,7 +208,7 b' hg status -C:' | |||
|
208 | 208 | |
|
209 | 209 | hg status -A: |
|
210 | 210 | |
|
211 |
$ hg status |
|
|
211 | $ hg status -A | |
|
212 | 212 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
213 | 213 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
214 | 214 | \x1b[0;0m modified\x1b[0m (esc) |
@@ -226,7 +226,7 b' hg status -A (with terminfo color):' | |||
|
226 | 226 | |
|
227 | 227 | $ mkdir "$TESTTMP/terminfo" |
|
228 | 228 | $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti" |
|
229 |
$ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo |
|
|
229 | $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo -A | |
|
230 | 230 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m (esc) |
|
231 | 231 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m (esc) |
|
232 | 232 | \x1b[30m\x1b[30m modified\x1b[30m (esc) |
@@ -245,7 +245,7 b' The user can define effects with raw ter' | |||
|
245 | 245 | > # We can override what's in the terminfo database, too |
|
246 | 246 | > terminfo.bold = \E[2m |
|
247 | 247 | > EOF |
|
248 |
$ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --config color.status.clean=dim - |
|
|
248 | $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --config color.status.clean=dim -A | |
|
249 | 249 | \x1b[30m\x1b[32m\x1b[2mA \x1b[30m\x1b[30m\x1b[32m\x1b[2madded\x1b[30m (esc) |
|
250 | 250 | \x1b[30m\x1b[32m\x1b[2mA \x1b[30m\x1b[30m\x1b[32m\x1b[2mcopied\x1b[30m (esc) |
|
251 | 251 | \x1b[30m\x1b[30m modified\x1b[30m (esc) |
@@ -265,11 +265,11 b' The user can define effects with raw ter' | |||
|
265 | 265 | |
|
266 | 266 | hg status ignoreddir/file: |
|
267 | 267 | |
|
268 |
$ hg status |
|
|
268 | $ hg status ignoreddir/file | |
|
269 | 269 | |
|
270 | 270 | hg status -i ignoreddir/file: |
|
271 | 271 | |
|
272 |
$ hg status - |
|
|
272 | $ hg status -i ignoreddir/file | |
|
273 | 273 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignoreddir/file\x1b[0m (esc) |
|
274 | 274 | $ cd .. |
|
275 | 275 | |
@@ -293,7 +293,7 b" check 'status -q' and some combinations" | |||
|
293 | 293 | |
|
294 | 294 | test unknown color |
|
295 | 295 | |
|
296 |
$ hg --config color.status.modified=periwinkle status |
|
|
296 | $ hg --config color.status.modified=periwinkle status | |
|
297 | 297 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) |
|
298 | 298 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) |
|
299 | 299 | M modified |
@@ -308,8 +308,8 b' Check if result is the same or different' | |||
|
308 | 308 | If result is not as expected, raise error |
|
309 | 309 | |
|
310 | 310 | $ assert() { |
|
311 |
> hg status |
|
|
312 |
> hg status |
|
|
311 | > hg status $1 > ../a | |
|
312 | > hg status $2 > ../b | |
|
313 | 313 | > if diff ../a ../b > /dev/null; then |
|
314 | 314 | > out=0 |
|
315 | 315 | > else |
@@ -368,7 +368,7 b" test 'resolve -l'" | |||
|
368 | 368 | |
|
369 | 369 | hg resolve with one unresolved, one resolved: |
|
370 | 370 | |
|
371 |
$ hg resolve - |
|
|
371 | $ hg resolve -l | |
|
372 | 372 | \x1b[0;31;1mU \x1b[0m\x1b[0;31;1ma\x1b[0m (esc) |
|
373 | 373 | \x1b[0;32;1mR \x1b[0m\x1b[0;32;1mb\x1b[0m (esc) |
|
374 | 374 |
General Comments 0
You need to be logged in to leave comments.
Login now