Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.py @ 31097: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 | 71f692f1f678 |
comparison
equal
deleted
inserted
replaced
31096:873ebdd6e84d | 31097:6918c9215201 |
---|---|
31 ) | 31 ) |
32 from .hgweb import ( | 32 from .hgweb import ( |
33 webcommands, | 33 webcommands, |
34 ) | 34 ) |
35 | 35 |
36 _exclkeywords = [ | 36 _exclkeywords = set([ |
37 "(ADVANCED)", | |
37 "(DEPRECATED)", | 38 "(DEPRECATED)", |
38 "(EXPERIMENTAL)", | 39 "(EXPERIMENTAL)", |
40 # i18n: "(ADVANCED)" is a keyword, must be translated consistently | |
41 _("(ADVANCED)"), | |
39 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently | 42 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently |
40 _("(DEPRECATED)"), | 43 _("(DEPRECATED)"), |
41 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently | 44 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently |
42 _("(EXPERIMENTAL)"), | 45 _("(EXPERIMENTAL)"), |
43 ] | 46 ]) |
44 | 47 |
45 def listexts(header, exts, indent=1, showdeprecated=False): | 48 def listexts(header, exts, indent=1, showdeprecated=False): |
46 '''return a text listing of the given extensions''' | 49 '''return a text listing of the given extensions''' |
47 rst = [] | 50 rst = [] |
48 if exts: | 51 if exts: |