Mercurial > hg
changeset 34912:1e2454b60e59 stable 4.4-rc
help: do not abort topicmatch() because of unimportable extensions
This is alternative workaround to D1198, originally spotted by the earlier
version of the releasenotes extension.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 05 Aug 2017 23:15:37 +0900 |
parents | 645b6684cf5b |
children | 8d9ba492e807 |
files | mercurial/help.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/help.py Fri Oct 20 22:25:09 2017 +0900 +++ b/mercurial/help.py Sat Aug 05 23:15:37 2017 +0900 @@ -158,11 +158,15 @@ extensions.disabled().iteritems()): if not docs: continue - mod = extensions.load(ui, name, '') name = name.rpartition('.')[-1] if lowercontains(name) or lowercontains(docs): # extension docs are already translated results['extensions'].append((name, docs.splitlines()[0])) + try: + mod = extensions.load(ui, name, '') + except ImportError: + # debug message would be printed in extensions.load() + continue for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): cmdname = cmd.partition('|')[0].lstrip('^')