Fossil SCM

Merge trunk. Make fossil clean undoable only when -x|--verily is not specified. And cleaning files matching ignore-glob will never be undoable.

jan.nijtmans 2015-06-26 20:11 undo-clean merge
Commit 134d8e1189d39650bda08a565c1cc629f98dec67
3 files changed +1 -1 +12 -10 +12 -10
+1 -1
--- Dockerfile
+++ Dockerfile
@@ -10,11 +10,11 @@
1010
ENV FOSSIL_INSTALL_VERSION trunk
1111
1212
RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx
1313
RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install
1414
RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx
15
-RUN cd fossil-src && ./configure --disable-lineedit --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl
15
+RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl
1616
RUN cd fossil-src && make && strip fossil && cp fossil /usr/bin && cd .. && rm -rf fossil-src && chmod a+rx /usr/bin/fossil && mkdir -p /opt/fossil && chown fossil:fossil /opt/fossil
1717
1818
### Build is done, remove modules no longer needed
1919
RUN yum remove -y gcc make zlib-devel openssl-devel tar && yum clean all
2020
2121
--- Dockerfile
+++ Dockerfile
@@ -10,11 +10,11 @@
10 ENV FOSSIL_INSTALL_VERSION trunk
11
12 RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx
13 RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install
14 RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx
15 RUN cd fossil-src && ./configure --disable-lineedit --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl
16 RUN cd fossil-src && make && strip fossil && cp fossil /usr/bin && cd .. && rm -rf fossil-src && chmod a+rx /usr/bin/fossil && mkdir -p /opt/fossil && chown fossil:fossil /opt/fossil
17
18 ### Build is done, remove modules no longer needed
19 RUN yum remove -y gcc make zlib-devel openssl-devel tar && yum clean all
20
21
--- Dockerfile
+++ Dockerfile
@@ -10,11 +10,11 @@
10 ENV FOSSIL_INSTALL_VERSION trunk
11
12 RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx
13 RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install
14 RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx
15 RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl
16 RUN cd fossil-src && make && strip fossil && cp fossil /usr/bin && cd .. && rm -rf fossil-src && chmod a+rx /usr/bin/fossil && mkdir -p /opt/fossil && chown fossil:fossil /opt/fossil
17
18 ### Build is done, remove modules no longer needed
19 RUN yum remove -y gcc make zlib-devel openssl-devel tar && yum clean all
20
21
+12 -10
--- src/checkin.c
+++ src/checkin.c
@@ -668,15 +668,15 @@
668668
** or another applicable setting or command line
669669
** argument. Matching files, if any, are removed
670670
** prior to checking for any empty directories;
671671
** therefore, directories that contain only files
672672
** that were removed will be removed as well.
673
-** -f|--force Remove files without prompting. The clean
674
-** will be faster but not undo-able any more.
673
+** -f|--force Remove files without prompting.
675674
** -x|--verily Remove everything that is not a managed file or
676675
** the repository itself. Implies -f --emptydirs
677676
** --dotfiles. Disregard keep-glob and ignore-glob.
677
+** The clean will be faster but not undo-able any more.
678678
** --clean <CSG> Never prompt for files matching this
679679
** comma separated list of glob patterns.
680680
** --ignore <CSG> Ignore files matching patterns from the
681681
** comma separated list of glob patterns.
682682
** --keep <CSG> Keep files matching this comma separated
@@ -694,13 +694,10 @@
694694
unsigned scanFlags = 0;
695695
int verilyFlag = 0;
696696
const char *zIgnoreFlag, *zKeepFlag, *zCleanFlag;
697697
Glob *pIgnore, *pKeep, *pClean;
698698
int nRoot;
699
- char cReply;
700
- Blob ans;
701
- char *prompt;
702699
703700
dryRunFlag = find_option("dry-run","n",0)!=0;
704701
if( !dryRunFlag ){
705702
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
706703
}
@@ -725,11 +722,11 @@
725722
verilyFlag = allFileFlag = allDirFlag = 1;
726723
emptyDirsFlag = 1;
727724
scanFlags |= SCAN_ALL;
728725
zCleanFlag = 0;
729726
}
730
- if( zIgnoreFlag==0 && !verilyFlag ){
727
+ if( zIgnoreFlag==0 ){
731728
zIgnoreFlag = db_get("ignore-glob", 0);
732729
}
733730
if( zKeepFlag==0 && !verilyFlag ){
734731
zKeepFlag = db_get("keep-glob", 0);
735732
}
@@ -745,11 +742,15 @@
745742
g.allowSymlinks = 1; /* Find symlinks too */
746743
if( !forceFlag && !dryRunFlag ) undo_begin();
747744
if( !dirsOnlyFlag ){
748745
Stmt q;
749746
Blob repo;
750
- locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
747
+ char cReply;
748
+ Blob ans;
749
+ char *prompt;
750
+
751
+ locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, verilyFlag ? 0 : pIgnore, 0);
751752
db_prepare(&q,
752753
"SELECT %Q || x FROM sfile"
753754
" WHERE x NOT IN (%s)"
754755
" ORDER BY 1",
755756
g.zLocalRoot, fossil_all_reserved_names(0)
@@ -778,11 +779,12 @@
778779
blob_reset(&ans);
779780
continue;
780781
}
781782
blob_reset(&ans);
782783
}
783
- if( !dryRunFlag && undo_save(zName+nRoot, 10*1024*1024) ){
784
+ if( !dryRunFlag && !verilyFlag && !glob_match(pIgnore, zName+nRoot)
785
+ && undo_save(zName+nRoot, 10*1024*1024) ){
784786
prompt = mprintf("file \"%s\" too big. Deletion will not be "
785787
"undo-able. Continue (y/N)? ", zName+nRoot);
786788
blob_zero(&ans);
787789
prompt_user(prompt, &ans);
788790
cReply = blob_str(&ans)[0];
@@ -804,12 +806,12 @@
804806
if( emptyDirsFlag ){
805807
Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0));
806808
Stmt q;
807809
Blob root;
808810
blob_init(&root, g.zLocalRoot, nRoot - 1);
809
- vfile_dir_scan(&root, blob_size(&root), scanFlags, pIgnore,
810
- pEmptyDirs);
811
+ vfile_dir_scan(&root, blob_size(&root), scanFlags,
812
+ verilyFlag ? 0 : pIgnore, pEmptyDirs);
811813
blob_reset(&root);
812814
db_prepare(&q,
813815
"SELECT %Q || x FROM dscan_temp"
814816
" WHERE x NOT IN (%s) AND y = 0"
815817
" ORDER BY 1 DESC",
816818
--- src/checkin.c
+++ src/checkin.c
@@ -668,15 +668,15 @@
668 ** or another applicable setting or command line
669 ** argument. Matching files, if any, are removed
670 ** prior to checking for any empty directories;
671 ** therefore, directories that contain only files
672 ** that were removed will be removed as well.
673 ** -f|--force Remove files without prompting. The clean
674 ** will be faster but not undo-able any more.
675 ** -x|--verily Remove everything that is not a managed file or
676 ** the repository itself. Implies -f --emptydirs
677 ** --dotfiles. Disregard keep-glob and ignore-glob.
 
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
@@ -694,13 +694,10 @@
694 unsigned scanFlags = 0;
695 int verilyFlag = 0;
696 const char *zIgnoreFlag, *zKeepFlag, *zCleanFlag;
697 Glob *pIgnore, *pKeep, *pClean;
698 int nRoot;
699 char cReply;
700 Blob ans;
701 char *prompt;
702
703 dryRunFlag = find_option("dry-run","n",0)!=0;
704 if( !dryRunFlag ){
705 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
706 }
@@ -725,11 +722,11 @@
725 verilyFlag = allFileFlag = allDirFlag = 1;
726 emptyDirsFlag = 1;
727 scanFlags |= SCAN_ALL;
728 zCleanFlag = 0;
729 }
730 if( zIgnoreFlag==0 && !verilyFlag ){
731 zIgnoreFlag = db_get("ignore-glob", 0);
732 }
733 if( zKeepFlag==0 && !verilyFlag ){
734 zKeepFlag = db_get("keep-glob", 0);
735 }
@@ -745,11 +742,15 @@
745 g.allowSymlinks = 1; /* Find symlinks too */
746 if( !forceFlag && !dryRunFlag ) undo_begin();
747 if( !dirsOnlyFlag ){
748 Stmt q;
749 Blob repo;
750 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
 
 
 
 
751 db_prepare(&q,
752 "SELECT %Q || x FROM sfile"
753 " WHERE x NOT IN (%s)"
754 " ORDER BY 1",
755 g.zLocalRoot, fossil_all_reserved_names(0)
@@ -778,11 +779,12 @@
778 blob_reset(&ans);
779 continue;
780 }
781 blob_reset(&ans);
782 }
783 if( !dryRunFlag && undo_save(zName+nRoot, 10*1024*1024) ){
 
784 prompt = mprintf("file \"%s\" too big. Deletion will not be "
785 "undo-able. Continue (y/N)? ", zName+nRoot);
786 blob_zero(&ans);
787 prompt_user(prompt, &ans);
788 cReply = blob_str(&ans)[0];
@@ -804,12 +806,12 @@
804 if( emptyDirsFlag ){
805 Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0));
806 Stmt q;
807 Blob root;
808 blob_init(&root, g.zLocalRoot, nRoot - 1);
809 vfile_dir_scan(&root, blob_size(&root), scanFlags, pIgnore,
810 pEmptyDirs);
811 blob_reset(&root);
812 db_prepare(&q,
813 "SELECT %Q || x FROM dscan_temp"
814 " WHERE x NOT IN (%s) AND y = 0"
815 " ORDER BY 1 DESC",
816
--- src/checkin.c
+++ src/checkin.c
@@ -668,15 +668,15 @@
668 ** or another applicable setting or command line
669 ** argument. Matching files, if any, are removed
670 ** prior to checking for any empty directories;
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
@@ -694,13 +694,10 @@
694 unsigned scanFlags = 0;
695 int verilyFlag = 0;
696 const char *zIgnoreFlag, *zKeepFlag, *zCleanFlag;
697 Glob *pIgnore, *pKeep, *pClean;
698 int nRoot;
 
 
 
699
700 dryRunFlag = find_option("dry-run","n",0)!=0;
701 if( !dryRunFlag ){
702 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
703 }
@@ -725,11 +722,11 @@
722 verilyFlag = allFileFlag = allDirFlag = 1;
723 emptyDirsFlag = 1;
724 scanFlags |= SCAN_ALL;
725 zCleanFlag = 0;
726 }
727 if( zIgnoreFlag==0 ){
728 zIgnoreFlag = db_get("ignore-glob", 0);
729 }
730 if( zKeepFlag==0 && !verilyFlag ){
731 zKeepFlag = db_get("keep-glob", 0);
732 }
@@ -745,11 +742,15 @@
742 g.allowSymlinks = 1; /* Find symlinks too */
743 if( !forceFlag && !dryRunFlag ) undo_begin();
744 if( !dirsOnlyFlag ){
745 Stmt q;
746 Blob repo;
747 char cReply;
748 Blob ans;
749 char *prompt;
750
751 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, verilyFlag ? 0 : pIgnore, 0);
752 db_prepare(&q,
753 "SELECT %Q || x FROM sfile"
754 " WHERE x NOT IN (%s)"
755 " ORDER BY 1",
756 g.zLocalRoot, fossil_all_reserved_names(0)
@@ -778,11 +779,12 @@
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 cReply = blob_str(&ans)[0];
@@ -804,12 +806,12 @@
806 if( emptyDirsFlag ){
807 Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0));
808 Stmt q;
809 Blob root;
810 blob_init(&root, g.zLocalRoot, nRoot - 1);
811 vfile_dir_scan(&root, blob_size(&root), scanFlags,
812 verilyFlag ? 0 : pIgnore, pEmptyDirs);
813 blob_reset(&root);
814 db_prepare(&q,
815 "SELECT %Q || x FROM dscan_temp"
816 " WHERE x NOT IN (%s) AND y = 0"
817 " ORDER BY 1 DESC",
818
+12 -10
--- src/checkin.c
+++ src/checkin.c
@@ -668,15 +668,15 @@
668668
** or another applicable setting or command line
669669
** argument. Matching files, if any, are removed
670670
** prior to checking for any empty directories;
671671
** therefore, directories that contain only files
672672
** that were removed will be removed as well.
673
-** -f|--force Remove files without prompting. The clean
674
-** will be faster but not undo-able any more.
673
+** -f|--force Remove files without prompting.
675674
** -x|--verily Remove everything that is not a managed file or
676675
** the repository itself. Implies -f --emptydirs
677676
** --dotfiles. Disregard keep-glob and ignore-glob.
677
+** The clean will be faster but not undo-able any more.
678678
** --clean <CSG> Never prompt for files matching this
679679
** comma separated list of glob patterns.
680680
** --ignore <CSG> Ignore files matching patterns from the
681681
** comma separated list of glob patterns.
682682
** --keep <CSG> Keep files matching this comma separated
@@ -694,13 +694,10 @@
694694
unsigned scanFlags = 0;
695695
int verilyFlag = 0;
696696
const char *zIgnoreFlag, *zKeepFlag, *zCleanFlag;
697697
Glob *pIgnore, *pKeep, *pClean;
698698
int nRoot;
699
- char cReply;
700
- Blob ans;
701
- char *prompt;
702699
703700
dryRunFlag = find_option("dry-run","n",0)!=0;
704701
if( !dryRunFlag ){
705702
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
706703
}
@@ -725,11 +722,11 @@
725722
verilyFlag = allFileFlag = allDirFlag = 1;
726723
emptyDirsFlag = 1;
727724
scanFlags |= SCAN_ALL;
728725
zCleanFlag = 0;
729726
}
730
- if( zIgnoreFlag==0 && !verilyFlag ){
727
+ if( zIgnoreFlag==0 ){
731728
zIgnoreFlag = db_get("ignore-glob", 0);
732729
}
733730
if( zKeepFlag==0 && !verilyFlag ){
734731
zKeepFlag = db_get("keep-glob", 0);
735732
}
@@ -745,11 +742,15 @@
745742
g.allowSymlinks = 1; /* Find symlinks too */
746743
if( !forceFlag && !dryRunFlag ) undo_begin();
747744
if( !dirsOnlyFlag ){
748745
Stmt q;
749746
Blob repo;
750
- locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
747
+ char cReply;
748
+ Blob ans;
749
+ char *prompt;
750
+
751
+ locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, verilyFlag ? 0 : pIgnore, 0);
751752
db_prepare(&q,
752753
"SELECT %Q || x FROM sfile"
753754
" WHERE x NOT IN (%s)"
754755
" ORDER BY 1",
755756
g.zLocalRoot, fossil_all_reserved_names(0)
@@ -778,11 +779,12 @@
778779
blob_reset(&ans);
779780
continue;
780781
}
781782
blob_reset(&ans);
782783
}
783
- if( !dryRunFlag && undo_save(zName+nRoot, 10*1024*1024) ){
784
+ if( !dryRunFlag && !verilyFlag && !glob_match(pIgnore, zName+nRoot)
785
+ && undo_save(zName+nRoot, 10*1024*1024) ){
784786
prompt = mprintf("file \"%s\" too big. Deletion will not be "
785787
"undo-able. Continue (y/N)? ", zName+nRoot);
786788
blob_zero(&ans);
787789
prompt_user(prompt, &ans);
788790
cReply = blob_str(&ans)[0];
@@ -804,12 +806,12 @@
804806
if( emptyDirsFlag ){
805807
Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0));
806808
Stmt q;
807809
Blob root;
808810
blob_init(&root, g.zLocalRoot, nRoot - 1);
809
- vfile_dir_scan(&root, blob_size(&root), scanFlags, pIgnore,
810
- pEmptyDirs);
811
+ vfile_dir_scan(&root, blob_size(&root), scanFlags,
812
+ verilyFlag ? 0 : pIgnore, pEmptyDirs);
811813
blob_reset(&root);
812814
db_prepare(&q,
813815
"SELECT %Q || x FROM dscan_temp"
814816
" WHERE x NOT IN (%s) AND y = 0"
815817
" ORDER BY 1 DESC",
816818
--- src/checkin.c
+++ src/checkin.c
@@ -668,15 +668,15 @@
668 ** or another applicable setting or command line
669 ** argument. Matching files, if any, are removed
670 ** prior to checking for any empty directories;
671 ** therefore, directories that contain only files
672 ** that were removed will be removed as well.
673 ** -f|--force Remove files without prompting. The clean
674 ** will be faster but not undo-able any more.
675 ** -x|--verily Remove everything that is not a managed file or
676 ** the repository itself. Implies -f --emptydirs
677 ** --dotfiles. Disregard keep-glob and ignore-glob.
 
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
@@ -694,13 +694,10 @@
694 unsigned scanFlags = 0;
695 int verilyFlag = 0;
696 const char *zIgnoreFlag, *zKeepFlag, *zCleanFlag;
697 Glob *pIgnore, *pKeep, *pClean;
698 int nRoot;
699 char cReply;
700 Blob ans;
701 char *prompt;
702
703 dryRunFlag = find_option("dry-run","n",0)!=0;
704 if( !dryRunFlag ){
705 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
706 }
@@ -725,11 +722,11 @@
725 verilyFlag = allFileFlag = allDirFlag = 1;
726 emptyDirsFlag = 1;
727 scanFlags |= SCAN_ALL;
728 zCleanFlag = 0;
729 }
730 if( zIgnoreFlag==0 && !verilyFlag ){
731 zIgnoreFlag = db_get("ignore-glob", 0);
732 }
733 if( zKeepFlag==0 && !verilyFlag ){
734 zKeepFlag = db_get("keep-glob", 0);
735 }
@@ -745,11 +742,15 @@
745 g.allowSymlinks = 1; /* Find symlinks too */
746 if( !forceFlag && !dryRunFlag ) undo_begin();
747 if( !dirsOnlyFlag ){
748 Stmt q;
749 Blob repo;
750 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
 
 
 
 
751 db_prepare(&q,
752 "SELECT %Q || x FROM sfile"
753 " WHERE x NOT IN (%s)"
754 " ORDER BY 1",
755 g.zLocalRoot, fossil_all_reserved_names(0)
@@ -778,11 +779,12 @@
778 blob_reset(&ans);
779 continue;
780 }
781 blob_reset(&ans);
782 }
783 if( !dryRunFlag && undo_save(zName+nRoot, 10*1024*1024) ){
 
784 prompt = mprintf("file \"%s\" too big. Deletion will not be "
785 "undo-able. Continue (y/N)? ", zName+nRoot);
786 blob_zero(&ans);
787 prompt_user(prompt, &ans);
788 cReply = blob_str(&ans)[0];
@@ -804,12 +806,12 @@
804 if( emptyDirsFlag ){
805 Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0));
806 Stmt q;
807 Blob root;
808 blob_init(&root, g.zLocalRoot, nRoot - 1);
809 vfile_dir_scan(&root, blob_size(&root), scanFlags, pIgnore,
810 pEmptyDirs);
811 blob_reset(&root);
812 db_prepare(&q,
813 "SELECT %Q || x FROM dscan_temp"
814 " WHERE x NOT IN (%s) AND y = 0"
815 " ORDER BY 1 DESC",
816
--- src/checkin.c
+++ src/checkin.c
@@ -668,15 +668,15 @@
668 ** or another applicable setting or command line
669 ** argument. Matching files, if any, are removed
670 ** prior to checking for any empty directories;
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
@@ -694,13 +694,10 @@
694 unsigned scanFlags = 0;
695 int verilyFlag = 0;
696 const char *zIgnoreFlag, *zKeepFlag, *zCleanFlag;
697 Glob *pIgnore, *pKeep, *pClean;
698 int nRoot;
 
 
 
699
700 dryRunFlag = find_option("dry-run","n",0)!=0;
701 if( !dryRunFlag ){
702 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
703 }
@@ -725,11 +722,11 @@
722 verilyFlag = allFileFlag = allDirFlag = 1;
723 emptyDirsFlag = 1;
724 scanFlags |= SCAN_ALL;
725 zCleanFlag = 0;
726 }
727 if( zIgnoreFlag==0 ){
728 zIgnoreFlag = db_get("ignore-glob", 0);
729 }
730 if( zKeepFlag==0 && !verilyFlag ){
731 zKeepFlag = db_get("keep-glob", 0);
732 }
@@ -745,11 +742,15 @@
742 g.allowSymlinks = 1; /* Find symlinks too */
743 if( !forceFlag && !dryRunFlag ) undo_begin();
744 if( !dirsOnlyFlag ){
745 Stmt q;
746 Blob repo;
747 char cReply;
748 Blob ans;
749 char *prompt;
750
751 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, verilyFlag ? 0 : pIgnore, 0);
752 db_prepare(&q,
753 "SELECT %Q || x FROM sfile"
754 " WHERE x NOT IN (%s)"
755 " ORDER BY 1",
756 g.zLocalRoot, fossil_all_reserved_names(0)
@@ -778,11 +779,12 @@
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 cReply = blob_str(&ans)[0];
@@ -804,12 +806,12 @@
806 if( emptyDirsFlag ){
807 Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0));
808 Stmt q;
809 Blob root;
810 blob_init(&root, g.zLocalRoot, nRoot - 1);
811 vfile_dir_scan(&root, blob_size(&root), scanFlags,
812 verilyFlag ? 0 : pIgnore, pEmptyDirs);
813 blob_reset(&root);
814 db_prepare(&q,
815 "SELECT %Q || x FROM dscan_temp"
816 " WHERE x NOT IN (%s) AND y = 0"
817 " ORDER BY 1 DESC",
818

Keyboard Shortcuts

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