Fossil SCM
Change the "fossil clean --verily" option so that it does honor --keep and --ignore command-line options, but always disregards keep-glob and ignore-glob settings.
Commit
ee5a6567ae3239cb89df417ff1a907fb9e9ed453
Parent
897acdc89fe903e…
1 file changed
+11
-11
+11
-11
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -626,20 +626,21 @@ | ||
| 626 | 626 | ** cannot be undone. If one or more PATH arguments appear, then only |
| 627 | 627 | ** the files named, or files contained with directories named, will be |
| 628 | 628 | ** removed. |
| 629 | 629 | ** |
| 630 | 630 | ** Prompted are issued to confirm the removal of each file, unless |
| 631 | -** the --force or --verily flag is used or unless the file matches | |
| 632 | -** glob pattern specified by the --clean option. No file that matches | |
| 633 | -** glob patterns specified by --ignore or --keep will ever be deleted. | |
| 634 | -** The default values for --clean, --ignore, and --keep are determined | |
| 635 | -** by the (versionable) clean-glob, ignore-glob, and keep-glob settings. | |
| 631 | +** the --force flag is used or unless the file matches glob pattern | |
| 632 | +** specified by the --clean option. No file that matches glob patterns | |
| 633 | +** specified by --ignore or --keep will ever be deleted. The default | |
| 634 | +** values for --clean, --ignore, and --keep are determined by the | |
| 635 | +** (versionable) clean-glob, ignore-glob, and keep-glob settings. | |
| 636 | 636 | ** Files and subdirectories whose names begin with "." are automatically |
| 637 | 637 | ** ignored unless the --dotfiles option is used. |
| 638 | 638 | ** |
| 639 | -** The --verily option overrides all other options and settings and | |
| 640 | -** deletes all unmanaged files and empty directories without prompting. | |
| 639 | +** The --verily option ignores the keep-glob and ignore-glob settings | |
| 640 | +** and turns on --force, --dotfiles, and --emptydirs. Use the --verily | |
| 641 | +** option when you really want to clean up everything. | |
| 641 | 642 | ** |
| 642 | 643 | ** Options: |
| 643 | 644 | ** --allckouts Check for empty directories within any checkouts |
| 644 | 645 | ** that may be nested within the current one. This |
| 645 | 646 | ** option should be used with great care because the |
| @@ -659,18 +660,19 @@ | ||
| 659 | 660 | ** therefore, directories that contain only files |
| 660 | 661 | ** that were removed will be removed as well. |
| 661 | 662 | ** -f|--force Remove files without prompting. |
| 662 | 663 | ** -x|--verily Remove everything that is not a managed file or |
| 663 | 664 | ** the repository itself. Implies -f --emptydirs |
| 664 | -** --dotfiles --ignore '' --keep ''. | |
| 665 | +** --dotfiles. Disregard keep-glob and ignore-glob. | |
| 665 | 666 | ** --clean <CSG> Never prompt for files matching this |
| 666 | 667 | ** comma separated list of glob patterns. |
| 667 | 668 | ** --ignore <CSG> Ignore files matching patterns from the |
| 668 | 669 | ** comma separated list of glob patterns. |
| 669 | 670 | ** --keep <CSG> Keep files matching this comma separated |
| 670 | 671 | ** list of glob patterns. |
| 671 | -** -n|--dry-run If given, display instead of run actions. | |
| 672 | +** -n|--dry-run Delete nothing, but display what would have been | |
| 673 | +** deleted. | |
| 672 | 674 | ** --temp Remove only Fossil-generated temporary files. |
| 673 | 675 | ** -v|--verbose Show all files as they are removed. |
| 674 | 676 | ** |
| 675 | 677 | ** See also: addremove, extras, status |
| 676 | 678 | */ |
| @@ -703,12 +705,10 @@ | ||
| 703 | 705 | db_must_be_within_tree(); |
| 704 | 706 | if( find_option("verily","x",0)!=0 ){ |
| 705 | 707 | verilyFlag = allFileFlag = allDirFlag = 1; |
| 706 | 708 | emptyDirsFlag = 1; |
| 707 | 709 | scanFlags |= SCAN_ALL; |
| 708 | - zKeepFlag = 0; | |
| 709 | - zIgnoreFlag = 0; | |
| 710 | 710 | zCleanFlag = 0; |
| 711 | 711 | } |
| 712 | 712 | if( zIgnoreFlag==0 && !verilyFlag ){ |
| 713 | 713 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 714 | 714 | } |
| 715 | 715 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -626,20 +626,21 @@ | |
| 626 | ** cannot be undone. If one or more PATH arguments appear, then only |
| 627 | ** the files named, or files contained with directories named, will be |
| 628 | ** removed. |
| 629 | ** |
| 630 | ** Prompted are issued to confirm the removal of each file, unless |
| 631 | ** the --force or --verily flag is used or unless the file matches |
| 632 | ** glob pattern specified by the --clean option. No file that matches |
| 633 | ** glob patterns specified by --ignore or --keep will ever be deleted. |
| 634 | ** The default values for --clean, --ignore, and --keep are determined |
| 635 | ** by the (versionable) clean-glob, ignore-glob, and keep-glob settings. |
| 636 | ** Files and subdirectories whose names begin with "." are automatically |
| 637 | ** ignored unless the --dotfiles option is used. |
| 638 | ** |
| 639 | ** The --verily option overrides all other options and settings and |
| 640 | ** deletes all unmanaged files and empty directories without prompting. |
| 641 | ** |
| 642 | ** Options: |
| 643 | ** --allckouts Check for empty directories within any checkouts |
| 644 | ** that may be nested within the current one. This |
| 645 | ** option should be used with great care because the |
| @@ -659,18 +660,19 @@ | |
| 659 | ** therefore, directories that contain only files |
| 660 | ** that were removed will be removed as well. |
| 661 | ** -f|--force Remove files without prompting. |
| 662 | ** -x|--verily Remove everything that is not a managed file or |
| 663 | ** the repository itself. Implies -f --emptydirs |
| 664 | ** --dotfiles --ignore '' --keep ''. |
| 665 | ** --clean <CSG> Never prompt for files matching this |
| 666 | ** comma separated list of glob patterns. |
| 667 | ** --ignore <CSG> Ignore files matching patterns from the |
| 668 | ** comma separated list of glob patterns. |
| 669 | ** --keep <CSG> Keep files matching this comma separated |
| 670 | ** list of glob patterns. |
| 671 | ** -n|--dry-run If given, display instead of run actions. |
| 672 | ** --temp Remove only Fossil-generated temporary files. |
| 673 | ** -v|--verbose Show all files as they are removed. |
| 674 | ** |
| 675 | ** See also: addremove, extras, status |
| 676 | */ |
| @@ -703,12 +705,10 @@ | |
| 703 | db_must_be_within_tree(); |
| 704 | if( find_option("verily","x",0)!=0 ){ |
| 705 | verilyFlag = allFileFlag = allDirFlag = 1; |
| 706 | emptyDirsFlag = 1; |
| 707 | scanFlags |= SCAN_ALL; |
| 708 | zKeepFlag = 0; |
| 709 | zIgnoreFlag = 0; |
| 710 | zCleanFlag = 0; |
| 711 | } |
| 712 | if( zIgnoreFlag==0 && !verilyFlag ){ |
| 713 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 714 | } |
| 715 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -626,20 +626,21 @@ | |
| 626 | ** cannot be undone. If one or more PATH arguments appear, then only |
| 627 | ** the files named, or files contained with directories named, will be |
| 628 | ** removed. |
| 629 | ** |
| 630 | ** Prompted are issued to confirm the removal of each file, unless |
| 631 | ** the --force flag is used or unless the file matches glob pattern |
| 632 | ** specified by the --clean option. No file that matches glob patterns |
| 633 | ** specified by --ignore or --keep will ever be deleted. The default |
| 634 | ** values for --clean, --ignore, and --keep are determined by the |
| 635 | ** (versionable) clean-glob, ignore-glob, and keep-glob settings. |
| 636 | ** Files and subdirectories whose names begin with "." are automatically |
| 637 | ** ignored unless the --dotfiles option is used. |
| 638 | ** |
| 639 | ** The --verily option ignores the keep-glob and ignore-glob settings |
| 640 | ** and turns on --force, --dotfiles, and --emptydirs. Use the --verily |
| 641 | ** option when you really want to clean up everything. |
| 642 | ** |
| 643 | ** Options: |
| 644 | ** --allckouts Check for empty directories within any checkouts |
| 645 | ** that may be nested within the current one. This |
| 646 | ** option should be used with great care because the |
| @@ -659,18 +660,19 @@ | |
| 660 | ** therefore, directories that contain only files |
| 661 | ** that were removed will be removed as well. |
| 662 | ** -f|--force Remove files without prompting. |
| 663 | ** -x|--verily Remove everything that is not a managed file or |
| 664 | ** the repository itself. Implies -f --emptydirs |
| 665 | ** --dotfiles. Disregard keep-glob and ignore-glob. |
| 666 | ** --clean <CSG> Never prompt for files matching this |
| 667 | ** comma separated list of glob patterns. |
| 668 | ** --ignore <CSG> Ignore files matching patterns from the |
| 669 | ** comma separated list of glob patterns. |
| 670 | ** --keep <CSG> Keep files matching this comma separated |
| 671 | ** list of glob patterns. |
| 672 | ** -n|--dry-run Delete nothing, but display what would have been |
| 673 | ** deleted. |
| 674 | ** --temp Remove only Fossil-generated temporary files. |
| 675 | ** -v|--verbose Show all files as they are removed. |
| 676 | ** |
| 677 | ** See also: addremove, extras, status |
| 678 | */ |
| @@ -703,12 +705,10 @@ | |
| 705 | db_must_be_within_tree(); |
| 706 | if( find_option("verily","x",0)!=0 ){ |
| 707 | verilyFlag = allFileFlag = allDirFlag = 1; |
| 708 | emptyDirsFlag = 1; |
| 709 | scanFlags |= SCAN_ALL; |
| 710 | zCleanFlag = 0; |
| 711 | } |
| 712 | if( zIgnoreFlag==0 && !verilyFlag ){ |
| 713 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 714 | } |
| 715 |