comparison 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
comparison
equal deleted inserted replaced
38018:b45f4c1532c0 38019:6e526b0961a8
572 rst.append(_("(use 'hg help extensions' for information on enabling" 572 rst.append(_("(use 'hg help extensions' for information on enabling"
573 " extensions)\n")) 573 " extensions)\n"))
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,
583 showdeprecated=True) 583 showdeprecated=True)
584 rst.append('\n') 584 rst.append('\n')