Mercurial > hg
changeset 10446:a565a2445eb5
commands: add verbose example to help text for add
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 13 Feb 2010 18:44:19 +0100 |
parents | 8b45102934e2 |
children | e957cc7cbd14 |
files | mercurial/commands.py tests/test-help tests/test-help.out |
diffstat | 3 files changed, 67 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Feb 13 18:36:24 2010 +0100 +++ b/mercurial/commands.py Sat Feb 13 18:44:19 2010 +0100 @@ -28,6 +28,19 @@ undo an add before that, see hg forget. If no names are given, add all files to the repository. + + .. container:: verbose + + An example showing how new (unknown) files are added + automatically by ``hg add``:: + + $ ls + foo.c + $ hg status + ? foo.c + $ hg add + adding foo.c + $ hg status """ bad = []
--- a/tests/test-help Sat Feb 13 18:36:24 2010 +0100 +++ b/tests/test-help Sat Feb 13 18:44:19 2010 +0100 @@ -10,6 +10,9 @@ hg add -h +echo %% verbose help for add +hg add -hv + echo %% test help option with version option hg add -h --version | sed 's/[(]version [^)]*[)]/(version xxx)/'
--- a/tests/test-help.out Sat Feb 13 18:36:24 2010 +0100 +++ b/tests/test-help.out Sat Feb 13 18:44:19 2010 +0100 @@ -243,6 +243,8 @@ If no names are given, add all files to the repository. +use "hg -v help add" to show verbose help + options: -I --include include names matching the given patterns @@ -250,6 +252,51 @@ -n --dry-run do not perform actions, just print output use "hg -v help add" to show global options +%% verbose help for add +hg add [OPTION]... [FILE]... + +add the specified files on the next commit + + Schedule files to be version controlled and added to the repository. + + The files will be added to the repository at the next commit. To undo an + add before that, see hg forget. + + If no names are given, add all files to the repository. + + An example showing how new (unknown) files are added automatically by "hg + add": + + $ ls + foo.c + $ hg status + ? foo.c + $ hg add + adding foo.c + $ hg status + +options: + + -I --include include names matching the given patterns + -X --exclude exclude names matching the given patterns + -n --dry-run do not perform actions, just print output + +global options: + -R --repository repository root directory or name of overlay bundle file + --cwd change working directory + -y --noninteractive do not prompt, assume 'yes' for any required answers + -q --quiet suppress output + -v --verbose enable additional output + --config set/override config option + --debug enable debugging output + --debugger start debugger + --encoding set the charset encoding (default: ascii) + --encodingmode set the charset encoding mode (default: strict) + --traceback always print a traceback on exception + --time time how long the command takes + --profile print command execution profile + --version output version information and exit + -h --help display help and exit %% test help option with version option Mercurial Distributed SCM (version xxx) @@ -268,6 +315,8 @@ If no names are given, add all files to the repository. +use "hg -v help add" to show verbose help + options: -I --include include names matching the given patterns @@ -287,6 +336,8 @@ If no names are given, add all files to the repository. +use "hg -v help add" to show verbose help + options: -I --include include names matching the given patterns