changeset 27660:512f883c234c

mercurial: pass ui to extensions.load (issue5007) extensions.load does need ui argument to print error if an extension fails to load.
author Jun Wu <quark@fb.com>
date Thu, 17 Dec 2015 10:30:17 +0000
parents abc91688fa2c
children abc79f44f548
files doc/gendoc.py mercurial/help.py
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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