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.
--- 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('^')