Mercurial > hg > mercurial-source
diff mercurial/help.py @ 27791:7625f6387fc4
help: make listexts less confusing for deprecated exts
Return an empty array instead of a heading and no items
author | timeless <timeless@mozdev.org> |
---|---|
date | Mon, 30 Nov 2015 20:44:22 +0000 (2015-11-30) |
parents | 7a77ee434179 |
children | ac27b1b3be85 |
line wrap: on
line diff
--- a/mercurial/help.py +++ b/mercurial/help.py @@ -27,11 +27,12 @@ '''return a text listing of the given extensions''' rst = [] if exts: - rst.append('\n%s\n\n' % header) for name, desc in sorted(exts.iteritems()): if not showdeprecated and any(w in desc for w in _exclkeywords): continue rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) + if rst: + rst.insert(0, '\n%s\n\n' % header) return rst def extshelp(ui):