Fossil SCM
Add option --keep to "fossil clean", and matching versionable setting "keep-glob". Now you can specify which files should be kept without confirmation and which files can be removed (--ignore, "ignore-glob") without confirmation. If you want the old behavior, specify "keep-glob" to have the same value as "ignore-glob". Add versioned settings "ignore-glob" and "keep-glob" to the fossil repository.
Commit
982f9ec738fb181a89a8ef85c1f0d45cf26a4a04
Parent
d24afd17c6e20a2…
8 files changed
+6
+2
+24
-14
+24
-14
+1
+5
+1
+1
-1
| --- a/.fossil-settings/ignore-glob | ||
| +++ b/.fossil-settings/ignore-glob | ||
| @@ -0,0 +1,6 @@ | ||
| 1 | +*.a | |
| 2 | +*.lib | |
| 3 | +*.o | |
| 4 | + | |
| 5 | +autoconfig.h | |
| 6 | +co |
| --- a/.fossil-settings/ignore-glob | |
| +++ b/.fossil-settings/ignore-glob | |
| @@ -0,0 +1,6 @@ | |
| --- a/.fossil-settings/ignore-glob | |
| +++ b/.fossil-settings/ignore-glob | |
| @@ -0,0 +1,6 @@ | |
| 1 | *.a |
| 2 | *.lib |
| 3 | *.o |
| 4 | |
| 5 | autoconfig.h |
| 6 | co |
| --- a/.fossil-settings/keep-glob | ||
| +++ b/.fossil-settings/keep-glob | ||
| @@ -0,0 +1,2 @@ | ||
| 1 | +fossil | |
| 2 | +fossil.exe |
| --- a/.fossil-settings/keep-glob | |
| +++ b/.fossil-settings/keep-glob | |
| @@ -0,0 +1,2 @@ | |
| --- a/.fossil-settings/keep-glob | |
| +++ b/.fossil-settings/keep-glob | |
| @@ -0,0 +1,2 @@ | |
| 1 | fossil |
| 2 | fossil.exe |
+24
-14
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -380,41 +380,44 @@ | ||
| 380 | 380 | ** |
| 381 | 381 | ** Delete all "extra" files in the source tree. "Extra" files are |
| 382 | 382 | ** files that are not officially part of the checkout. This operation |
| 383 | 383 | ** cannot be undone. |
| 384 | 384 | ** |
| 385 | -** You will be prompted before removing each file. If you are | |
| 386 | -** sure you wish to remove all "extra" files you can specify the | |
| 387 | -** optional --force flag and no prompts will be issued. | |
| 385 | +** You will be prompted before removing each file, except for files | |
| 386 | +** matching the patterns specified with --ignore and --keep. The GLOBPATTERN | |
| 387 | +** specified by the "ignore-glob" setting is used if the --ignore | |
| 388 | +** option is omitted, the same with "keep-glob" and --keep. If you are | |
| 389 | +** sure you wish to remove all "extra" files except the ones specified | |
| 390 | +** with --keep, you can specify the optional -f|--force flag and no prompts | |
| 391 | +** will be issued. If any file matches both --keep and --ignore, --keep | |
| 392 | +** takes precedence. | |
| 388 | 393 | ** |
| 389 | 394 | ** Files and subdirectories whose names begin with "." are |
| 390 | -** normally ignored. They are included if the "--dotfiles" option | |
| 395 | +** normally kept. They are handled if the "--dotfiles" option | |
| 391 | 396 | ** is used. |
| 392 | 397 | ** |
| 393 | -** The GLOBPATTERN is a comma-separated list of GLOB expressions for | |
| 394 | -** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" | |
| 395 | -** is used if the --ignore option is omitted. | |
| 396 | -** | |
| 397 | 398 | ** Options: |
| 398 | 399 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 399 | 400 | ** --dotfiles include files beginning with a dot (".") |
| 400 | 401 | ** -f|--force Remove files without prompting |
| 401 | -** --ignore <CSG> ignore files matching patterns from the | |
| 402 | +** --ignore <CSG> don't prompt for files matching this | |
| 402 | 403 | ** comma separated list of glob patterns. |
| 404 | +** --keep <CSG> keep files matching this comma separated | |
| 405 | +** list of glob patterns. | |
| 403 | 406 | ** -n|--dry-run If given, display instead of run actions |
| 404 | 407 | ** --temp Remove only Fossil-generated temporary files |
| 405 | 408 | ** |
| 406 | 409 | ** See also: addremove, extra, status |
| 407 | 410 | */ |
| 408 | 411 | void clean_cmd(void){ |
| 409 | 412 | int allFlag; |
| 410 | 413 | unsigned scanFlags = 0; |
| 411 | - const char *zIgnoreFlag; | |
| 414 | + const char *zIgnoreFlag, *zKeepFlag; | |
| 412 | 415 | Blob path, repo; |
| 413 | 416 | Stmt q; |
| 414 | 417 | int n; |
| 415 | - Glob *pIgnore; | |
| 418 | + Glob *pIgnore, *pKeep; | |
| 416 | 419 | int dryRunFlag = 0; |
| 417 | 420 | |
| 418 | 421 | allFlag = find_option("force","f",0)!=0; |
| 419 | 422 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 420 | 423 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| @@ -421,22 +424,27 @@ | ||
| 421 | 424 | zIgnoreFlag = find_option("ignore",0,1); |
| 422 | 425 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 423 | 426 | if( !dryRunFlag ){ |
| 424 | 427 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 425 | 428 | } |
| 429 | + zKeepFlag = find_option("keep",0,1); | |
| 426 | 430 | capture_case_sensitive_option(); |
| 427 | 431 | db_must_be_within_tree(); |
| 428 | 432 | if( zIgnoreFlag==0 ){ |
| 429 | 433 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 430 | 434 | } |
| 435 | + if( zKeepFlag==0 ){ | |
| 436 | + zKeepFlag = db_get("keep-glob", 0); | |
| 437 | + } | |
| 431 | 438 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 432 | 439 | filename_collation()); |
| 433 | 440 | n = strlen(g.zLocalRoot); |
| 434 | 441 | blob_init(&path, g.zLocalRoot, n-1); |
| 435 | 442 | pIgnore = glob_create(zIgnoreFlag); |
| 436 | - vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); | |
| 437 | - glob_free(pIgnore); | |
| 443 | + pKeep = glob_create(zKeepFlag); | |
| 444 | + vfile_scan(&path, blob_size(&path), scanFlags, pKeep); | |
| 445 | + glob_free(pKeep); | |
| 438 | 446 | db_prepare(&q, |
| 439 | 447 | "SELECT %Q || x FROM sfile" |
| 440 | 448 | " WHERE x NOT IN (%s)" |
| 441 | 449 | " ORDER BY 1", |
| 442 | 450 | g.zLocalRoot, fossil_all_reserved_names(0) |
| @@ -447,11 +455,11 @@ | ||
| 447 | 455 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 448 | 456 | while( db_step(&q)==SQLITE_ROW ){ |
| 449 | 457 | if( dryRunFlag ){ |
| 450 | 458 | fossil_print("%s\n", db_column_text(&q,0)); |
| 451 | 459 | continue; |
| 452 | - }else if( !allFlag ){ | |
| 460 | + }else if( !allFlag && !glob_match(pIgnore, db_column_text(&q, 0)+n) ){ | |
| 453 | 461 | Blob ans; |
| 454 | 462 | char cReply; |
| 455 | 463 | char *prompt = mprintf("remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 456 | 464 | db_column_text(&q, 0)); |
| 457 | 465 | blob_zero(&ans); |
| @@ -461,12 +469,14 @@ | ||
| 461 | 469 | allFlag = 1; |
| 462 | 470 | }else if( cReply!='y' && cReply!='Y' ){ |
| 463 | 471 | continue; |
| 464 | 472 | } |
| 465 | 473 | } |
| 474 | + fossil_print("removed unmanaged file \"%s\"\n", db_column_text(&q,0)); | |
| 466 | 475 | file_delete(db_column_text(&q, 0)); |
| 467 | 476 | } |
| 477 | + glob_free(pIgnore); | |
| 468 | 478 | db_finalize(&q); |
| 469 | 479 | } |
| 470 | 480 | |
| 471 | 481 | /* |
| 472 | 482 | ** Prompt the user for a check-in or stash comment (given in pPrompt), |
| 473 | 483 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -380,41 +380,44 @@ | |
| 380 | ** |
| 381 | ** Delete all "extra" files in the source tree. "Extra" files are |
| 382 | ** files that are not officially part of the checkout. This operation |
| 383 | ** cannot be undone. |
| 384 | ** |
| 385 | ** You will be prompted before removing each file. If you are |
| 386 | ** sure you wish to remove all "extra" files you can specify the |
| 387 | ** optional --force flag and no prompts will be issued. |
| 388 | ** |
| 389 | ** Files and subdirectories whose names begin with "." are |
| 390 | ** normally ignored. They are included if the "--dotfiles" option |
| 391 | ** is used. |
| 392 | ** |
| 393 | ** The GLOBPATTERN is a comma-separated list of GLOB expressions for |
| 394 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 395 | ** is used if the --ignore option is omitted. |
| 396 | ** |
| 397 | ** Options: |
| 398 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 399 | ** --dotfiles include files beginning with a dot (".") |
| 400 | ** -f|--force Remove files without prompting |
| 401 | ** --ignore <CSG> ignore files matching patterns from the |
| 402 | ** comma separated list of glob patterns. |
| 403 | ** -n|--dry-run If given, display instead of run actions |
| 404 | ** --temp Remove only Fossil-generated temporary files |
| 405 | ** |
| 406 | ** See also: addremove, extra, status |
| 407 | */ |
| 408 | void clean_cmd(void){ |
| 409 | int allFlag; |
| 410 | unsigned scanFlags = 0; |
| 411 | const char *zIgnoreFlag; |
| 412 | Blob path, repo; |
| 413 | Stmt q; |
| 414 | int n; |
| 415 | Glob *pIgnore; |
| 416 | int dryRunFlag = 0; |
| 417 | |
| 418 | allFlag = find_option("force","f",0)!=0; |
| 419 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 420 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| @@ -421,22 +424,27 @@ | |
| 421 | zIgnoreFlag = find_option("ignore",0,1); |
| 422 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 423 | if( !dryRunFlag ){ |
| 424 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 425 | } |
| 426 | capture_case_sensitive_option(); |
| 427 | db_must_be_within_tree(); |
| 428 | if( zIgnoreFlag==0 ){ |
| 429 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 430 | } |
| 431 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 432 | filename_collation()); |
| 433 | n = strlen(g.zLocalRoot); |
| 434 | blob_init(&path, g.zLocalRoot, n-1); |
| 435 | pIgnore = glob_create(zIgnoreFlag); |
| 436 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); |
| 437 | glob_free(pIgnore); |
| 438 | db_prepare(&q, |
| 439 | "SELECT %Q || x FROM sfile" |
| 440 | " WHERE x NOT IN (%s)" |
| 441 | " ORDER BY 1", |
| 442 | g.zLocalRoot, fossil_all_reserved_names(0) |
| @@ -447,11 +455,11 @@ | |
| 447 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 448 | while( db_step(&q)==SQLITE_ROW ){ |
| 449 | if( dryRunFlag ){ |
| 450 | fossil_print("%s\n", db_column_text(&q,0)); |
| 451 | continue; |
| 452 | }else if( !allFlag ){ |
| 453 | Blob ans; |
| 454 | char cReply; |
| 455 | char *prompt = mprintf("remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 456 | db_column_text(&q, 0)); |
| 457 | blob_zero(&ans); |
| @@ -461,12 +469,14 @@ | |
| 461 | allFlag = 1; |
| 462 | }else if( cReply!='y' && cReply!='Y' ){ |
| 463 | continue; |
| 464 | } |
| 465 | } |
| 466 | file_delete(db_column_text(&q, 0)); |
| 467 | } |
| 468 | db_finalize(&q); |
| 469 | } |
| 470 | |
| 471 | /* |
| 472 | ** Prompt the user for a check-in or stash comment (given in pPrompt), |
| 473 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -380,41 +380,44 @@ | |
| 380 | ** |
| 381 | ** Delete all "extra" files in the source tree. "Extra" files are |
| 382 | ** files that are not officially part of the checkout. This operation |
| 383 | ** cannot be undone. |
| 384 | ** |
| 385 | ** You will be prompted before removing each file, except for files |
| 386 | ** matching the patterns specified with --ignore and --keep. The GLOBPATTERN |
| 387 | ** specified by the "ignore-glob" setting is used if the --ignore |
| 388 | ** option is omitted, the same with "keep-glob" and --keep. If you are |
| 389 | ** sure you wish to remove all "extra" files except the ones specified |
| 390 | ** with --keep, you can specify the optional -f|--force flag and no prompts |
| 391 | ** will be issued. If any file matches both --keep and --ignore, --keep |
| 392 | ** takes precedence. |
| 393 | ** |
| 394 | ** Files and subdirectories whose names begin with "." are |
| 395 | ** normally kept. They are handled if the "--dotfiles" option |
| 396 | ** is used. |
| 397 | ** |
| 398 | ** Options: |
| 399 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 400 | ** --dotfiles include files beginning with a dot (".") |
| 401 | ** -f|--force Remove files without prompting |
| 402 | ** --ignore <CSG> don't prompt for files matching this |
| 403 | ** comma separated list of glob patterns. |
| 404 | ** --keep <CSG> keep files matching this comma separated |
| 405 | ** list of glob patterns. |
| 406 | ** -n|--dry-run If given, display instead of run actions |
| 407 | ** --temp Remove only Fossil-generated temporary files |
| 408 | ** |
| 409 | ** See also: addremove, extra, status |
| 410 | */ |
| 411 | void clean_cmd(void){ |
| 412 | int allFlag; |
| 413 | unsigned scanFlags = 0; |
| 414 | const char *zIgnoreFlag, *zKeepFlag; |
| 415 | Blob path, repo; |
| 416 | Stmt q; |
| 417 | int n; |
| 418 | Glob *pIgnore, *pKeep; |
| 419 | int dryRunFlag = 0; |
| 420 | |
| 421 | allFlag = find_option("force","f",0)!=0; |
| 422 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 423 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| @@ -421,22 +424,27 @@ | |
| 424 | zIgnoreFlag = find_option("ignore",0,1); |
| 425 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 426 | if( !dryRunFlag ){ |
| 427 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 428 | } |
| 429 | zKeepFlag = find_option("keep",0,1); |
| 430 | capture_case_sensitive_option(); |
| 431 | db_must_be_within_tree(); |
| 432 | if( zIgnoreFlag==0 ){ |
| 433 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 434 | } |
| 435 | if( zKeepFlag==0 ){ |
| 436 | zKeepFlag = db_get("keep-glob", 0); |
| 437 | } |
| 438 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 439 | filename_collation()); |
| 440 | n = strlen(g.zLocalRoot); |
| 441 | blob_init(&path, g.zLocalRoot, n-1); |
| 442 | pIgnore = glob_create(zIgnoreFlag); |
| 443 | pKeep = glob_create(zKeepFlag); |
| 444 | vfile_scan(&path, blob_size(&path), scanFlags, pKeep); |
| 445 | glob_free(pKeep); |
| 446 | db_prepare(&q, |
| 447 | "SELECT %Q || x FROM sfile" |
| 448 | " WHERE x NOT IN (%s)" |
| 449 | " ORDER BY 1", |
| 450 | g.zLocalRoot, fossil_all_reserved_names(0) |
| @@ -447,11 +455,11 @@ | |
| 455 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 456 | while( db_step(&q)==SQLITE_ROW ){ |
| 457 | if( dryRunFlag ){ |
| 458 | fossil_print("%s\n", db_column_text(&q,0)); |
| 459 | continue; |
| 460 | }else if( !allFlag && !glob_match(pIgnore, db_column_text(&q, 0)+n) ){ |
| 461 | Blob ans; |
| 462 | char cReply; |
| 463 | char *prompt = mprintf("remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 464 | db_column_text(&q, 0)); |
| 465 | blob_zero(&ans); |
| @@ -461,12 +469,14 @@ | |
| 469 | allFlag = 1; |
| 470 | }else if( cReply!='y' && cReply!='Y' ){ |
| 471 | continue; |
| 472 | } |
| 473 | } |
| 474 | fossil_print("removed unmanaged file \"%s\"\n", db_column_text(&q,0)); |
| 475 | file_delete(db_column_text(&q, 0)); |
| 476 | } |
| 477 | glob_free(pIgnore); |
| 478 | db_finalize(&q); |
| 479 | } |
| 480 | |
| 481 | /* |
| 482 | ** Prompt the user for a check-in or stash comment (given in pPrompt), |
| 483 |
+24
-14
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -380,41 +380,44 @@ | ||
| 380 | 380 | ** |
| 381 | 381 | ** Delete all "extra" files in the source tree. "Extra" files are |
| 382 | 382 | ** files that are not officially part of the checkout. This operation |
| 383 | 383 | ** cannot be undone. |
| 384 | 384 | ** |
| 385 | -** You will be prompted before removing each file. If you are | |
| 386 | -** sure you wish to remove all "extra" files you can specify the | |
| 387 | -** optional --force flag and no prompts will be issued. | |
| 385 | +** You will be prompted before removing each file, except for files | |
| 386 | +** matching the patterns specified with --ignore and --keep. The GLOBPATTERN | |
| 387 | +** specified by the "ignore-glob" setting is used if the --ignore | |
| 388 | +** option is omitted, the same with "keep-glob" and --keep. If you are | |
| 389 | +** sure you wish to remove all "extra" files except the ones specified | |
| 390 | +** with --keep, you can specify the optional -f|--force flag and no prompts | |
| 391 | +** will be issued. If any file matches both --keep and --ignore, --keep | |
| 392 | +** takes precedence. | |
| 388 | 393 | ** |
| 389 | 394 | ** Files and subdirectories whose names begin with "." are |
| 390 | -** normally ignored. They are included if the "--dotfiles" option | |
| 395 | +** normally kept. They are handled if the "--dotfiles" option | |
| 391 | 396 | ** is used. |
| 392 | 397 | ** |
| 393 | -** The GLOBPATTERN is a comma-separated list of GLOB expressions for | |
| 394 | -** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" | |
| 395 | -** is used if the --ignore option is omitted. | |
| 396 | -** | |
| 397 | 398 | ** Options: |
| 398 | 399 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 399 | 400 | ** --dotfiles include files beginning with a dot (".") |
| 400 | 401 | ** -f|--force Remove files without prompting |
| 401 | -** --ignore <CSG> ignore files matching patterns from the | |
| 402 | +** --ignore <CSG> don't prompt for files matching this | |
| 402 | 403 | ** comma separated list of glob patterns. |
| 404 | +** --keep <CSG> keep files matching this comma separated | |
| 405 | +** list of glob patterns. | |
| 403 | 406 | ** -n|--dry-run If given, display instead of run actions |
| 404 | 407 | ** --temp Remove only Fossil-generated temporary files |
| 405 | 408 | ** |
| 406 | 409 | ** See also: addremove, extra, status |
| 407 | 410 | */ |
| 408 | 411 | void clean_cmd(void){ |
| 409 | 412 | int allFlag; |
| 410 | 413 | unsigned scanFlags = 0; |
| 411 | - const char *zIgnoreFlag; | |
| 414 | + const char *zIgnoreFlag, *zKeepFlag; | |
| 412 | 415 | Blob path, repo; |
| 413 | 416 | Stmt q; |
| 414 | 417 | int n; |
| 415 | - Glob *pIgnore; | |
| 418 | + Glob *pIgnore, *pKeep; | |
| 416 | 419 | int dryRunFlag = 0; |
| 417 | 420 | |
| 418 | 421 | allFlag = find_option("force","f",0)!=0; |
| 419 | 422 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 420 | 423 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| @@ -421,22 +424,27 @@ | ||
| 421 | 424 | zIgnoreFlag = find_option("ignore",0,1); |
| 422 | 425 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 423 | 426 | if( !dryRunFlag ){ |
| 424 | 427 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 425 | 428 | } |
| 429 | + zKeepFlag = find_option("keep",0,1); | |
| 426 | 430 | capture_case_sensitive_option(); |
| 427 | 431 | db_must_be_within_tree(); |
| 428 | 432 | if( zIgnoreFlag==0 ){ |
| 429 | 433 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 430 | 434 | } |
| 435 | + if( zKeepFlag==0 ){ | |
| 436 | + zKeepFlag = db_get("keep-glob", 0); | |
| 437 | + } | |
| 431 | 438 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 432 | 439 | filename_collation()); |
| 433 | 440 | n = strlen(g.zLocalRoot); |
| 434 | 441 | blob_init(&path, g.zLocalRoot, n-1); |
| 435 | 442 | pIgnore = glob_create(zIgnoreFlag); |
| 436 | - vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); | |
| 437 | - glob_free(pIgnore); | |
| 443 | + pKeep = glob_create(zKeepFlag); | |
| 444 | + vfile_scan(&path, blob_size(&path), scanFlags, pKeep); | |
| 445 | + glob_free(pKeep); | |
| 438 | 446 | db_prepare(&q, |
| 439 | 447 | "SELECT %Q || x FROM sfile" |
| 440 | 448 | " WHERE x NOT IN (%s)" |
| 441 | 449 | " ORDER BY 1", |
| 442 | 450 | g.zLocalRoot, fossil_all_reserved_names(0) |
| @@ -447,11 +455,11 @@ | ||
| 447 | 455 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 448 | 456 | while( db_step(&q)==SQLITE_ROW ){ |
| 449 | 457 | if( dryRunFlag ){ |
| 450 | 458 | fossil_print("%s\n", db_column_text(&q,0)); |
| 451 | 459 | continue; |
| 452 | - }else if( !allFlag ){ | |
| 460 | + }else if( !allFlag && !glob_match(pIgnore, db_column_text(&q, 0)+n) ){ | |
| 453 | 461 | Blob ans; |
| 454 | 462 | char cReply; |
| 455 | 463 | char *prompt = mprintf("remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 456 | 464 | db_column_text(&q, 0)); |
| 457 | 465 | blob_zero(&ans); |
| @@ -461,12 +469,14 @@ | ||
| 461 | 469 | allFlag = 1; |
| 462 | 470 | }else if( cReply!='y' && cReply!='Y' ){ |
| 463 | 471 | continue; |
| 464 | 472 | } |
| 465 | 473 | } |
| 474 | + fossil_print("removed unmanaged file \"%s\"\n", db_column_text(&q,0)); | |
| 466 | 475 | file_delete(db_column_text(&q, 0)); |
| 467 | 476 | } |
| 477 | + glob_free(pIgnore); | |
| 468 | 478 | db_finalize(&q); |
| 469 | 479 | } |
| 470 | 480 | |
| 471 | 481 | /* |
| 472 | 482 | ** Prompt the user for a check-in or stash comment (given in pPrompt), |
| 473 | 483 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -380,41 +380,44 @@ | |
| 380 | ** |
| 381 | ** Delete all "extra" files in the source tree. "Extra" files are |
| 382 | ** files that are not officially part of the checkout. This operation |
| 383 | ** cannot be undone. |
| 384 | ** |
| 385 | ** You will be prompted before removing each file. If you are |
| 386 | ** sure you wish to remove all "extra" files you can specify the |
| 387 | ** optional --force flag and no prompts will be issued. |
| 388 | ** |
| 389 | ** Files and subdirectories whose names begin with "." are |
| 390 | ** normally ignored. They are included if the "--dotfiles" option |
| 391 | ** is used. |
| 392 | ** |
| 393 | ** The GLOBPATTERN is a comma-separated list of GLOB expressions for |
| 394 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 395 | ** is used if the --ignore option is omitted. |
| 396 | ** |
| 397 | ** Options: |
| 398 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 399 | ** --dotfiles include files beginning with a dot (".") |
| 400 | ** -f|--force Remove files without prompting |
| 401 | ** --ignore <CSG> ignore files matching patterns from the |
| 402 | ** comma separated list of glob patterns. |
| 403 | ** -n|--dry-run If given, display instead of run actions |
| 404 | ** --temp Remove only Fossil-generated temporary files |
| 405 | ** |
| 406 | ** See also: addremove, extra, status |
| 407 | */ |
| 408 | void clean_cmd(void){ |
| 409 | int allFlag; |
| 410 | unsigned scanFlags = 0; |
| 411 | const char *zIgnoreFlag; |
| 412 | Blob path, repo; |
| 413 | Stmt q; |
| 414 | int n; |
| 415 | Glob *pIgnore; |
| 416 | int dryRunFlag = 0; |
| 417 | |
| 418 | allFlag = find_option("force","f",0)!=0; |
| 419 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 420 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| @@ -421,22 +424,27 @@ | |
| 421 | zIgnoreFlag = find_option("ignore",0,1); |
| 422 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 423 | if( !dryRunFlag ){ |
| 424 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 425 | } |
| 426 | capture_case_sensitive_option(); |
| 427 | db_must_be_within_tree(); |
| 428 | if( zIgnoreFlag==0 ){ |
| 429 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 430 | } |
| 431 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 432 | filename_collation()); |
| 433 | n = strlen(g.zLocalRoot); |
| 434 | blob_init(&path, g.zLocalRoot, n-1); |
| 435 | pIgnore = glob_create(zIgnoreFlag); |
| 436 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); |
| 437 | glob_free(pIgnore); |
| 438 | db_prepare(&q, |
| 439 | "SELECT %Q || x FROM sfile" |
| 440 | " WHERE x NOT IN (%s)" |
| 441 | " ORDER BY 1", |
| 442 | g.zLocalRoot, fossil_all_reserved_names(0) |
| @@ -447,11 +455,11 @@ | |
| 447 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 448 | while( db_step(&q)==SQLITE_ROW ){ |
| 449 | if( dryRunFlag ){ |
| 450 | fossil_print("%s\n", db_column_text(&q,0)); |
| 451 | continue; |
| 452 | }else if( !allFlag ){ |
| 453 | Blob ans; |
| 454 | char cReply; |
| 455 | char *prompt = mprintf("remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 456 | db_column_text(&q, 0)); |
| 457 | blob_zero(&ans); |
| @@ -461,12 +469,14 @@ | |
| 461 | allFlag = 1; |
| 462 | }else if( cReply!='y' && cReply!='Y' ){ |
| 463 | continue; |
| 464 | } |
| 465 | } |
| 466 | file_delete(db_column_text(&q, 0)); |
| 467 | } |
| 468 | db_finalize(&q); |
| 469 | } |
| 470 | |
| 471 | /* |
| 472 | ** Prompt the user for a check-in or stash comment (given in pPrompt), |
| 473 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -380,41 +380,44 @@ | |
| 380 | ** |
| 381 | ** Delete all "extra" files in the source tree. "Extra" files are |
| 382 | ** files that are not officially part of the checkout. This operation |
| 383 | ** cannot be undone. |
| 384 | ** |
| 385 | ** You will be prompted before removing each file, except for files |
| 386 | ** matching the patterns specified with --ignore and --keep. The GLOBPATTERN |
| 387 | ** specified by the "ignore-glob" setting is used if the --ignore |
| 388 | ** option is omitted, the same with "keep-glob" and --keep. If you are |
| 389 | ** sure you wish to remove all "extra" files except the ones specified |
| 390 | ** with --keep, you can specify the optional -f|--force flag and no prompts |
| 391 | ** will be issued. If any file matches both --keep and --ignore, --keep |
| 392 | ** takes precedence. |
| 393 | ** |
| 394 | ** Files and subdirectories whose names begin with "." are |
| 395 | ** normally kept. They are handled if the "--dotfiles" option |
| 396 | ** is used. |
| 397 | ** |
| 398 | ** Options: |
| 399 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 400 | ** --dotfiles include files beginning with a dot (".") |
| 401 | ** -f|--force Remove files without prompting |
| 402 | ** --ignore <CSG> don't prompt for files matching this |
| 403 | ** comma separated list of glob patterns. |
| 404 | ** --keep <CSG> keep files matching this comma separated |
| 405 | ** list of glob patterns. |
| 406 | ** -n|--dry-run If given, display instead of run actions |
| 407 | ** --temp Remove only Fossil-generated temporary files |
| 408 | ** |
| 409 | ** See also: addremove, extra, status |
| 410 | */ |
| 411 | void clean_cmd(void){ |
| 412 | int allFlag; |
| 413 | unsigned scanFlags = 0; |
| 414 | const char *zIgnoreFlag, *zKeepFlag; |
| 415 | Blob path, repo; |
| 416 | Stmt q; |
| 417 | int n; |
| 418 | Glob *pIgnore, *pKeep; |
| 419 | int dryRunFlag = 0; |
| 420 | |
| 421 | allFlag = find_option("force","f",0)!=0; |
| 422 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 423 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| @@ -421,22 +424,27 @@ | |
| 424 | zIgnoreFlag = find_option("ignore",0,1); |
| 425 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 426 | if( !dryRunFlag ){ |
| 427 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 428 | } |
| 429 | zKeepFlag = find_option("keep",0,1); |
| 430 | capture_case_sensitive_option(); |
| 431 | db_must_be_within_tree(); |
| 432 | if( zIgnoreFlag==0 ){ |
| 433 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 434 | } |
| 435 | if( zKeepFlag==0 ){ |
| 436 | zKeepFlag = db_get("keep-glob", 0); |
| 437 | } |
| 438 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 439 | filename_collation()); |
| 440 | n = strlen(g.zLocalRoot); |
| 441 | blob_init(&path, g.zLocalRoot, n-1); |
| 442 | pIgnore = glob_create(zIgnoreFlag); |
| 443 | pKeep = glob_create(zKeepFlag); |
| 444 | vfile_scan(&path, blob_size(&path), scanFlags, pKeep); |
| 445 | glob_free(pKeep); |
| 446 | db_prepare(&q, |
| 447 | "SELECT %Q || x FROM sfile" |
| 448 | " WHERE x NOT IN (%s)" |
| 449 | " ORDER BY 1", |
| 450 | g.zLocalRoot, fossil_all_reserved_names(0) |
| @@ -447,11 +455,11 @@ | |
| 455 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 456 | while( db_step(&q)==SQLITE_ROW ){ |
| 457 | if( dryRunFlag ){ |
| 458 | fossil_print("%s\n", db_column_text(&q,0)); |
| 459 | continue; |
| 460 | }else if( !allFlag && !glob_match(pIgnore, db_column_text(&q, 0)+n) ){ |
| 461 | Blob ans; |
| 462 | char cReply; |
| 463 | char *prompt = mprintf("remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 464 | db_column_text(&q, 0)); |
| 465 | blob_zero(&ans); |
| @@ -461,12 +469,14 @@ | |
| 469 | allFlag = 1; |
| 470 | }else if( cReply!='y' && cReply!='Y' ){ |
| 471 | continue; |
| 472 | } |
| 473 | } |
| 474 | fossil_print("removed unmanaged file \"%s\"\n", db_column_text(&q,0)); |
| 475 | file_delete(db_column_text(&q, 0)); |
| 476 | } |
| 477 | glob_free(pIgnore); |
| 478 | db_finalize(&q); |
| 479 | } |
| 480 | |
| 481 | /* |
| 482 | ** Prompt the user for a check-in or stash comment (given in pPrompt), |
| 483 |
+1
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -102,10 +102,11 @@ | ||
| 102 | 102 | { "project-name", CONFIGSET_PROJ }, |
| 103 | 103 | { "project-description", CONFIGSET_PROJ }, |
| 104 | 104 | { "manifest", CONFIGSET_PROJ }, |
| 105 | 105 | { "binary-glob", CONFIGSET_PROJ }, |
| 106 | 106 | { "ignore-glob", CONFIGSET_PROJ }, |
| 107 | + { "keep-glob", CONFIGSET_PROJ }, | |
| 107 | 108 | { "crnl-glob", CONFIGSET_PROJ }, |
| 108 | 109 | { "encoding-glob", CONFIGSET_PROJ }, |
| 109 | 110 | { "empty-dirs", CONFIGSET_PROJ }, |
| 110 | 111 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 111 | 112 | |
| 112 | 113 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -102,10 +102,11 @@ | |
| 102 | { "project-name", CONFIGSET_PROJ }, |
| 103 | { "project-description", CONFIGSET_PROJ }, |
| 104 | { "manifest", CONFIGSET_PROJ }, |
| 105 | { "binary-glob", CONFIGSET_PROJ }, |
| 106 | { "ignore-glob", CONFIGSET_PROJ }, |
| 107 | { "crnl-glob", CONFIGSET_PROJ }, |
| 108 | { "encoding-glob", CONFIGSET_PROJ }, |
| 109 | { "empty-dirs", CONFIGSET_PROJ }, |
| 110 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 111 | |
| 112 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -102,10 +102,11 @@ | |
| 102 | { "project-name", CONFIGSET_PROJ }, |
| 103 | { "project-description", CONFIGSET_PROJ }, |
| 104 | { "manifest", CONFIGSET_PROJ }, |
| 105 | { "binary-glob", CONFIGSET_PROJ }, |
| 106 | { "ignore-glob", CONFIGSET_PROJ }, |
| 107 | { "keep-glob", CONFIGSET_PROJ }, |
| 108 | { "crnl-glob", CONFIGSET_PROJ }, |
| 109 | { "encoding-glob", CONFIGSET_PROJ }, |
| 110 | { "empty-dirs", CONFIGSET_PROJ }, |
| 111 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 112 | |
| 113 |
M
src/db.c
+5
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2109,10 +2109,11 @@ | ||
| 2109 | 2109 | { "gdiff-command", 0, 40, 0, "gdiff" }, |
| 2110 | 2110 | { "gmerge-command",0, 40, 0, "" }, |
| 2111 | 2111 | { "http-port", 0, 16, 0, "8080" }, |
| 2112 | 2112 | { "https-login", 0, 0, 0, "off" }, |
| 2113 | 2113 | { "ignore-glob", 0, 40, 1, "" }, |
| 2114 | + { "keep-glob", 0, 40, 1, "" }, | |
| 2114 | 2115 | { "localauth", 0, 0, 0, "off" }, |
| 2115 | 2116 | { "main-branch", 0, 40, 0, "trunk" }, |
| 2116 | 2117 | { "manifest", 0, 0, 1, "off" }, |
| 2117 | 2118 | { "max-upload", 0, 25, 0, "250000" }, |
| 2118 | 2119 | { "mtime-changes", 0, 0, 0, "on" }, |
| @@ -2239,10 +2240,14 @@ | ||
| 2239 | 2240 | ** even if the login page request came via HTTP. |
| 2240 | 2241 | ** |
| 2241 | 2242 | ** ignore-glob The VALUE is a comma or newline-separated list of GLOB |
| 2242 | 2243 | ** (versionable) patterns specifying files that the "extra" command will |
| 2243 | 2244 | ** ignore. Example: *.o,*.obj,*.exe |
| 2245 | +** | |
| 2246 | +** keep-glob The VALUE is a comma or newline-separated list of GLOB | |
| 2247 | +** (versionable) patterns specifying files that the "clean" command will | |
| 2248 | +** keep. Example: *.log | |
| 2244 | 2249 | ** |
| 2245 | 2250 | ** localauth If enabled, require that HTTP connections from |
| 2246 | 2251 | ** 127.0.0.1 be authenticated by password. If |
| 2247 | 2252 | ** false, all HTTP requests from localhost have |
| 2248 | 2253 | ** unrestricted access to the repository. |
| 2249 | 2254 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2109,10 +2109,11 @@ | |
| 2109 | { "gdiff-command", 0, 40, 0, "gdiff" }, |
| 2110 | { "gmerge-command",0, 40, 0, "" }, |
| 2111 | { "http-port", 0, 16, 0, "8080" }, |
| 2112 | { "https-login", 0, 0, 0, "off" }, |
| 2113 | { "ignore-glob", 0, 40, 1, "" }, |
| 2114 | { "localauth", 0, 0, 0, "off" }, |
| 2115 | { "main-branch", 0, 40, 0, "trunk" }, |
| 2116 | { "manifest", 0, 0, 1, "off" }, |
| 2117 | { "max-upload", 0, 25, 0, "250000" }, |
| 2118 | { "mtime-changes", 0, 0, 0, "on" }, |
| @@ -2239,10 +2240,14 @@ | |
| 2239 | ** even if the login page request came via HTTP. |
| 2240 | ** |
| 2241 | ** ignore-glob The VALUE is a comma or newline-separated list of GLOB |
| 2242 | ** (versionable) patterns specifying files that the "extra" command will |
| 2243 | ** ignore. Example: *.o,*.obj,*.exe |
| 2244 | ** |
| 2245 | ** localauth If enabled, require that HTTP connections from |
| 2246 | ** 127.0.0.1 be authenticated by password. If |
| 2247 | ** false, all HTTP requests from localhost have |
| 2248 | ** unrestricted access to the repository. |
| 2249 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2109,10 +2109,11 @@ | |
| 2109 | { "gdiff-command", 0, 40, 0, "gdiff" }, |
| 2110 | { "gmerge-command",0, 40, 0, "" }, |
| 2111 | { "http-port", 0, 16, 0, "8080" }, |
| 2112 | { "https-login", 0, 0, 0, "off" }, |
| 2113 | { "ignore-glob", 0, 40, 1, "" }, |
| 2114 | { "keep-glob", 0, 40, 1, "" }, |
| 2115 | { "localauth", 0, 0, 0, "off" }, |
| 2116 | { "main-branch", 0, 40, 0, "trunk" }, |
| 2117 | { "manifest", 0, 0, 1, "off" }, |
| 2118 | { "max-upload", 0, 25, 0, "250000" }, |
| 2119 | { "mtime-changes", 0, 0, 0, "on" }, |
| @@ -2239,10 +2240,14 @@ | |
| 2240 | ** even if the login page request came via HTTP. |
| 2241 | ** |
| 2242 | ** ignore-glob The VALUE is a comma or newline-separated list of GLOB |
| 2243 | ** (versionable) patterns specifying files that the "extra" command will |
| 2244 | ** ignore. Example: *.o,*.obj,*.exe |
| 2245 | ** |
| 2246 | ** keep-glob The VALUE is a comma or newline-separated list of GLOB |
| 2247 | ** (versionable) patterns specifying files that the "clean" command will |
| 2248 | ** keep. Example: *.log |
| 2249 | ** |
| 2250 | ** localauth If enabled, require that HTTP connections from |
| 2251 | ** 127.0.0.1 be authenticated by password. If |
| 2252 | ** false, all HTTP requests from localhost have |
| 2253 | ** unrestricted access to the repository. |
| 2254 |
+1
| --- src/json_config.c | ||
| +++ src/json_config.c | ||
| @@ -64,10 +64,11 @@ | ||
| 64 | 64 | |
| 65 | 65 | { "project-name", CONFIGSET_PROJ }, |
| 66 | 66 | { "project-description", CONFIGSET_PROJ }, |
| 67 | 67 | { "manifest", CONFIGSET_PROJ }, |
| 68 | 68 | { "ignore-glob", CONFIGSET_PROJ }, |
| 69 | +{ "keep-glob", CONFIGSET_PROJ }, | |
| 69 | 70 | { "crnl-glob", CONFIGSET_PROJ }, |
| 70 | 71 | { "empty-dirs", CONFIGSET_PROJ }, |
| 71 | 72 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 72 | 73 | |
| 73 | 74 | { "ticket-table", CONFIGSET_TKT }, |
| 74 | 75 |
| --- src/json_config.c | |
| +++ src/json_config.c | |
| @@ -64,10 +64,11 @@ | |
| 64 | |
| 65 | { "project-name", CONFIGSET_PROJ }, |
| 66 | { "project-description", CONFIGSET_PROJ }, |
| 67 | { "manifest", CONFIGSET_PROJ }, |
| 68 | { "ignore-glob", CONFIGSET_PROJ }, |
| 69 | { "crnl-glob", CONFIGSET_PROJ }, |
| 70 | { "empty-dirs", CONFIGSET_PROJ }, |
| 71 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 72 | |
| 73 | { "ticket-table", CONFIGSET_TKT }, |
| 74 |
| --- src/json_config.c | |
| +++ src/json_config.c | |
| @@ -64,10 +64,11 @@ | |
| 64 | |
| 65 | { "project-name", CONFIGSET_PROJ }, |
| 66 | { "project-description", CONFIGSET_PROJ }, |
| 67 | { "manifest", CONFIGSET_PROJ }, |
| 68 | { "ignore-glob", CONFIGSET_PROJ }, |
| 69 | { "keep-glob", CONFIGSET_PROJ }, |
| 70 | { "crnl-glob", CONFIGSET_PROJ }, |
| 71 | { "empty-dirs", CONFIGSET_PROJ }, |
| 72 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 73 | |
| 74 | { "ticket-table", CONFIGSET_TKT }, |
| 75 |
+1
-1
| --- www/settings.wiki | ||
| +++ www/settings.wiki | ||
| @@ -18,11 +18,11 @@ | ||
| 18 | 18 | |
| 19 | 19 | <h3>"Versionable" settings</h3> |
| 20 | 20 | |
| 21 | 21 | Most of the settings control the behaviour of fossil on your local machine, largely acting to reflect your preference on how you want to use Fossil, how you communicate with the server, or options for hosting a repository on the web. |
| 22 | 22 | |
| 23 | -However, for historical reasons, some settings affect how you work with versioned files. These are <tt>allow-symlinks</tt>, <tt>binary-glob</tt>, <tt>crnl-glob</tt>, <tt>empty-dirs</tt>, <tt>encoding-glob</tt>, <tt>ignore-glob</tt> and <tt>manifest</tt>. The most important is <tt>ignore-glob</tt> which specifies which files should be ignored when looking for unmanaged files with the <tt>extras</tt> command. | |
| 23 | +However, for historical reasons, some settings affect how you work with versioned files. These are <tt>allow-symlinks</tt>, <tt>binary-glob</tt>, <tt>crnl-glob</tt>, <tt>empty-dirs</tt>, <tt>encoding-glob</tt>, <tt>ignore-glob</tt>, <tt>keep-glob</tt> and <tt>manifest</tt>. The most important is <tt>ignore-glob</tt> which specifies which files should be ignored when looking for unmanaged files with the <tt>extras</tt> command. | |
| 24 | 24 | |
| 25 | 25 | Because these options can change over time, and the inconvenience of replicating changes, these settings are "versionable". As well as being able to be set using the <tt>settings</tt> command or the web interface, you can created versioned files in the <tt>.fossil-settings</tt> directory named with the setting name. The contents of the file is the value of the setting, and these files are checked in, committed, merged, and so on, as with any other file. |
| 26 | 26 | |
| 27 | 27 | Where a setting is a list of values, such as <tt>ignore-glob</tt>, you can use a newline as a separator as well as a comma. |
| 28 | 28 | |
| 29 | 29 |
| --- www/settings.wiki | |
| +++ www/settings.wiki | |
| @@ -18,11 +18,11 @@ | |
| 18 | |
| 19 | <h3>"Versionable" settings</h3> |
| 20 | |
| 21 | Most of the settings control the behaviour of fossil on your local machine, largely acting to reflect your preference on how you want to use Fossil, how you communicate with the server, or options for hosting a repository on the web. |
| 22 | |
| 23 | However, for historical reasons, some settings affect how you work with versioned files. These are <tt>allow-symlinks</tt>, <tt>binary-glob</tt>, <tt>crnl-glob</tt>, <tt>empty-dirs</tt>, <tt>encoding-glob</tt>, <tt>ignore-glob</tt> and <tt>manifest</tt>. The most important is <tt>ignore-glob</tt> which specifies which files should be ignored when looking for unmanaged files with the <tt>extras</tt> command. |
| 24 | |
| 25 | Because these options can change over time, and the inconvenience of replicating changes, these settings are "versionable". As well as being able to be set using the <tt>settings</tt> command or the web interface, you can created versioned files in the <tt>.fossil-settings</tt> directory named with the setting name. The contents of the file is the value of the setting, and these files are checked in, committed, merged, and so on, as with any other file. |
| 26 | |
| 27 | Where a setting is a list of values, such as <tt>ignore-glob</tt>, you can use a newline as a separator as well as a comma. |
| 28 | |
| 29 |
| --- www/settings.wiki | |
| +++ www/settings.wiki | |
| @@ -18,11 +18,11 @@ | |
| 18 | |
| 19 | <h3>"Versionable" settings</h3> |
| 20 | |
| 21 | Most of the settings control the behaviour of fossil on your local machine, largely acting to reflect your preference on how you want to use Fossil, how you communicate with the server, or options for hosting a repository on the web. |
| 22 | |
| 23 | However, for historical reasons, some settings affect how you work with versioned files. These are <tt>allow-symlinks</tt>, <tt>binary-glob</tt>, <tt>crnl-glob</tt>, <tt>empty-dirs</tt>, <tt>encoding-glob</tt>, <tt>ignore-glob</tt>, <tt>keep-glob</tt> and <tt>manifest</tt>. The most important is <tt>ignore-glob</tt> which specifies which files should be ignored when looking for unmanaged files with the <tt>extras</tt> command. |
| 24 | |
| 25 | Because these options can change over time, and the inconvenience of replicating changes, these settings are "versionable". As well as being able to be set using the <tt>settings</tt> command or the web interface, you can created versioned files in the <tt>.fossil-settings</tt> directory named with the setting name. The contents of the file is the value of the setting, and these files are checked in, committed, merged, and so on, as with any other file. |
| 26 | |
| 27 | Where a setting is a list of values, such as <tt>ignore-glob</tt>, you can use a newline as a separator as well as a comma. |
| 28 | |
| 29 |