Fossil SCM

Online help for the first few commands edited - to help with very long explanations, the command is summarised at the end for those who just want to check the precise options

Arjen Markus 2011-04-13 10:23 trunk
Commit 1f851f846733f1b7531033b788580b5401686e13
2 files changed +38 -21 +7 -7
+38 -21
--- src/add.c
+++ src/add.c
@@ -212,21 +212,27 @@
212212
}
213213
214214
/*
215215
** COMMAND: add
216216
**
217
-** Usage: %fossil add FILE...
218
-**
219
-** Make arrangements to add one or more files to the current checkout
220
-** at the next commit.
221
-**
222
-** When adding files recursively, filenames that begin with "." are
223
-** excluded by default. To include such files, add the "--dotfiles"
224
-** option to the command-line.
225
-**
226
-** The --ignore option overrides the "ignore-glob" setting. See
227
-** documentation on the "setting" command for further information.
217
+** Usage: %fossil add ?OPTIONS? FILE1 ?FILE2 ...?
218
+**
219
+** Make arrangements to add one or more files or directories to the
220
+** current checkout at the next commit.
221
+**
222
+** When adding files or directories recursively, filenames that begin
223
+** with "." are excluded by default. To include such files, add
224
+** the "--dotfiles" option to the command-line.
225
+**
226
+** The --ignore option specifies the patterns for files to be excluded,
227
+** like *.o,*.obj,*.exe. If not specified, the "ignore-glob" setting is
228
+** used. See ** documentation on the "settings" command for further
229
+** information.
230
+**
231
+**
232
+** SUMMARY: fossil add ?OPTIONS? FILE1 ?FILE2 ...?
233
+** Options: --dotfiles, --ignore
228234
*/
229235
void add_cmd(void){
230236
int i;
231237
int vid;
232238
const char *zIgnoreFlag;
@@ -340,18 +346,21 @@
340346
341347
/*
342348
** COMMAND: rm
343349
** COMMAND: delete
344350
**
345
-** Usage: %fossil rm FILE...
346
-** or: %fossil delete FILE...
351
+** Usage: %fossil rm FILE1 ?FILE2 ...?
352
+** or: %fossil delete FILE1 ?FILE2 ...?
347353
**
348
-** Remove one or more files from the tree.
354
+** Remove one or more files or directories from the repository.
349355
**
350
-** This command does not remove the files from disk. It just marks the
356
+** This command does NOT remove the files from disk. It just marks the
351357
** files as no longer being part of the project. In other words, future
352358
** changes to the named files will not be versioned.
359
+**
360
+** SUMMARY: fossil rm FILE1 ?FILE2 ...?
361
+** or: fossil delete FILE1 ?FILE2 ...?
353362
*/
354363
void delete_cmd(void){
355364
int i;
356365
int vid;
357366
@@ -382,11 +391,11 @@
382391
** COMMAND: addremove
383392
**
384393
** Usage: %fossil addremove ?--dotfiles? ?--ignore GLOBPATTERN? ?--test?
385394
**
386395
** Do all necessary "add" and "rm" commands to synchronize the repository
387
-** with the content of the working checkout
396
+** with the content of the working checkout:
388397
**
389398
** * All files in the checkout but not in the repository (that is,
390399
** all files displayed using the "extra" command) are added as
391400
** if by the "add" command.
392401
**
@@ -399,15 +408,18 @@
399408
**
400409
** Files and directories whose names begin with "." are ignored unless
401410
** the --dotfiles option is used.
402411
**
403412
** The --ignore option overrides the "ignore-glob" setting. See
404
-** documentation on the "setting" command for further information.
413
+** documentation on the "settings" command for further information.
405414
**
406415
** The --test option shows what would happen without actually doing anything.
407416
**
408417
** This command can be used to track third party software.
418
+**
419
+**
420
+** SUMMARY: fossil addremove ?--dotfiles? ?--ignore GLOBPATTERN? ?--test?
409421
*/
410422
void import_cmd(void){
411423
Blob path;
412424
const char *zIgnoreFlag = find_option("ignore",0,1);
413425
int allFlag = find_option("dotfiles",0,0)!=0;
@@ -436,11 +448,11 @@
436448
if( file_tree_name(g.zRepositoryName, &repo, 0) ){
437449
db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
438450
}
439451
440452
/* step 1: search for extra files */
441
- db_prepare(&q,
453
+ db_prepare(&q,
442454
"SELECT x, %Q || x FROM sfile"
443455
" WHERE x NOT IN (%s)"
444456
" AND NOT %s"
445457
" ORDER BY 1",
446458
g.zLocalRoot,
@@ -451,11 +463,11 @@
451463
add_one_file(db_column_text(&q, 1), vid, 0);
452464
nAdd++;
453465
}
454466
db_finalize(&q);
455467
/* step 2: search for missing files */
456
- db_prepare(&q,
468
+ db_prepare(&q,
457469
"SELECT pathname,%Q || pathname,deleted FROM vfile"
458470
" WHERE deleted!=1"
459471
" ORDER BY 1",
460472
g.zLocalRoot
461473
);
@@ -499,15 +511,20 @@
499511
** COMMAND: rename
500512
**
501513
** Usage: %fossil mv|rename OLDNAME NEWNAME
502514
** or: %fossil mv|rename OLDNAME... DIR
503515
**
504
-** Move or rename one or more files within the tree
516
+** Move or rename one or more files or directories within the repository tree.
517
+** You can either rename a file or directory or move it to another subdirectory.
505518
**
506
-** This command does not rename the files on disk. This command merely
519
+** This command does NOT rename or move the files on disk. This command merely
507520
** records the fact that filenames have changed so that appropriate notations
508521
** can be made at the next commit/checkin.
522
+**
523
+**
524
+** SUMMARY: fossil mv|rename OLDNAME NEWNAME
525
+** or: fossil mv|rename OLDNAME... DIR
509526
*/
510527
void mv_cmd(void){
511528
int i;
512529
int vid;
513530
char *zDest;
514531
--- src/add.c
+++ src/add.c
@@ -212,21 +212,27 @@
212 }
213
214 /*
215 ** COMMAND: add
216 **
217 ** Usage: %fossil add FILE...
218 **
219 ** Make arrangements to add one or more files to the current checkout
220 ** at the next commit.
221 **
222 ** When adding files recursively, filenames that begin with "." are
223 ** excluded by default. To include such files, add the "--dotfiles"
224 ** option to the command-line.
225 **
226 ** The --ignore option overrides the "ignore-glob" setting. See
227 ** documentation on the "setting" command for further information.
 
 
 
 
 
 
228 */
229 void add_cmd(void){
230 int i;
231 int vid;
232 const char *zIgnoreFlag;
@@ -340,18 +346,21 @@
340
341 /*
342 ** COMMAND: rm
343 ** COMMAND: delete
344 **
345 ** Usage: %fossil rm FILE...
346 ** or: %fossil delete FILE...
347 **
348 ** Remove one or more files from the tree.
349 **
350 ** This command does not remove the files from disk. It just marks the
351 ** files as no longer being part of the project. In other words, future
352 ** changes to the named files will not be versioned.
 
 
 
353 */
354 void delete_cmd(void){
355 int i;
356 int vid;
357
@@ -382,11 +391,11 @@
382 ** COMMAND: addremove
383 **
384 ** Usage: %fossil addremove ?--dotfiles? ?--ignore GLOBPATTERN? ?--test?
385 **
386 ** Do all necessary "add" and "rm" commands to synchronize the repository
387 ** with the content of the working checkout
388 **
389 ** * All files in the checkout but not in the repository (that is,
390 ** all files displayed using the "extra" command) are added as
391 ** if by the "add" command.
392 **
@@ -399,15 +408,18 @@
399 **
400 ** Files and directories whose names begin with "." are ignored unless
401 ** the --dotfiles option is used.
402 **
403 ** The --ignore option overrides the "ignore-glob" setting. See
404 ** documentation on the "setting" command for further information.
405 **
406 ** The --test option shows what would happen without actually doing anything.
407 **
408 ** This command can be used to track third party software.
 
 
 
409 */
410 void import_cmd(void){
411 Blob path;
412 const char *zIgnoreFlag = find_option("ignore",0,1);
413 int allFlag = find_option("dotfiles",0,0)!=0;
@@ -436,11 +448,11 @@
436 if( file_tree_name(g.zRepositoryName, &repo, 0) ){
437 db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
438 }
439
440 /* step 1: search for extra files */
441 db_prepare(&q,
442 "SELECT x, %Q || x FROM sfile"
443 " WHERE x NOT IN (%s)"
444 " AND NOT %s"
445 " ORDER BY 1",
446 g.zLocalRoot,
@@ -451,11 +463,11 @@
451 add_one_file(db_column_text(&q, 1), vid, 0);
452 nAdd++;
453 }
454 db_finalize(&q);
455 /* step 2: search for missing files */
456 db_prepare(&q,
457 "SELECT pathname,%Q || pathname,deleted FROM vfile"
458 " WHERE deleted!=1"
459 " ORDER BY 1",
460 g.zLocalRoot
461 );
@@ -499,15 +511,20 @@
499 ** COMMAND: rename
500 **
501 ** Usage: %fossil mv|rename OLDNAME NEWNAME
502 ** or: %fossil mv|rename OLDNAME... DIR
503 **
504 ** Move or rename one or more files within the tree
 
505 **
506 ** This command does not rename the files on disk. This command merely
507 ** records the fact that filenames have changed so that appropriate notations
508 ** can be made at the next commit/checkin.
 
 
 
 
509 */
510 void mv_cmd(void){
511 int i;
512 int vid;
513 char *zDest;
514
--- src/add.c
+++ src/add.c
@@ -212,21 +212,27 @@
212 }
213
214 /*
215 ** COMMAND: add
216 **
217 ** Usage: %fossil add ?OPTIONS? FILE1 ?FILE2 ...?
218 **
219 ** Make arrangements to add one or more files or directories to the
220 ** current checkout at the next commit.
221 **
222 ** When adding files or directories recursively, filenames that begin
223 ** with "." are excluded by default. To include such files, add
224 ** the "--dotfiles" option to the command-line.
225 **
226 ** The --ignore option specifies the patterns for files to be excluded,
227 ** like *.o,*.obj,*.exe. If not specified, the "ignore-glob" setting is
228 ** used. See ** documentation on the "settings" command for further
229 ** information.
230 **
231 **
232 ** SUMMARY: fossil add ?OPTIONS? FILE1 ?FILE2 ...?
233 ** Options: --dotfiles, --ignore
234 */
235 void add_cmd(void){
236 int i;
237 int vid;
238 const char *zIgnoreFlag;
@@ -340,18 +346,21 @@
346
347 /*
348 ** COMMAND: rm
349 ** COMMAND: delete
350 **
351 ** Usage: %fossil rm FILE1 ?FILE2 ...?
352 ** or: %fossil delete FILE1 ?FILE2 ...?
353 **
354 ** Remove one or more files or directories from the repository.
355 **
356 ** This command does NOT remove the files from disk. It just marks the
357 ** files as no longer being part of the project. In other words, future
358 ** changes to the named files will not be versioned.
359 **
360 ** SUMMARY: fossil rm FILE1 ?FILE2 ...?
361 ** or: fossil delete FILE1 ?FILE2 ...?
362 */
363 void delete_cmd(void){
364 int i;
365 int vid;
366
@@ -382,11 +391,11 @@
391 ** COMMAND: addremove
392 **
393 ** Usage: %fossil addremove ?--dotfiles? ?--ignore GLOBPATTERN? ?--test?
394 **
395 ** Do all necessary "add" and "rm" commands to synchronize the repository
396 ** with the content of the working checkout:
397 **
398 ** * All files in the checkout but not in the repository (that is,
399 ** all files displayed using the "extra" command) are added as
400 ** if by the "add" command.
401 **
@@ -399,15 +408,18 @@
408 **
409 ** Files and directories whose names begin with "." are ignored unless
410 ** the --dotfiles option is used.
411 **
412 ** The --ignore option overrides the "ignore-glob" setting. See
413 ** documentation on the "settings" command for further information.
414 **
415 ** The --test option shows what would happen without actually doing anything.
416 **
417 ** This command can be used to track third party software.
418 **
419 **
420 ** SUMMARY: fossil addremove ?--dotfiles? ?--ignore GLOBPATTERN? ?--test?
421 */
422 void import_cmd(void){
423 Blob path;
424 const char *zIgnoreFlag = find_option("ignore",0,1);
425 int allFlag = find_option("dotfiles",0,0)!=0;
@@ -436,11 +448,11 @@
448 if( file_tree_name(g.zRepositoryName, &repo, 0) ){
449 db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
450 }
451
452 /* step 1: search for extra files */
453 db_prepare(&q,
454 "SELECT x, %Q || x FROM sfile"
455 " WHERE x NOT IN (%s)"
456 " AND NOT %s"
457 " ORDER BY 1",
458 g.zLocalRoot,
@@ -451,11 +463,11 @@
463 add_one_file(db_column_text(&q, 1), vid, 0);
464 nAdd++;
465 }
466 db_finalize(&q);
467 /* step 2: search for missing files */
468 db_prepare(&q,
469 "SELECT pathname,%Q || pathname,deleted FROM vfile"
470 " WHERE deleted!=1"
471 " ORDER BY 1",
472 g.zLocalRoot
473 );
@@ -499,15 +511,20 @@
511 ** COMMAND: rename
512 **
513 ** Usage: %fossil mv|rename OLDNAME NEWNAME
514 ** or: %fossil mv|rename OLDNAME... DIR
515 **
516 ** Move or rename one or more files or directories within the repository tree.
517 ** You can either rename a file or directory or move it to another subdirectory.
518 **
519 ** This command does NOT rename or move the files on disk. This command merely
520 ** records the fact that filenames have changed so that appropriate notations
521 ** can be made at the next commit/checkin.
522 **
523 **
524 ** SUMMARY: fossil mv|rename OLDNAME NEWNAME
525 ** or: fossil mv|rename OLDNAME... DIR
526 */
527 void mv_cmd(void){
528 int i;
529 int vid;
530 char *zDest;
531
+7 -7
--- src/merge.c
+++ src/merge.c
@@ -26,13 +26,13 @@
2626
/*
2727
** COMMAND: merge
2828
**
2929
** Usage: %fossil merge [--cherrypick] [--backout] VERSION
3030
**
31
-** The argument is a version that should be merged into the current
32
-** checkout. All changes from VERSION back to the nearest common
33
-** ancestor are merged. Except, if either of the --cherrypick or
31
+** The argument VERSION is a version that should be merged into the
32
+** current checkout. All changes from VERSION back to the nearest
33
+** common ancestor are merged. Except, if either of the --cherrypick or
3434
** --backout options are used only the changes associated with the
3535
** single check-in VERSION are merged. The --backout option causes
3636
** the changes associated with VERSION to be removed from the current
3737
** checkout rather than added.
3838
**
@@ -283,11 +283,11 @@
283283
db_finalize(&q);
284284
285285
/*
286286
** Add to V files that are not in V or P but are in M
287287
*/
288
- db_prepare(&q,
288
+ db_prepare(&q,
289289
"SELECT idm, rowid, fnm FROM fv AS x"
290290
" WHERE idp=0 AND idv=0 AND idm>0"
291291
);
292292
while( db_step(&q)==SQLITE_ROW ){
293293
int idm = db_column_int(&q, 0);
@@ -307,13 +307,13 @@
307307
undo_save(zName);
308308
vfile_to_disk(0, idm, 0, 0);
309309
}
310310
}
311311
db_finalize(&q);
312
-
312
+
313313
/*
314
- ** Find files that have changed from P->M but not P->V.
314
+ ** Find files that have changed from P->M but not P->V.
315315
** Copy the M content over into V.
316316
*/
317317
db_prepare(&q,
318318
"SELECT idv, ridm, fn FROM fv"
319319
" WHERE idp>0 AND idv>0 AND idm>0"
@@ -457,11 +457,11 @@
457457
/* Report on conflicts
458458
*/
459459
if( nConflict && !nochangeFlag ){
460460
printf("WARNING: merge conflicts - see messages above for details.\n");
461461
}
462
-
462
+
463463
/*
464464
** Clean up the mid and pid VFILE entries. Then commit the changes.
465465
*/
466466
db_multi_exec("DELETE FROM vfile WHERE vid!=%d", vid);
467467
if( !pickFlag ){
468468
--- src/merge.c
+++ src/merge.c
@@ -26,13 +26,13 @@
26 /*
27 ** COMMAND: merge
28 **
29 ** Usage: %fossil merge [--cherrypick] [--backout] VERSION
30 **
31 ** The argument is a version that should be merged into the current
32 ** checkout. All changes from VERSION back to the nearest common
33 ** ancestor are merged. Except, if either of the --cherrypick or
34 ** --backout options are used only the changes associated with the
35 ** single check-in VERSION are merged. The --backout option causes
36 ** the changes associated with VERSION to be removed from the current
37 ** checkout rather than added.
38 **
@@ -283,11 +283,11 @@
283 db_finalize(&q);
284
285 /*
286 ** Add to V files that are not in V or P but are in M
287 */
288 db_prepare(&q,
289 "SELECT idm, rowid, fnm FROM fv AS x"
290 " WHERE idp=0 AND idv=0 AND idm>0"
291 );
292 while( db_step(&q)==SQLITE_ROW ){
293 int idm = db_column_int(&q, 0);
@@ -307,13 +307,13 @@
307 undo_save(zName);
308 vfile_to_disk(0, idm, 0, 0);
309 }
310 }
311 db_finalize(&q);
312
313 /*
314 ** Find files that have changed from P->M but not P->V.
315 ** Copy the M content over into V.
316 */
317 db_prepare(&q,
318 "SELECT idv, ridm, fn FROM fv"
319 " WHERE idp>0 AND idv>0 AND idm>0"
@@ -457,11 +457,11 @@
457 /* Report on conflicts
458 */
459 if( nConflict && !nochangeFlag ){
460 printf("WARNING: merge conflicts - see messages above for details.\n");
461 }
462
463 /*
464 ** Clean up the mid and pid VFILE entries. Then commit the changes.
465 */
466 db_multi_exec("DELETE FROM vfile WHERE vid!=%d", vid);
467 if( !pickFlag ){
468
--- src/merge.c
+++ src/merge.c
@@ -26,13 +26,13 @@
26 /*
27 ** COMMAND: merge
28 **
29 ** Usage: %fossil merge [--cherrypick] [--backout] VERSION
30 **
31 ** The argument VERSION is a version that should be merged into the
32 ** current checkout. All changes from VERSION back to the nearest
33 ** common ancestor are merged. Except, if either of the --cherrypick or
34 ** --backout options are used only the changes associated with the
35 ** single check-in VERSION are merged. The --backout option causes
36 ** the changes associated with VERSION to be removed from the current
37 ** checkout rather than added.
38 **
@@ -283,11 +283,11 @@
283 db_finalize(&q);
284
285 /*
286 ** Add to V files that are not in V or P but are in M
287 */
288 db_prepare(&q,
289 "SELECT idm, rowid, fnm FROM fv AS x"
290 " WHERE idp=0 AND idv=0 AND idm>0"
291 );
292 while( db_step(&q)==SQLITE_ROW ){
293 int idm = db_column_int(&q, 0);
@@ -307,13 +307,13 @@
307 undo_save(zName);
308 vfile_to_disk(0, idm, 0, 0);
309 }
310 }
311 db_finalize(&q);
312
313 /*
314 ** Find files that have changed from P->M but not P->V.
315 ** Copy the M content over into V.
316 */
317 db_prepare(&q,
318 "SELECT idv, ridm, fn FROM fv"
319 " WHERE idp>0 AND idv>0 AND idm>0"
@@ -457,11 +457,11 @@
457 /* Report on conflicts
458 */
459 if( nConflict && !nochangeFlag ){
460 printf("WARNING: merge conflicts - see messages above for details.\n");
461 }
462
463 /*
464 ** Clean up the mid and pid VFILE entries. Then commit the changes.
465 */
466 db_multi_exec("DELETE FROM vfile WHERE vid!=%d", vid);
467 if( !pickFlag ){
468

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button