diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1335,6 +1335,19 @@ def help_(ui, name=None, with_version=Fa else: ui.write(' %-*s %s\n' % (m, f, h[f])) + exts = list(extensions.extensions()) + if exts: + ui.write(_('\nenabled extensions:\n\n')) + maxlength = 0 + exthelps = [] + for ename, ext in exts: + doc = (ext.__doc__ or _('(no help text available)')) + ename = ename.split('.')[-1] + maxlength = max(len(ename), maxlength) + exthelps.append((ename, doc.splitlines(0)[0].strip())) + for ename, text in exthelps: + ui.write(_(' %s %s\n') % (ename.ljust(maxlength), text)) + if not ui.quiet: addglobalopts(True) diff --git a/tests/test-extension.out b/tests/test-extension.out --- a/tests/test-extension.out +++ b/tests/test-extension.out @@ -33,6 +33,10 @@ list of commands: debugfoobar: yet another debug command +enabled extensions: + + debugextension only debugcommands + special help topics: dates Date Formats patterns File Name Patterns diff --git a/tests/test-keyword.out b/tests/test-keyword.out --- a/tests/test-keyword.out +++ b/tests/test-keyword.out @@ -51,6 +51,12 @@ list of commands: kwfiles print files currently configured for keyword expansion kwshrink revert expanded keywords in working directory +enabled extensions: + + keyword keyword expansion in local repositories + mq patch management and development + notify (no help text available) + use "hg -v help keyword" to show aliases and global options % hg kwdemo [extensions] diff --git a/tests/test-mq.out b/tests/test-mq.out --- a/tests/test-mq.out +++ b/tests/test-mq.out @@ -51,6 +51,10 @@ list of commands: qunapplied print the patches not yet applied strip strip a revision and all its descendants from the repository +enabled extensions: + + mq patch management and development + use "hg -v help mq" to show aliases and global options adding a updating working directory diff --git a/tests/test-qrecord.out b/tests/test-qrecord.out --- a/tests/test-qrecord.out +++ b/tests/test-qrecord.out @@ -21,6 +21,10 @@ basic commands: status show changed files in the working directory update update working directory +enabled extensions: + + record interactive change selection during commit or qrefresh + use "hg help" for the full list of commands or "hg -v" for details % help (mq present) hg qrecord [OPTION]... PATCH [FILE]...