##// END OF EJS Templates
help: load module doc of disabled extension in extensions.disabledcmd()...
Yuya Nishihara -
r37996:6e526b09 default
parent child Browse files
Show More
@@ -675,11 +675,12 b' def _finddisabledcmd(ui, cmd, name, path'
675 break
675 break
676 else:
676 else:
677 cmd = aliases[0]
677 cmd = aliases[0]
678 return (cmd, name, mod)
678 doc = gettext(pycompat.getdoc(mod))
679 return (cmd, name, doc)
679
680
680 def disabledcmd(ui, cmd, strict=False):
681 def disabledcmd(ui, cmd, strict=False):
681 '''import disabled extensions until cmd is found.
682 '''import disabled extensions until cmd is found.
682 returns (cmdname, extname, module)'''
683 returns (cmdname, extname, doc)'''
683
684
684 paths = _disabledpaths(strip_init=True)
685 paths = _disabledpaths(strip_init=True)
685 if not paths:
686 if not paths:
@@ -574,9 +574,9 b' def help_(ui, commands, name, unknowncmd'
574 return rst
574 return rst
575
575
576 def helpextcmd(name, subtopic=None):
576 def helpextcmd(name, subtopic=None):
577 cmd, ext, mod = extensions.disabledcmd(ui, name,
577 cmd, ext, doc = extensions.disabledcmd(ui, name,
578 ui.configbool('ui', 'strict'))
578 ui.configbool('ui', 'strict'))
579 doc = gettext(pycompat.getdoc(mod)).splitlines()[0]
579 doc = doc.splitlines()[0]
580
580
581 rst = listexts(_("'%s' is provided by the following "
581 rst = listexts(_("'%s' is provided by the following "
582 "extension:") % cmd, {ext: doc}, indent=4,
582 "extension:") % cmd, {ext: doc}, indent=4,
General Comments 0
You need to be logged in to leave comments. Login now