Fossil

Check-in [32ed3663]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Let --keep/"keep-glob" survive a --verily (contrary to --ignore/"ignore-glob")
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | clean-verily
Files: files | file ages | folders
SHA1: 32ed3663a1a6cdd198d6bd07b2e35cef94c8dfb1
User & Date: jan.nijtmans 2015-04-29 07:57:19
Context
2015-04-29
12:28
Remove versionable setting "keep-glob", as not everyone wants this. Closed-Leaf check-in: 07fb7f64 user: jan.nijtmans tags: clean-verily
07:57
Let --keep/"keep-glob" survive a --verily (contrary to --ignore/"ignore-glob") check-in: 32ed3663 user: jan.nijtmans tags: clean-verily
07:53
typo check-in: 897acdc8 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

657
658
659
660
661
662
663
664
665
666
667
668
669
670

671
672
673
674
675
676
677
...
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
**                     argument.  Matching files, if any, are removed
**                     prior to checking for any empty directories;
**                     therefore, directories that contain only files
**                     that were removed will be removed as well.
**    -f|--force       Remove files without prompting.
**    -x|--verily      Remove everything that is not a managed file or
**                     the repository itself.  Implies -f --emptydirs
**                     --dotfiles --ignore '' --keep ''.
**    --clean <CSG>    Never prompt for files matching this
**                     comma separated list of glob patterns.
**    --ignore <CSG>   Ignore files matching patterns from the
**                     comma separated list of glob patterns.
**    --keep <CSG>     Keep files matching this comma separated
**                     list of glob patterns.

**    -n|--dry-run     If given, display instead of run actions.
**    --temp           Remove only Fossil-generated temporary files.
**    -v|--verbose     Show all files as they are removed.
**
** See also: addremove, extras, status
*/
void clean_cmd(void){
................................................................................
  zKeepFlag = find_option("keep",0,1);
  zCleanFlag = find_option("clean",0,1);
  db_must_be_within_tree();
  if( find_option("verily","x",0)!=0 ){
    verilyFlag = allFileFlag = allDirFlag = 1;
    emptyDirsFlag = 1;
    scanFlags |= SCAN_ALL;
    zKeepFlag = 0;
    zIgnoreFlag = 0;
    zCleanFlag = 0;
  }
  if( zIgnoreFlag==0 && !verilyFlag ){
    zIgnoreFlag = db_get("ignore-glob", 0);
  }
  if( zKeepFlag==0 && !verilyFlag ){
    zKeepFlag = db_get("keep-glob", 0);
  }
  if( zCleanFlag==0 && !verilyFlag ){
    zCleanFlag = db_get("clean-glob", 0);
  }
  if( db_get_boolean("dotfiles", 0) ) scanFlags |= SCAN_ALL;
  verify_all_options();







|




|
|
>







 







<






|







657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
...
702
703
704
705
706
707
708

709
710
711
712
713
714
715
716
717
718
719
720
721
722
**                     argument.  Matching files, if any, are removed
**                     prior to checking for any empty directories;
**                     therefore, directories that contain only files
**                     that were removed will be removed as well.
**    -f|--force       Remove files without prompting.
**    -x|--verily      Remove everything that is not a managed file or
**                     the repository itself.  Implies -f --emptydirs
**                     --dotfiles --ignore ''.
**    --clean <CSG>    Never prompt for files matching this
**                     comma separated list of glob patterns.
**    --ignore <CSG>   Ignore files matching patterns from the
**                     comma separated list of glob patterns.
**    --keep <CSG>     Ignore files matching this comma separated
**                     list of glob patterns too, but this option
**                     even survives the --verily option.
**    -n|--dry-run     If given, display instead of run actions.
**    --temp           Remove only Fossil-generated temporary files.
**    -v|--verbose     Show all files as they are removed.
**
** See also: addremove, extras, status
*/
void clean_cmd(void){
................................................................................
  zKeepFlag = find_option("keep",0,1);
  zCleanFlag = find_option("clean",0,1);
  db_must_be_within_tree();
  if( find_option("verily","x",0)!=0 ){
    verilyFlag = allFileFlag = allDirFlag = 1;
    emptyDirsFlag = 1;
    scanFlags |= SCAN_ALL;

    zIgnoreFlag = 0;
    zCleanFlag = 0;
  }
  if( zIgnoreFlag==0 && !verilyFlag ){
    zIgnoreFlag = db_get("ignore-glob", 0);
  }
  if( zKeepFlag==0 ){
    zKeepFlag = db_get("keep-glob", 0);
  }
  if( zCleanFlag==0 && !verilyFlag ){
    zCleanFlag = db_get("clean-glob", 0);
  }
  if( db_get_boolean("dotfiles", 0) ) scanFlags |= SCAN_ALL;
  verify_all_options();