Mercurial > hg-stable
changeset 26369:4799b5c4aaf4
help: define list of keywords that should be excluded from non-verbose output
This list will be reused by the other deprecated/experimental handling.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Sep 2015 11:25:38 +0900 |
parents | 0224d22ef5d8 |
children | 44cc9f63a2f1 |
files | mercurial/help.py |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/help.py Fri Sep 25 23:10:47 2015 -0500 +++ b/mercurial/help.py Sat Sep 26 11:25:38 2015 +0900 @@ -14,6 +14,13 @@ import cmdutil import hgweb.webcommands as webcommands +_exclkeywords = [ + "DEPRECATED", + "EXPERIMENTAL", + _("DEPRECATED"), + _("EXPERIMENTAL"), + ] + def listexts(header, exts, indent=1, showdeprecated=False): '''return a text listing of the given extensions''' rst = [] @@ -43,9 +50,7 @@ shortopt, longopt, default, desc = option optlabel = _("VALUE") # default label - if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc or - "EXPERIMENTAL" in desc or - _("EXPERIMENTAL") in desc): + if not verbose and any(w in desc for w in _exclkeywords): continue so = ''