Mercurial > hg
comparison tests/test-help.t @ 31080:6918c9215201
help: hide command line options marked as "advanced"
Previously, we have keywords like "(DEPRECATED)" and "(EXPERIMENTAL)" to
hide command line options in non-verbose help output.
However, sometimes an option is neither deprecated nor experimental. It's
well-tested and working, but just not designed to average users. This patch
adds a keyword "(ADVANCED)" to fit in such use cases.
Thanks rom1dep for the suggestion of the word "advanced".
author | Jun Wu <quark@fb.com> |
---|---|
date | Tue, 01 Nov 2016 14:50:45 +0000 |
parents | 900996da577a |
children | 8346b2f09e79 |
comparison
equal
deleted
inserted
replaced
31079:873ebdd6e84d | 31080:6918c9215201 |
---|---|
681 > [('', 'longdesc', 3, 'x'*90), | 681 > [('', 'longdesc', 3, 'x'*90), |
682 > ('n', '', None, 'normal desc'), | 682 > ('n', '', None, 'normal desc'), |
683 > ('', 'newline', '', 'line1\nline2')], | 683 > ('', 'newline', '', 'line1\nline2')], |
684 > 'hg nohelp', | 684 > 'hg nohelp', |
685 > norepo=True) | 685 > norepo=True) |
686 > @command('debugoptADV', [('', 'aopt', None, 'option is (ADVANCED)')]) | |
686 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')]) | 687 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')]) |
687 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')]) | 688 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')]) |
688 > def nohelp(ui, *args, **kwargs): | 689 > def nohelp(ui, *args, **kwargs): |
689 > pass | 690 > pass |
690 > | 691 > |
893 print merge state | 894 print merge state |
894 debugnamecomplete | 895 debugnamecomplete |
895 complete "names" - tags, open branch names, bookmark names | 896 complete "names" - tags, open branch names, bookmark names |
896 debugobsolete | 897 debugobsolete |
897 create arbitrary obsolete marker | 898 create arbitrary obsolete marker |
899 debugoptADV (no help text available) | |
898 debugoptDEP (no help text available) | 900 debugoptDEP (no help text available) |
899 debugoptEXP (no help text available) | 901 debugoptEXP (no help text available) |
900 debugpathcomplete | 902 debugpathcomplete |
901 complete part or all of a tracked path | 903 complete part or all of a tracked path |
902 debugpushkey access the pushkey key/value protocol | 904 debugpushkey access the pushkey key/value protocol |
1106 nohelp (no help text available) | 1108 nohelp (no help text available) |
1107 | 1109 |
1108 (use 'hg help -v helpext' to show built-in aliases and global options) | 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 $ hg help debugoptDEP | 1122 $ hg help debugoptDEP |
1113 hg debugoptDEP | 1123 hg debugoptDEP |
1114 | 1124 |
1115 (no help text available) | 1125 (no help text available) |
1116 | 1126 |
1125 | 1135 |
1126 options: | 1136 options: |
1127 | 1137 |
1128 (some details hidden, use --verbose to show complete help) | 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 $ hg help -v debugoptDEP | grep dopt | 1143 $ hg help -v debugoptDEP | grep dopt |
1132 --dopt option is (DEPRECATED) | 1144 --dopt option is (DEPRECATED) |
1133 $ hg help -v debugoptEXP | grep eopt | 1145 $ hg help -v debugoptEXP | grep eopt |
1134 --eopt option is (EXPERIMENTAL) | 1146 --eopt option is (EXPERIMENTAL) |
1135 | 1147 |