# HG changeset patch # User Dirkjan Ochtman # Date 1224341403 -7200 # Node ID 4a1ac535be1df014a419af812c755613bf9ad266 # Parent 63579aa36c8e71690f6ede4195263934a9194345 show enabled extensions in hg help diff -r 63579aa36c8e -r 4a1ac535be1d mercurial/commands.py --- a/mercurial/commands.py Sat Oct 18 16:09:07 2008 +0200 +++ b/mercurial/commands.py Sat Oct 18 16:50:03 2008 +0200 @@ -1335,6 +1335,19 @@ 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 -r 63579aa36c8e -r 4a1ac535be1d tests/test-extension.out --- a/tests/test-extension.out Sat Oct 18 16:09:07 2008 +0200 +++ b/tests/test-extension.out Sat Oct 18 16:50:03 2008 +0200 @@ -33,6 +33,10 @@ debugfoobar: yet another debug command +enabled extensions: + + debugextension only debugcommands + special help topics: dates Date Formats patterns File Name Patterns diff -r 63579aa36c8e -r 4a1ac535be1d tests/test-keyword.out --- a/tests/test-keyword.out Sat Oct 18 16:09:07 2008 +0200 +++ b/tests/test-keyword.out Sat Oct 18 16:50:03 2008 +0200 @@ -51,6 +51,12 @@ 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 -r 63579aa36c8e -r 4a1ac535be1d tests/test-mq.out --- a/tests/test-mq.out Sat Oct 18 16:09:07 2008 +0200 +++ b/tests/test-mq.out Sat Oct 18 16:50:03 2008 +0200 @@ -51,6 +51,10 @@ 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 -r 63579aa36c8e -r 4a1ac535be1d tests/test-qrecord.out --- a/tests/test-qrecord.out Sat Oct 18 16:09:07 2008 +0200 +++ b/tests/test-qrecord.out Sat Oct 18 16:50:03 2008 +0200 @@ -21,6 +21,10 @@ 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]...