##// 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 675 break
676 676 else:
677 677 cmd = aliases[0]
678 return (cmd, name, mod)
678 doc = gettext(pycompat.getdoc(mod))
679 return (cmd, name, doc)
679 680
680 681 def disabledcmd(ui, cmd, strict=False):
681 682 '''import disabled extensions until cmd is found.
682 returns (cmdname, extname, module)'''
683 returns (cmdname, extname, doc)'''
683 684
684 685 paths = _disabledpaths(strip_init=True)
685 686 if not paths:
@@ -574,9 +574,9 b' def help_(ui, commands, name, unknowncmd'
574 574 return rst
575 575
576 576 def helpextcmd(name, subtopic=None):
577 cmd, ext, mod = extensions.disabledcmd(ui, name,
577 cmd, ext, doc = extensions.disabledcmd(ui, name,
578 578 ui.configbool('ui', 'strict'))
579 doc = gettext(pycompat.getdoc(mod)).splitlines()[0]
579 doc = doc.splitlines()[0]
580 580
581 581 rst = listexts(_("'%s' is provided by the following "
582 582 "extension:") % cmd, {ext: doc}, indent=4,
General Comments 0
You need to be logged in to leave comments. Login now