Fossil SCM

Cleaning files matching ignore-glob should never be undoable. Other files being clean are undoable, even when using -x|--verily. That's how it should behave (I think)

jan.nijtmans 2015-06-26 20:22 undo-clean
Commit b3384326b3a3b52aa273dea71269db39cfcc5f60
1 file changed +4 -3
+4 -3
--- src/checkin.c
+++ src/checkin.c
@@ -671,12 +671,13 @@
671671
** therefore, directories that contain only files
672672
** that were removed will be removed as well.
673673
** -f|--force Remove files without prompting.
674674
** -x|--verily Remove everything that is not a managed file or
675675
** the repository itself. Implies -f --emptydirs
676
-** --dotfiles. Disregard keep-glob and ignore-glob.
677
-** The clean will be faster but not undo-able any more.
676
+** --dotfiles. Disregard keep-glob and ignore-glob,
677
+** except that files matching ignore-glob are not
678
+** never undo-able.
678679
** --clean <CSG> Never prompt for files matching this
679680
** comma separated list of glob patterns.
680681
** --ignore <CSG> Ignore files matching patterns from the
681682
** comma separated list of glob patterns.
682683
** --keep <CSG> Keep files matching this comma separated
@@ -779,11 +780,11 @@
779780
blob_reset(&ans);
780781
continue;
781782
}
782783
blob_reset(&ans);
783784
}
784
- if( !dryRunFlag && !verilyFlag && !glob_match(pIgnore, zName+nRoot)
785
+ if( !dryRunFlag && !(verilyFlag && glob_match(pIgnore, zName+nRoot))
785786
&& undo_save(zName+nRoot, 10*1024*1024) ){
786787
prompt = mprintf("file \"%s\" too big. Deletion will not be "
787788
"undo-able. Continue (y/N)? ", zName+nRoot);
788789
blob_zero(&ans);
789790
prompt_user(prompt, &ans);
790791
--- src/checkin.c
+++ src/checkin.c
@@ -671,12 +671,13 @@
671 ** therefore, directories that contain only files
672 ** that were removed will be removed as well.
673 ** -f|--force Remove files without prompting.
674 ** -x|--verily Remove everything that is not a managed file or
675 ** the repository itself. Implies -f --emptydirs
676 ** --dotfiles. Disregard keep-glob and ignore-glob.
677 ** The clean will be faster but not undo-able any more.
 
678 ** --clean <CSG> Never prompt for files matching this
679 ** comma separated list of glob patterns.
680 ** --ignore <CSG> Ignore files matching patterns from the
681 ** comma separated list of glob patterns.
682 ** --keep <CSG> Keep files matching this comma separated
@@ -779,11 +780,11 @@
779 blob_reset(&ans);
780 continue;
781 }
782 blob_reset(&ans);
783 }
784 if( !dryRunFlag && !verilyFlag && !glob_match(pIgnore, zName+nRoot)
785 && undo_save(zName+nRoot, 10*1024*1024) ){
786 prompt = mprintf("file \"%s\" too big. Deletion will not be "
787 "undo-able. Continue (y/N)? ", zName+nRoot);
788 blob_zero(&ans);
789 prompt_user(prompt, &ans);
790
--- src/checkin.c
+++ src/checkin.c
@@ -671,12 +671,13 @@
671 ** therefore, directories that contain only files
672 ** that were removed will be removed as well.
673 ** -f|--force Remove files without prompting.
674 ** -x|--verily Remove everything that is not a managed file or
675 ** the repository itself. Implies -f --emptydirs
676 ** --dotfiles. Disregard keep-glob and ignore-glob,
677 ** except that files matching ignore-glob are not
678 ** never undo-able.
679 ** --clean <CSG> Never prompt for files matching this
680 ** comma separated list of glob patterns.
681 ** --ignore <CSG> Ignore files matching patterns from the
682 ** comma separated list of glob patterns.
683 ** --keep <CSG> Keep files matching this comma separated
@@ -779,11 +780,11 @@
780 blob_reset(&ans);
781 continue;
782 }
783 blob_reset(&ans);
784 }
785 if( !dryRunFlag && !(verilyFlag && glob_match(pIgnore, zName+nRoot))
786 && undo_save(zName+nRoot, 10*1024*1024) ){
787 prompt = mprintf("file \"%s\" too big. Deletion will not be "
788 "undo-able. Continue (y/N)? ", zName+nRoot);
789 blob_zero(&ans);
790 prompt_user(prompt, &ans);
791

Keyboard Shortcuts

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