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.
This commit is contained in:
Dirkjan Ochtman 2008-10-21 11:29:27 +02:00
parent 12d9da5e35
commit 896a6939aa
5 changed files with 35 additions and 13 deletions

View File

@ -1310,7 +1310,8 @@ def help_(ui, name=None, with_version=False):
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=False):
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 = []

View File

@ -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

View File

@ -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

View File

@ -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 global options
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

View File

@ -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]...