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).
Commit
b5b62b3d576cc2fb6674b66aed38ac062ac6442c
Parent
e90503d6174df74…
1 file changed
+8
+8
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -498,10 +498,11 @@ | ||
| 498 | 498 | " ORDER BY 1", |
| 499 | 499 | fossil_all_reserved_names(0) |
| 500 | 500 | ); |
| 501 | 501 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 502 | 502 | blob_zero(&rewrittenPathname); |
| 503 | + g.allowSymlinks = 1; /* Report on symbolic links */ | |
| 503 | 504 | while( db_step(&q)==SQLITE_ROW ){ |
| 504 | 505 | zDisplayName = zPathname = db_column_text(&q, 0); |
| 505 | 506 | if( cwdRelative ) { |
| 506 | 507 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 507 | 508 | file_relative_name(zFullName, &rewrittenPathname, 0); |
| @@ -563,10 +564,11 @@ | ||
| 563 | 564 | ** argument. Matching files, if any, are removed |
| 564 | 565 | ** prior to checking for any empty directories; |
| 565 | 566 | ** therefore, directories that contain only files |
| 566 | 567 | ** that were removed will be removed as well. |
| 567 | 568 | ** -f|--force Remove files without prompting. |
| 569 | +** --verily Shorthand for: -f --emptydirs --dotfiles | |
| 568 | 570 | ** --clean <CSG> Never prompt for files matching this |
| 569 | 571 | ** comma separated list of glob patterns. |
| 570 | 572 | ** --ignore <CSG> Ignore files matching patterns from the |
| 571 | 573 | ** comma separated list of glob patterns. |
| 572 | 574 | ** --keep <CSG> Keep files matching this comma separated |
| @@ -601,10 +603,15 @@ | ||
| 601 | 603 | zIgnoreFlag = find_option("ignore",0,1); |
| 602 | 604 | verboseFlag = find_option("verbose","v",0)!=0; |
| 603 | 605 | zKeepFlag = find_option("keep",0,1); |
| 604 | 606 | zCleanFlag = find_option("clean",0,1); |
| 605 | 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 | + } | |
| 606 | 613 | if( zIgnoreFlag==0 ){ |
| 607 | 614 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 608 | 615 | } |
| 609 | 616 | if( zKeepFlag==0 ){ |
| 610 | 617 | zKeepFlag = db_get("keep-glob", 0); |
| @@ -615,10 +622,11 @@ | ||
| 615 | 622 | verify_all_options(); |
| 616 | 623 | pIgnore = glob_create(zIgnoreFlag); |
| 617 | 624 | pKeep = glob_create(zKeepFlag); |
| 618 | 625 | pClean = glob_create(zCleanFlag); |
| 619 | 626 | nRoot = (int)strlen(g.zLocalRoot); |
| 627 | + g.allowSymlinks = 1; /* Find symlinks too */ | |
| 620 | 628 | if( !dirsOnlyFlag ){ |
| 621 | 629 | Stmt q; |
| 622 | 630 | Blob repo; |
| 623 | 631 | locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0); |
| 624 | 632 | db_prepare(&q, |
| 625 | 633 |
| --- 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 |