# HG changeset patch # User timeless # Date 2015-11-30 20:44:22 # Node ID 7625f6387fc4984a005741acea8b9166421b9dd9 # Parent 88aaddb1af8844cff77cc6cabc611003771ec7cd help: make listexts less confusing for deprecated exts Return an empty array instead of a heading and no items diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -27,11 +27,12 @@ def listexts(header, exts, indent=1, sho '''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):