##// END OF EJS Templates
color: add the definition of '--color' in core...
Pierre-Yves David -
r31104:8346b2f0 default
parent child Browse files
Show More
@@ -198,12 +198,13 b' def uisetup(ui):'
198 extensions.wrapfunction(dispatch, '_runcommand', colorcmd)
198 extensions.wrapfunction(dispatch, '_runcommand', colorcmd)
199
199
200 def extsetup(ui):
200 def extsetup(ui):
201 commands.globalopts.append(
201 # change default color config
202 ('', 'color', 'auto',
202 for idx, entry in enumerate(commands.globalopts):
203 # i18n: 'always', 'auto', 'never', and 'debug' are keywords
203 if entry[1] == 'color':
204 # and should not be translated
204 patch = ('auto', entry[3].replace(' (EXPERIMENTAL)', ''))
205 _("when to colorize (boolean, always, auto, never, or debug)"),
205 new = entry[:2] + patch + entry[4:]
206 _('TYPE')))
206 commands.globalopts[idx] = new
207 break
207
208
208 @command('debugcolor',
209 @command('debugcolor',
209 [('', 'style', None, _('show all configured styles'))],
210 [('', 'style', None, _('show all configured styles'))],
@@ -77,6 +77,12 b' globalopts = ['
77 _('do not prompt, automatically pick the first choice for all prompts')),
77 _('do not prompt, automatically pick the first choice for all prompts')),
78 ('q', 'quiet', None, _('suppress output')),
78 ('q', 'quiet', None, _('suppress output')),
79 ('v', 'verbose', None, _('enable additional output')),
79 ('v', 'verbose', None, _('enable additional output')),
80 ('', 'color', 'never',
81 # i18n: 'always', 'auto', 'never', and 'debug' are keywords
82 # and should not be translated
83 _("when to colorize (boolean, always, auto, never, or debug)"
84 " (EXPERIMENTAL)"),
85 _('TYPE')),
80 ('', 'config', [],
86 ('', 'config', [],
81 _('set/override config option (use \'section.name=value\')'),
87 _('set/override config option (use \'section.name=value\')'),
82 _('CONFIG')),
88 _('CONFIG')),
@@ -129,6 +129,7 b' Show the alias of a debug command if the'
129
129
130 Show the global options
130 Show the global options
131 $ hg debugcomplete --options | sort
131 $ hg debugcomplete --options | sort
132 --color
132 --config
133 --config
133 --cwd
134 --cwd
134 --debug
135 --debug
@@ -158,6 +159,7 b' Show the options for the "serve" command'
158 --address
159 --address
159 --certificate
160 --certificate
160 --cmdserver
161 --cmdserver
162 --color
161 --config
163 --config
162 --cwd
164 --cwd
163 --daemon
165 --daemon
@@ -532,6 +532,8 b' hide outer repo'
532 all prompts
532 all prompts
533 -q --quiet suppress output
533 -q --quiet suppress output
534 -v --verbose enable additional output
534 -v --verbose enable additional output
535 --color TYPE when to colorize (boolean, always, auto, never, or
536 debug) (EXPERIMENTAL) (default: never)
535 --config CONFIG [+] set/override config option (use 'section.name=value')
537 --config CONFIG [+] set/override config option (use 'section.name=value')
536 --debug enable debugging output
538 --debug enable debugging output
537 --debugger start debugger
539 --debugger start debugger
@@ -569,6 +571,8 b' hide outer repo'
569 all prompts
571 all prompts
570 -q --quiet suppress output
572 -q --quiet suppress output
571 -v --verbose enable additional output
573 -v --verbose enable additional output
574 --color TYPE when to colorize (boolean, always, auto, never, or
575 debug) (EXPERIMENTAL) (default: never)
572 --config CONFIG [+] set/override config option (use 'section.name=value')
576 --config CONFIG [+] set/override config option (use 'section.name=value')
573 --debug enable debugging output
577 --debug enable debugging output
574 --debugger start debugger
578 --debugger start debugger
@@ -849,6 +853,8 b' extension help itself'
849 all prompts
853 all prompts
850 -q --quiet suppress output
854 -q --quiet suppress output
851 -v --verbose enable additional output
855 -v --verbose enable additional output
856 --color TYPE when to colorize (boolean, always, auto, never, or
857 debug) (EXPERIMENTAL) (default: never)
852 --config CONFIG [+] set/override config option (use 'section.name=value')
858 --config CONFIG [+] set/override config option (use 'section.name=value')
853 --debug enable debugging output
859 --debug enable debugging output
854 --debugger start debugger
860 --debugger start debugger
@@ -884,6 +890,8 b" Make sure that single '-v' option shows "
884 all prompts
890 all prompts
885 -q --quiet suppress output
891 -q --quiet suppress output
886 -v --verbose enable additional output
892 -v --verbose enable additional output
893 --color TYPE when to colorize (boolean, always, auto, never, or
894 debug) (EXPERIMENTAL) (default: never)
887 --config CONFIG [+] set/override config option (use 'section.name=value')
895 --config CONFIG [+] set/override config option (use 'section.name=value')
888 --debug enable debugging output
896 --debug enable debugging output
889 --debugger start debugger
897 --debugger start debugger
@@ -957,6 +965,8 b" help options '-v' and '-v -e' should be "
957 all prompts
965 all prompts
958 -q --quiet suppress output
966 -q --quiet suppress output
959 -v --verbose enable additional output
967 -v --verbose enable additional output
968 --color TYPE when to colorize (boolean, always, auto, never, or
969 debug) (EXPERIMENTAL) (default: never)
960 --config CONFIG [+] set/override config option (use 'section.name=value')
970 --config CONFIG [+] set/override config option (use 'section.name=value')
961 --debug enable debugging output
971 --debug enable debugging output
962 --debugger start debugger
972 --debugger start debugger
@@ -991,6 +1001,8 b" help options '-v' and '-v -e' should be "
991 all prompts
1001 all prompts
992 -q --quiet suppress output
1002 -q --quiet suppress output
993 -v --verbose enable additional output
1003 -v --verbose enable additional output
1004 --color TYPE when to colorize (boolean, always, auto, never, or
1005 debug) (EXPERIMENTAL) (default: never)
994 --config CONFIG [+] set/override config option (use 'section.name=value')
1006 --config CONFIG [+] set/override config option (use 'section.name=value')
995 --debug enable debugging output
1007 --debug enable debugging output
996 --debugger start debugger
1008 --debugger start debugger
@@ -5,5 +5,5 b' moving pager to core. These two warnings'
5 until the localization is corrected.
5 until the localization is corrected.
6 $ $TESTDIR/check-gendoc ro
6 $ $TESTDIR/check-gendoc ro
7 checking for parse errors
7 checking for parse errors
8 gendoc.txt:55: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
8 gendoc.txt:58: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
9 gendoc.txt:55: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
9 gendoc.txt:58: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
@@ -316,6 +316,8 b' Test short command list with verbose opt'
316 all prompts
316 all prompts
317 -q --quiet suppress output
317 -q --quiet suppress output
318 -v --verbose enable additional output
318 -v --verbose enable additional output
319 --color TYPE when to colorize (boolean, always, auto, never, or
320 debug) (EXPERIMENTAL) (default: never)
319 --config CONFIG [+] set/override config option (use 'section.name=value')
321 --config CONFIG [+] set/override config option (use 'section.name=value')
320 --debug enable debugging output
322 --debug enable debugging output
321 --debugger start debugger
323 --debugger start debugger
@@ -414,6 +416,8 b' Verbose help for add'
414 all prompts
416 all prompts
415 -q --quiet suppress output
417 -q --quiet suppress output
416 -v --verbose enable additional output
418 -v --verbose enable additional output
419 --color TYPE when to colorize (boolean, always, auto, never, or
420 debug) (EXPERIMENTAL) (default: never)
417 --config CONFIG [+] set/override config option (use 'section.name=value')
421 --config CONFIG [+] set/override config option (use 'section.name=value')
418 --debug enable debugging output
422 --debug enable debugging output
419 --debugger start debugger
423 --debugger start debugger
@@ -2516,6 +2520,9 b' Dish up an empty repo; serve it cold.'
2516 <td>--verbose</td>
2520 <td>--verbose</td>
2517 <td>enable additional output</td></tr>
2521 <td>enable additional output</td></tr>
2518 <tr><td></td>
2522 <tr><td></td>
2523 <td>--color TYPE</td>
2524 <td>when to colorize (boolean, always, auto, never, or debug) (EXPERIMENTAL) (default: never)</td></tr>
2525 <tr><td></td>
2519 <td>--config CONFIG [+]</td>
2526 <td>--config CONFIG [+]</td>
2520 <td>set/override config option (use 'section.name=value')</td></tr>
2527 <td>set/override config option (use 'section.name=value')</td></tr>
2521 <tr><td></td>
2528 <tr><td></td>
@@ -2714,6 +2721,9 b' Dish up an empty repo; serve it cold.'
2714 <td>--verbose</td>
2721 <td>--verbose</td>
2715 <td>enable additional output</td></tr>
2722 <td>enable additional output</td></tr>
2716 <tr><td></td>
2723 <tr><td></td>
2724 <td>--color TYPE</td>
2725 <td>when to colorize (boolean, always, auto, never, or debug) (EXPERIMENTAL) (default: never)</td></tr>
2726 <tr><td></td>
2717 <td>--config CONFIG [+]</td>
2727 <td>--config CONFIG [+]</td>
2718 <td>set/override config option (use 'section.name=value')</td></tr>
2728 <td>set/override config option (use 'section.name=value')</td></tr>
2719 <tr><td></td>
2729 <tr><td></td>
General Comments 0
You need to be logged in to leave comments. Login now