Mercurial > hg
diff mercurial/help.py @ 26415:46af0adb5c37
help: hide deprecated filesets, revsets and template items if not verbose
This allows us to hide {branches} template keyword in a better way. Currently
it is achieved by copying keywords table and deleting 'branches' from it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Sep 2015 12:17:44 +0900 |
parents | c44b507e7c78 |
children | a2291c9c85a1 |
line wrap: on
line diff
--- a/mercurial/help.py Sat Sep 26 12:11:46 2015 +0900 +++ b/mercurial/help.py Sat Sep 26 12:17:44 2015 +0900 @@ -191,7 +191,8 @@ entries = [] for name in sorted(items): text = (items[name].__doc__ or '').rstrip() - if not text: + if (not text + or not ui.verbose and any(w in text for w in _exclkeywords)): continue text = gettext(text) if dedent: