# HG changeset patch # User Yuya Nishihara # Date 2015-09-26 02:50:47 # Node ID 51b309ce6c7dcee7959c5930270c014285c24e1f # Parent 44cc9f63a2f17220a9f1e65dfdfa1e3e571b1284 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. diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -29,7 +29,7 @@ def listexts(header, exts, indent=1, sho 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 @@ def help_(ui, name, unknowncmd=False, fu 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: