diff mercurial/help.py @ 38019:6e526b0961a8

help: load module doc of disabled extension in extensions.disabledcmd() This helps rewriting _finddisablecmd() to not load the module.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 03 May 2018 18:22:02 +0900
parents 6890b7e991a4
children 5fa4e29ba3e3
line wrap: on
line diff
--- a/mercurial/help.py	Thu May 03 18:15:43 2018 +0900
+++ b/mercurial/help.py	Thu May 03 18:22:02 2018 +0900
@@ -574,9 +574,9 @@
         return rst
 
     def helpextcmd(name, subtopic=None):
-        cmd, ext, mod = extensions.disabledcmd(ui, name,
+        cmd, ext, doc = extensions.disabledcmd(ui, name,
                                                ui.configbool('ui', 'strict'))
-        doc = gettext(pycompat.getdoc(mod)).splitlines()[0]
+        doc = doc.splitlines()[0]
 
         rst = listexts(_("'%s' is provided by the following "
                               "extension:") % cmd, {ext: doc}, indent=4,