Mercurial > hg
changeset 26371:51b309ce6c7d
help: unify handling of DEPRECATED/EXPERIMENTAL keywords
This fixes listexts() to exclude translated "(DEPRECATED)" marker correctly.
On the other hand, help_() doesn't need translated keywords, but I don't think
it's worth to separate untranslated keywords just for it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Sep 2015 11:50:47 +0900 |
parents | 44cc9f63a2f1 |
children | 55de800937e0 |
files | mercurial/help.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/help.py Sat Sep 26 11:38:39 2015 +0900 +++ b/mercurial/help.py Sat Sep 26 11:50:47 2015 +0900 @@ -29,7 +29,7 @@ if exts: rst.append('\n%s\n\n' % header) for name, desc in sorted(exts.iteritems()): - if '(DEPRECATED)' in desc and not showdeprecated: + if not showdeprecated and any(w in desc for w in _exclkeywords): continue rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) return rst @@ -341,7 +341,7 @@ if not ui.debugflag and f.startswith("debug") and name != "debug": continue doc = e[0].__doc__ - if doc and '(DEPRECATED)' in doc and not ui.verbose: + if not ui.verbose and doc and any(w in doc for w in _exclkeywords): continue doc = gettext(doc) if not doc: