##// END OF EJS Templates
help: hide command line options marked as "advanced"...
Jun Wu -
r31080:6918c921 default
parent child Browse files
Show More
@@ -33,14 +33,17 b' from .hgweb import ('
33 33 webcommands,
34 34 )
35 35
36 _exclkeywords = [
36 _exclkeywords = set([
37 "(ADVANCED)",
37 38 "(DEPRECATED)",
38 39 "(EXPERIMENTAL)",
40 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
41 _("(ADVANCED)"),
39 42 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
40 43 _("(DEPRECATED)"),
41 44 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
42 45 _("(EXPERIMENTAL)"),
43 ]
46 ])
44 47
45 48 def listexts(header, exts, indent=1, showdeprecated=False):
46 49 '''return a text listing of the given extensions'''
@@ -683,6 +683,7 b' this is a section and erroring out weird'
683 683 > ('', 'newline', '', 'line1\nline2')],
684 684 > 'hg nohelp',
685 685 > norepo=True)
686 > @command('debugoptADV', [('', 'aopt', None, 'option is (ADVANCED)')])
686 687 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
687 688 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
688 689 > def nohelp(ui, *args, **kwargs):
@@ -895,6 +896,7 b' Test list of internal help commands'
895 896 complete "names" - tags, open branch names, bookmark names
896 897 debugobsolete
897 898 create arbitrary obsolete marker
899 debugoptADV (no help text available)
898 900 debugoptDEP (no help text available)
899 901 debugoptEXP (no help text available)
900 902 debugpathcomplete
@@ -1108,7 +1110,15 b' Test list of commands with command with '
1108 1110 (use 'hg help -v helpext' to show built-in aliases and global options)
1109 1111
1110 1112
1111 test deprecated and experimental options are hidden in command help
1113 test advanced, deprecated and experimental options are hidden in command help
1114 $ hg help debugoptADV
1115 hg debugoptADV
1116
1117 (no help text available)
1118
1119 options:
1120
1121 (some details hidden, use --verbose to show complete help)
1112 1122 $ hg help debugoptDEP
1113 1123 hg debugoptDEP
1114 1124
@@ -1127,7 +1137,9 b' test deprecated and experimental options'
1127 1137
1128 1138 (some details hidden, use --verbose to show complete help)
1129 1139
1130 test deprecated and experimental options is shown with -v
1140 test advanced, deprecated and experimental options are shown with -v
1141 $ hg help -v debugoptADV | grep aopt
1142 --aopt option is (ADVANCED)
1131 1143 $ hg help -v debugoptDEP | grep dopt
1132 1144 --dopt option is (DEPRECATED)
1133 1145 $ hg help -v debugoptEXP | grep eopt
General Comments 0
You need to be logged in to leave comments. Login now