##// END OF EJS Templates
help: filter out deprecated options with untranslated descriptions...
Simon Heimberg -
r20743:05267e6e default
parent child Browse files
Show More
@@ -41,7 +41,7 b' def optrst(options, verbose):'
41 41 shortopt, longopt, default, desc = option
42 42 optlabel = _("VALUE") # default label
43 43
44 if _("DEPRECATED") in desc and not verbose:
44 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc):
45 45 continue
46 46
47 47 so = ''
@@ -649,6 +649,7 b' Test command without options'
649 649 use "hg help" for the full list of commands or "hg -v" for details
650 650 [255]
651 651
652
652 653 $ cat > helpext.py <<EOF
653 654 > import os
654 655 > from mercurial import commands
@@ -657,6 +658,7 b' Test command without options'
657 658 > pass
658 659 >
659 660 > cmdtable = {
661 > "debugoptDEP": (nohelp, [('', 'dopt', None, 'option is DEPRECATED')],),
660 662 > "nohelp": (nohelp, [('', 'longdesc', 3, 'x'*90),
661 663 > ('n', '', None, 'normal desc'),
662 664 > ('', 'newline', '', 'line1\nline2'),
@@ -792,6 +794,33 b' Test list of commands with command with '
792 794
793 795 use "hg -v help helpext" to show builtin aliases and global options
794 796
797
798 test deprecated option is hidden in command help
799 $ hg help debugoptDEP
800 hg debugoptDEP
801
802 (no help text available)
803
804 options:
805
806 use "hg -v help debugoptDEP" to show the global options
807
808 test deprecated option is shown with -v
809 $ hg help -v debugoptDEP | grep dopt
810 --dopt option is DEPRECATED
811
812 test deprecated option is hidden with translation with untranslated description
813 (use many globy for not failing on changed transaction)
814 $ LANGUAGE=sv hg help debugoptDEP
815 hg debugoptDEP
816
817 (*) (glob)
818
819 flaggor:
820
821 *"hg -v help debugoptDEP"* (glob)
822
823
795 824 Test a help topic
796 825
797 826 $ hg help revs
General Comments 0
You need to be logged in to leave comments. Login now