##// END OF EJS Templates
commands: add example for 'hg add'
Mathias De Maré -
r27143:fab21bac default
parent child Browse files
Show More
@@ -190,17 +190,31 b' def add(ui, repo, *pats, **opts):'
190 190
191 191 .. container:: verbose
192 192
193 An example showing how new (unknown) files are added
194 automatically by :hg:`add`::
195
196 $ ls
197 foo.c
198 $ hg status
199 ? foo.c
200 $ hg add
201 adding foo.c
202 $ hg status
203 A foo.c
193 Examples:
194
195 - New (unknown) files are added
196 automatically by :hg:`add`::
197
198 $ ls
199 foo.c
200 $ hg status
201 ? foo.c
202 $ hg add
203 adding foo.c
204 $ hg status
205 A foo.c
206
207 - Specific files to be added can be specified::
208
209 $ ls
210 bar.c foo.c
211 $ hg status
212 ? bar.c
213 ? foo.c
214 $ hg add bar.c
215 $ hg status
216 A bar.c
217 ? foo.c
204 218
205 219 Returns 0 if all files are successfully added.
206 220 """
@@ -372,17 +372,30 b' Verbose help for add'
372 372
373 373 If no names are given, add all files to the repository.
374 374
375 An example showing how new (unknown) files are added automatically by "hg
376 add":
375 Examples:
376
377 - New (unknown) files are added automatically by "hg add":
377 378
378 $ ls
379 foo.c
380 $ hg status
381 ? foo.c
382 $ hg add
383 adding foo.c
384 $ hg status
385 A foo.c
379 $ ls
380 foo.c
381 $ hg status
382 ? foo.c
383 $ hg add
384 adding foo.c
385 $ hg status
386 A foo.c
387
388 - Specific files to be added can be specified:
389
390 $ ls
391 bar.c foo.c
392 $ hg status
393 ? bar.c
394 ? foo.c
395 $ hg add bar.c
396 $ hg status
397 A bar.c
398 ? foo.c
386 399
387 400 Returns 0 if all files are successfully added.
388 401
@@ -1995,9 +2008,10 b' Dish up an empty repo; serve it cold.'
1995 2008 If no names are given, add all files to the repository.
1996 2009 </p>
1997 2010 <p>
1998 An example showing how new (unknown) files are added
1999 automatically by &quot;hg add&quot;:
2011 Examples:
2000 2012 </p>
2013 <ul>
2014 <li> New (unknown) files are added automatically by &quot;hg add&quot;:
2001 2015 <pre>
2002 2016 \$ ls (re)
2003 2017 foo.c
@@ -2008,6 +2022,19 b' Dish up an empty repo; serve it cold.'
2008 2022 \$ hg status (re)
2009 2023 A foo.c
2010 2024 </pre>
2025 <li> Specific files to be added can be specified:
2026 <pre>
2027 \$ ls (re)
2028 bar.c foo.c
2029 \$ hg status (re)
2030 ? bar.c
2031 ? foo.c
2032 \$ hg add bar.c (re)
2033 \$ hg status (re)
2034 A bar.c
2035 ? foo.c
2036 </pre>
2037 </ul>
2011 2038 <p>
2012 2039 Returns 0 if all files are successfully added.
2013 2040 </p>
General Comments 0
You need to be logged in to leave comments. Login now