mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
commands: add example for 'hg add'
This commit is contained in:
parent
2afb6aff3e
commit
ef88a42655
@ -190,17 +190,31 @@ def add(ui, repo, *pats, **opts):
|
||||
|
||||
.. container:: verbose
|
||||
|
||||
An example showing how new (unknown) files are added
|
||||
automatically by :hg:`add`::
|
||||
Examples:
|
||||
|
||||
$ ls
|
||||
foo.c
|
||||
$ hg status
|
||||
? foo.c
|
||||
$ hg add
|
||||
adding foo.c
|
||||
$ hg status
|
||||
A foo.c
|
||||
- New (unknown) files are added
|
||||
automatically by :hg:`add`::
|
||||
|
||||
$ ls
|
||||
foo.c
|
||||
$ hg status
|
||||
? foo.c
|
||||
$ hg add
|
||||
adding foo.c
|
||||
$ hg status
|
||||
A foo.c
|
||||
|
||||
- Specific files to be added can be specified::
|
||||
|
||||
$ ls
|
||||
bar.c foo.c
|
||||
$ hg status
|
||||
? bar.c
|
||||
? foo.c
|
||||
$ hg add bar.c
|
||||
$ hg status
|
||||
A bar.c
|
||||
? foo.c
|
||||
|
||||
Returns 0 if all files are successfully added.
|
||||
"""
|
||||
|
@ -372,17 +372,30 @@ Verbose help for add
|
||||
|
||||
If no names are given, add all files to the repository.
|
||||
|
||||
An example showing how new (unknown) files are added automatically by "hg
|
||||
add":
|
||||
Examples:
|
||||
|
||||
$ ls
|
||||
foo.c
|
||||
$ hg status
|
||||
? foo.c
|
||||
$ hg add
|
||||
adding foo.c
|
||||
$ hg status
|
||||
A foo.c
|
||||
- New (unknown) files are added automatically by "hg add":
|
||||
|
||||
$ ls
|
||||
foo.c
|
||||
$ hg status
|
||||
? foo.c
|
||||
$ hg add
|
||||
adding foo.c
|
||||
$ hg status
|
||||
A foo.c
|
||||
|
||||
- Specific files to be added can be specified:
|
||||
|
||||
$ ls
|
||||
bar.c foo.c
|
||||
$ hg status
|
||||
? bar.c
|
||||
? foo.c
|
||||
$ hg add bar.c
|
||||
$ hg status
|
||||
A bar.c
|
||||
? foo.c
|
||||
|
||||
Returns 0 if all files are successfully added.
|
||||
|
||||
@ -1995,9 +2008,10 @@ Dish up an empty repo; serve it cold.
|
||||
If no names are given, add all files to the repository.
|
||||
</p>
|
||||
<p>
|
||||
An example showing how new (unknown) files are added
|
||||
automatically by "hg add":
|
||||
Examples:
|
||||
</p>
|
||||
<ul>
|
||||
<li> New (unknown) files are added automatically by "hg add":
|
||||
<pre>
|
||||
\$ ls (re)
|
||||
foo.c
|
||||
@ -2008,6 +2022,19 @@ Dish up an empty repo; serve it cold.
|
||||
\$ hg status (re)
|
||||
A foo.c
|
||||
</pre>
|
||||
<li> Specific files to be added can be specified:
|
||||
<pre>
|
||||
\$ ls (re)
|
||||
bar.c foo.c
|
||||
\$ hg status (re)
|
||||
? bar.c
|
||||
? foo.c
|
||||
\$ hg add bar.c (re)
|
||||
\$ hg status (re)
|
||||
A bar.c
|
||||
? foo.c
|
||||
</pre>
|
||||
</ul>
|
||||
<p>
|
||||
Returns 0 if all files are successfully added.
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user