mercurial: pass ui to extensions.load (
issue5007)
extensions.load does need ui argument to print error if an extension
fails to load.
--- a/doc/gendoc.py Mon Jan 04 21:54:46 2016 -0800
+++ b/doc/gendoc.py Thu Dec 17 10:30:17 2015 +0000
@@ -110,7 +110,7 @@
" :depth: 1\n\n")
for extensionname in sorted(allextensionnames()):
- mod = extensions.load(None, extensionname, None)
+ mod = extensions.load(ui, extensionname, None)
ui.write(minirst.subsection(extensionname))
ui.write("%s\n\n" % gettext(mod.__doc__))
cmdtable = getattr(mod, 'cmdtable', None)
--- a/mercurial/help.py Mon Jan 04 21:54:46 2016 -0800
+++ b/mercurial/help.py Thu Dec 17 10:30:17 2015 +0000
@@ -149,8 +149,7 @@
for name, docs in itertools.chain(
extensions.enabled(False).iteritems(),
extensions.disabled().iteritems()):
- # extensions.load ignores the UI argument
- mod = extensions.load(None, name, '')
+ mod = extensions.load(ui, name, '')
name = name.rpartition('.')[-1]
if lowercontains(name) or lowercontains(docs):
# extension docs are already translated