# HG changeset patch # User Dirkjan Ochtman # Date 2008-10-21 09:29:27 # Node ID f60730693efc7ab107b666394015818b8f4d3022 # Parent 3f6a4f1de43f1aa96dc869d9471750754777b761 help: show extension commands in short list, separate extension list in help In 'hg', we now show a short list of commands, including extension commands. In 'hg help', we show core commands, a list of enabled extensions, and topics. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1310,7 +1310,8 @@ def help_(ui, name=None, with_version=Fa f = c.split("|", 1)[0] if select and not select(f): continue - if select is None and e[0].__module__ != __name__: + if (not select and name != 'shortlist' and + e[0].__module__ != __name__): continue if name == "shortlist" and not f.startswith("^"): continue @@ -1338,7 +1339,7 @@ def help_(ui, name=None, with_version=Fa ui.write(' %-*s %s\n' % (m, f, h[f])) exts = list(extensions.extensions()) - if exts: + if exts and name != 'shortlist': ui.write(_('\nenabled extensions:\n\n')) maxlength = 0 exthelps = [] diff --git a/tests/test-extension.out b/tests/test-extension.out --- a/tests/test-extension.out +++ b/tests/test-extension.out @@ -37,13 +37,6 @@ enabled extensions: debugextension only debugcommands -special help topics: - dates Date Formats - patterns File Name Patterns - environment, env Environment Variables - revs, revisions Specifying Single Revisions - mrevs, multirevs Specifying Multiple Revisions - global options: -R --repository repository root directory or symbolic path name --cwd change working directory diff --git a/tests/test-globalopts.out b/tests/test-globalopts.out --- a/tests/test-globalopts.out +++ b/tests/test-globalopts.out @@ -198,6 +198,14 @@ list of commands: verify verify the integrity of the repository version output version and copyright information +special help topics: + + dates Date Formats + patterns File Name Patterns + environment Environment Variables + revisions Specifying Single Revisions + multirevs Specifying Multiple Revisions + use "hg -v help" to show aliases and global options Mercurial Distributed SCM @@ -252,5 +260,13 @@ list of commands: verify verify the integrity of the repository version output version and copyright information +special help topics: + + dates Date Formats + patterns File Name Patterns + environment Environment Variables + revisions Specifying Single Revisions + multirevs Specifying Multiple Revisions + use "hg -v help" to show aliases and global options %% not tested: --debugger diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -89,6 +89,14 @@ list of commands: verify verify the integrity of the repository version output version and copyright information +special help topics: + + dates Date Formats + patterns File Name Patterns + environment Environment Variables + revisions Specifying Single Revisions + multirevs Specifying Multiple Revisions + use "hg -v help" to show aliases and global options add add the specified files on the next commit addremove add all new files, delete all missing files @@ -138,6 +146,14 @@ use "hg -v help" to show aliases and glo update update working directory verify verify the integrity of the repository version output version and copyright information + +special help topics: + + dates Date Formats + patterns File Name Patterns + environment Environment Variables + revisions Specifying Single Revisions + multirevs Specifying Multiple Revisions hg add [OPTION]... [FILE]... add the specified files on the next commit diff --git a/tests/test-qrecord.out b/tests/test-qrecord.out --- a/tests/test-qrecord.out +++ b/tests/test-qrecord.out @@ -21,10 +21,6 @@ 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]...