Show More
@@ -43,7 +43,9 b' def optrst(header, options, verbose):' | |||||
43 | shortopt, longopt, default, desc = option |
|
43 | shortopt, longopt, default, desc = option | |
44 | optlabel = _("VALUE") # default label |
|
44 | optlabel = _("VALUE") # default label | |
45 |
|
45 | |||
46 |
if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc |
|
46 | if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc or | |
|
47 | "EXPERIMENTAL" in desc or | |||
|
48 | _("EXPERIMENTAL") in desc): | |||
47 | continue |
|
49 | continue | |
48 |
|
50 | |||
49 | so = '' |
|
51 | so = '' |
@@ -629,6 +629,7 b' Test command without options' | |||||
629 | > 'hg nohelp', |
|
629 | > 'hg nohelp', | |
630 | > norepo=True) |
|
630 | > norepo=True) | |
631 | > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')]) |
|
631 | > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')]) | |
|
632 | > @command('debugoptEXP', [('', 'eopt', None, 'option is EXPERIMENTAL')]) | |||
632 | > def nohelp(ui, *args, **kwargs): |
|
633 | > def nohelp(ui, *args, **kwargs): | |
633 | > pass |
|
634 | > pass | |
634 | > |
|
635 | > | |
@@ -788,6 +789,7 b' Test list of internal help commands' | |||||
788 | debugobsolete |
|
789 | debugobsolete | |
789 | create arbitrary obsolete marker |
|
790 | create arbitrary obsolete marker | |
790 | debugoptDEP (no help text available) |
|
791 | debugoptDEP (no help text available) | |
|
792 | debugoptEXP (no help text available) | |||
791 | debugpathcomplete |
|
793 | debugpathcomplete | |
792 | complete part or all of a tracked path |
|
794 | complete part or all of a tracked path | |
793 | debugpushkey access the pushkey key/value protocol |
|
795 | debugpushkey access the pushkey key/value protocol | |
@@ -822,7 +824,7 b' Test list of commands with command with ' | |||||
822 | (use "hg help -v helpext" to show built-in aliases and global options) |
|
824 | (use "hg help -v helpext" to show built-in aliases and global options) | |
823 |
|
825 | |||
824 |
|
826 | |||
825 |
test deprecated |
|
827 | test deprecated and experimental options are hidden in command help | |
826 | $ hg help debugoptDEP |
|
828 | $ hg help debugoptDEP | |
827 | hg debugoptDEP |
|
829 | hg debugoptDEP | |
828 |
|
830 | |||
@@ -832,9 +834,20 b' test deprecated option is hidden in comm' | |||||
832 |
|
834 | |||
833 | (some details hidden, use --verbose to show complete help) |
|
835 | (some details hidden, use --verbose to show complete help) | |
834 |
|
836 | |||
835 | test deprecated option is shown with -v |
|
837 | $ hg help debugoptEXP | |
|
838 | hg debugoptEXP | |||
|
839 | ||||
|
840 | (no help text available) | |||
|
841 | ||||
|
842 | options: | |||
|
843 | ||||
|
844 | (some details hidden, use --verbose to show complete help) | |||
|
845 | ||||
|
846 | test deprecated and experimental options is shown with -v | |||
836 | $ hg help -v debugoptDEP | grep dopt |
|
847 | $ hg help -v debugoptDEP | grep dopt | |
837 | --dopt option is DEPRECATED |
|
848 | --dopt option is DEPRECATED | |
|
849 | $ hg help -v debugoptEXP | grep eopt | |||
|
850 | --eopt option is EXPERIMENTAL | |||
838 |
|
851 | |||
839 | #if gettext |
|
852 | #if gettext | |
840 | test deprecated option is hidden with translation with untranslated description |
|
853 | test deprecated option is hidden with translation with untranslated description |
General Comments 0
You need to be logged in to leave comments.
Login now