Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.py @ 22113:2d2cb5e50095
help: normalize hint about enabling extensions
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 12 Aug 2014 03:18:50 -0500 |
parents | d968f4741a22 |
children | 3ba1d7ca3dfd |
comparison
equal
deleted
inserted
replaced
22112:d968f4741a22 | 22113:2d2cb5e50095 |
---|---|
447 except AttributeError: | 447 except AttributeError: |
448 ct = {} | 448 ct = {} |
449 modcmds = set([c.split('|', 1)[0] for c in ct]) | 449 modcmds = set([c.split('|', 1)[0] for c in ct]) |
450 rst.extend(helplist(modcmds.__contains__)) | 450 rst.extend(helplist(modcmds.__contains__)) |
451 else: | 451 else: |
452 rst.append(_('use "hg help extensions" for information on enabling ' | 452 rst.append(_('(use "hg help extensions" for information on enabling' |
453 'extensions\n')) | 453 ' extensions)\n')) |
454 return rst | 454 return rst |
455 | 455 |
456 def helpextcmd(name): | 456 def helpextcmd(name): |
457 cmd, ext, mod = extensions.disabledcmd(ui, name, | 457 cmd, ext, mod = extensions.disabledcmd(ui, name, |
458 ui.configbool('ui', 'strict')) | 458 ui.configbool('ui', 'strict')) |
459 doc = gettext(mod.__doc__).splitlines()[0] | 459 doc = gettext(mod.__doc__).splitlines()[0] |
460 | 460 |
461 rst = listexts(_("'%s' is provided by the following " | 461 rst = listexts(_("'%s' is provided by the following " |
462 "extension:") % cmd, {ext: doc}, indent=4) | 462 "extension:") % cmd, {ext: doc}, indent=4) |
463 rst.append('\n') | 463 rst.append('\n') |
464 rst.append(_('use "hg help extensions" for information on enabling ' | 464 rst.append(_('(use "hg help extensions" for information on enabling ' |
465 'extensions\n')) | 465 'extensions)\n')) |
466 return rst | 466 return rst |
467 | 467 |
468 | 468 |
469 rst = [] | 469 rst = [] |
470 kw = opts.get('keyword') | 470 kw = opts.get('keyword') |