# HG changeset patch # User Martin Geisler # Date 1266083059 -3600 # Node ID a565a2445eb5cf0b9b8cbd9d01cbcd9e25598977 # Parent 8b45102934e2b2277b60725fd594e10384d3f37c commands: add verbose example to help text for add diff -r 8b45102934e2 -r a565a2445eb5 mercurial/commands.py --- 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 = [] diff -r 8b45102934e2 -r a565a2445eb5 tests/test-help --- 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)/' diff -r 8b45102934e2 -r a565a2445eb5 tests/test-help.out --- 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