Fossil SCM

Add the --verily option to "fossil clean". Cause "fossil clean" and "fossil extra" to see symbolic links even if symbolic link handling is turned off, as links might have been created by external processes (read: autoconf).

drh 2015-01-08 14:30 trunk
Commit b5b62b3d576cc2fb6674b66aed38ac062ac6442c
1 file changed +8
--- src/checkin.c
+++ src/checkin.c
@@ -498,10 +498,11 @@
498498
" ORDER BY 1",
499499
fossil_all_reserved_names(0)
500500
);
501501
db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
502502
blob_zero(&rewrittenPathname);
503
+ g.allowSymlinks = 1; /* Report on symbolic links */
503504
while( db_step(&q)==SQLITE_ROW ){
504505
zDisplayName = zPathname = db_column_text(&q, 0);
505506
if( cwdRelative ) {
506507
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
507508
file_relative_name(zFullName, &rewrittenPathname, 0);
@@ -563,10 +564,11 @@
563564
** argument. Matching files, if any, are removed
564565
** prior to checking for any empty directories;
565566
** therefore, directories that contain only files
566567
** that were removed will be removed as well.
567568
** -f|--force Remove files without prompting.
569
+** --verily Shorthand for: -f --emptydirs --dotfiles
568570
** --clean <CSG> Never prompt for files matching this
569571
** comma separated list of glob patterns.
570572
** --ignore <CSG> Ignore files matching patterns from the
571573
** comma separated list of glob patterns.
572574
** --keep <CSG> Keep files matching this comma separated
@@ -601,10 +603,15 @@
601603
zIgnoreFlag = find_option("ignore",0,1);
602604
verboseFlag = find_option("verbose","v",0)!=0;
603605
zKeepFlag = find_option("keep",0,1);
604606
zCleanFlag = find_option("clean",0,1);
605607
db_must_be_within_tree();
608
+ if( find_option("verily",0,0)!=0 ){
609
+ allFileFlag = allDirFlag = 1;
610
+ emptyDirsFlag = 1;
611
+ scanFlags |= SCAN_ALL;
612
+ }
606613
if( zIgnoreFlag==0 ){
607614
zIgnoreFlag = db_get("ignore-glob", 0);
608615
}
609616
if( zKeepFlag==0 ){
610617
zKeepFlag = db_get("keep-glob", 0);
@@ -615,10 +622,11 @@
615622
verify_all_options();
616623
pIgnore = glob_create(zIgnoreFlag);
617624
pKeep = glob_create(zKeepFlag);
618625
pClean = glob_create(zCleanFlag);
619626
nRoot = (int)strlen(g.zLocalRoot);
627
+ g.allowSymlinks = 1; /* Find symlinks too */
620628
if( !dirsOnlyFlag ){
621629
Stmt q;
622630
Blob repo;
623631
locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
624632
db_prepare(&q,
625633
--- src/checkin.c
+++ src/checkin.c
@@ -498,10 +498,11 @@
498 " ORDER BY 1",
499 fossil_all_reserved_names(0)
500 );
501 db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
502 blob_zero(&rewrittenPathname);
 
503 while( db_step(&q)==SQLITE_ROW ){
504 zDisplayName = zPathname = db_column_text(&q, 0);
505 if( cwdRelative ) {
506 char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
507 file_relative_name(zFullName, &rewrittenPathname, 0);
@@ -563,10 +564,11 @@
563 ** argument. Matching files, if any, are removed
564 ** prior to checking for any empty directories;
565 ** therefore, directories that contain only files
566 ** that were removed will be removed as well.
567 ** -f|--force Remove files without prompting.
 
568 ** --clean <CSG> Never prompt for files matching this
569 ** comma separated list of glob patterns.
570 ** --ignore <CSG> Ignore files matching patterns from the
571 ** comma separated list of glob patterns.
572 ** --keep <CSG> Keep files matching this comma separated
@@ -601,10 +603,15 @@
601 zIgnoreFlag = find_option("ignore",0,1);
602 verboseFlag = find_option("verbose","v",0)!=0;
603 zKeepFlag = find_option("keep",0,1);
604 zCleanFlag = find_option("clean",0,1);
605 db_must_be_within_tree();
 
 
 
 
 
606 if( zIgnoreFlag==0 ){
607 zIgnoreFlag = db_get("ignore-glob", 0);
608 }
609 if( zKeepFlag==0 ){
610 zKeepFlag = db_get("keep-glob", 0);
@@ -615,10 +622,11 @@
615 verify_all_options();
616 pIgnore = glob_create(zIgnoreFlag);
617 pKeep = glob_create(zKeepFlag);
618 pClean = glob_create(zCleanFlag);
619 nRoot = (int)strlen(g.zLocalRoot);
 
620 if( !dirsOnlyFlag ){
621 Stmt q;
622 Blob repo;
623 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
624 db_prepare(&q,
625
--- src/checkin.c
+++ src/checkin.c
@@ -498,10 +498,11 @@
498 " ORDER BY 1",
499 fossil_all_reserved_names(0)
500 );
501 db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
502 blob_zero(&rewrittenPathname);
503 g.allowSymlinks = 1; /* Report on symbolic links */
504 while( db_step(&q)==SQLITE_ROW ){
505 zDisplayName = zPathname = db_column_text(&q, 0);
506 if( cwdRelative ) {
507 char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
508 file_relative_name(zFullName, &rewrittenPathname, 0);
@@ -563,10 +564,11 @@
564 ** argument. Matching files, if any, are removed
565 ** prior to checking for any empty directories;
566 ** therefore, directories that contain only files
567 ** that were removed will be removed as well.
568 ** -f|--force Remove files without prompting.
569 ** --verily Shorthand for: -f --emptydirs --dotfiles
570 ** --clean <CSG> Never prompt for files matching this
571 ** comma separated list of glob patterns.
572 ** --ignore <CSG> Ignore files matching patterns from the
573 ** comma separated list of glob patterns.
574 ** --keep <CSG> Keep files matching this comma separated
@@ -601,10 +603,15 @@
603 zIgnoreFlag = find_option("ignore",0,1);
604 verboseFlag = find_option("verbose","v",0)!=0;
605 zKeepFlag = find_option("keep",0,1);
606 zCleanFlag = find_option("clean",0,1);
607 db_must_be_within_tree();
608 if( find_option("verily",0,0)!=0 ){
609 allFileFlag = allDirFlag = 1;
610 emptyDirsFlag = 1;
611 scanFlags |= SCAN_ALL;
612 }
613 if( zIgnoreFlag==0 ){
614 zIgnoreFlag = db_get("ignore-glob", 0);
615 }
616 if( zKeepFlag==0 ){
617 zKeepFlag = db_get("keep-glob", 0);
@@ -615,10 +622,11 @@
622 verify_all_options();
623 pIgnore = glob_create(zIgnoreFlag);
624 pKeep = glob_create(zKeepFlag);
625 pClean = glob_create(zCleanFlag);
626 nRoot = (int)strlen(g.zLocalRoot);
627 g.allowSymlinks = 1; /* Find symlinks too */
628 if( !dirsOnlyFlag ){
629 Stmt q;
630 Blob repo;
631 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
632 db_prepare(&q,
633

Keyboard Shortcuts

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