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.

drh 2015-04-29 12:32 trunk
Commit ee5a6567ae3239cb89df417ff1a907fb9e9ed453
1 file changed +11 -11
+11 -11
--- src/checkin.c
+++ src/checkin.c
@@ -626,20 +626,21 @@
626626
** cannot be undone. If one or more PATH arguments appear, then only
627627
** the files named, or files contained with directories named, will be
628628
** removed.
629629
**
630630
** 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.
636636
** Files and subdirectories whose names begin with "." are automatically
637637
** ignored unless the --dotfiles option is used.
638638
**
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.
641642
**
642643
** Options:
643644
** --allckouts Check for empty directories within any checkouts
644645
** that may be nested within the current one. This
645646
** option should be used with great care because the
@@ -659,18 +660,19 @@
659660
** therefore, directories that contain only files
660661
** that were removed will be removed as well.
661662
** -f|--force Remove files without prompting.
662663
** -x|--verily Remove everything that is not a managed file or
663664
** the repository itself. Implies -f --emptydirs
664
-** --dotfiles --ignore '' --keep ''.
665
+** --dotfiles. Disregard keep-glob and ignore-glob.
665666
** --clean <CSG> Never prompt for files matching this
666667
** comma separated list of glob patterns.
667668
** --ignore <CSG> Ignore files matching patterns from the
668669
** comma separated list of glob patterns.
669670
** --keep <CSG> Keep files matching this comma separated
670671
** 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.
672674
** --temp Remove only Fossil-generated temporary files.
673675
** -v|--verbose Show all files as they are removed.
674676
**
675677
** See also: addremove, extras, status
676678
*/
@@ -703,12 +705,10 @@
703705
db_must_be_within_tree();
704706
if( find_option("verily","x",0)!=0 ){
705707
verilyFlag = allFileFlag = allDirFlag = 1;
706708
emptyDirsFlag = 1;
707709
scanFlags |= SCAN_ALL;
708
- zKeepFlag = 0;
709
- zIgnoreFlag = 0;
710710
zCleanFlag = 0;
711711
}
712712
if( zIgnoreFlag==0 && !verilyFlag ){
713713
zIgnoreFlag = db_get("ignore-glob", 0);
714714
}
715715
--- 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

Keyboard Shortcuts

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