Mercurial > hg-stable
changeset 28058:ff6e8dc659f8
help: don't crash in keyword search if an extension fails to provide docs
Not all external extensions provide docs; if you use such an extension, you
will experience a crash if you use "hg help --keyword <word>", and <word>
happens to match the extension name.
author | Simon Farnsworth <simonfar@fb.com> |
---|---|
date | Wed, 10 Feb 2016 01:48:58 -0800 |
parents | 92e8e3f20a6f |
children | 740208f6f6af |
files | mercurial/help.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/help.py Fri Jan 29 14:35:34 2016 +0000 +++ b/mercurial/help.py Wed Feb 10 01:48:58 2016 -0800 @@ -149,6 +149,8 @@ for name, docs in itertools.chain( extensions.enabled(False).iteritems(), extensions.disabled().iteritems()): + if not docs: + continue mod = extensions.load(ui, name, '') name = name.rpartition('.')[-1] if lowercontains(name) or lowercontains(docs):