Fossil SCM
- Make --force imply --no-warnings - Add --no-warnings to "fossil scrub" and "fossil clean" - Remove "--conflict" option for "fossil merge", use --force for that.
Commit
06e1b67270b521f391b5e4377460822004e03fb4
Parent
e9954e588bccc79…
2 files changed
+12
-12
+6
-5
+12
-12
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -393,28 +393,29 @@ | ||
| 393 | 393 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 394 | 394 | ** is used if the --ignore option is omitted. |
| 395 | 395 | ** |
| 396 | 396 | ** Options: |
| 397 | 397 | ** --dotfiles include files beginning with a dot (".") |
| 398 | -** --force Remove files without prompting | |
| 398 | +** --no-warnings Remove files without prompting | |
| 399 | 399 | ** --ignore <CSG> ignore files matching patterns from the |
| 400 | 400 | ** comma separated list of glob patterns. |
| 401 | 401 | ** --temp Remove only Fossil-generated temporary files |
| 402 | 402 | ** |
| 403 | 403 | ** See also: addremove, extra, status |
| 404 | 404 | */ |
| 405 | 405 | void clean_cmd(void){ |
| 406 | - int allFlag; | |
| 406 | + int allFlag, bForce; | |
| 407 | 407 | unsigned scanFlags = 0; |
| 408 | 408 | const char *zIgnoreFlag; |
| 409 | 409 | Blob path, repo; |
| 410 | 410 | Stmt q; |
| 411 | 411 | int n; |
| 412 | 412 | Glob *pIgnore; |
| 413 | 413 | int testFlag = 0; |
| 414 | 414 | |
| 415 | - allFlag = find_option("force","f",0)!=0; | |
| 415 | + bForce = find_option("force","f",0)!=0; | |
| 416 | + allFlag = find_option("no-warnings", 0, 0)!=0 || bForce; | |
| 416 | 417 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 417 | 418 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 418 | 419 | zIgnoreFlag = find_option("ignore",0,1); |
| 419 | 420 | testFlag = find_option("test",0,0)!=0; |
| 420 | 421 | db_must_be_within_tree(); |
| @@ -1002,16 +1003,16 @@ | ||
| 1002 | 1003 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1003 | 1004 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1004 | 1005 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1005 | 1006 | ** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1006 | 1007 | ** --delta use a delta manifest in the commit process |
| 1007 | -** --force|-f allow forking with this commit | |
| 1008 | +** --force|-f allow forking/unresolved merge conflicts with this commit | |
| 1008 | 1009 | ** --message-file|-M FILE read the commit comment from given file |
| 1009 | 1010 | ** --nosign do not attempt to sign this commit with gpg |
| 1011 | +** --no-warnings do not warn about anything | |
| 1010 | 1012 | ** --private do not sync changes and their descendants |
| 1011 | 1013 | ** --tag TAG-NAME assign given tag TAG-NAME to the checkin |
| 1012 | -** --conflict allow unresolved merge conflicts | |
| 1013 | 1014 | ** --binary-ok do not warn about committing binary files |
| 1014 | 1015 | ** |
| 1015 | 1016 | ** See also: branch, changes, checkout, extra, sync |
| 1016 | 1017 | */ |
| 1017 | 1018 | void commit_cmd(void){ |
| @@ -1024,14 +1025,13 @@ | ||
| 1024 | 1025 | Stmt q; /* Query to find files that have been modified */ |
| 1025 | 1026 | char *zUuid; /* UUID of the new check-in */ |
| 1026 | 1027 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 1027 | 1028 | int isAMerge = 0; /* True if checking in a merge */ |
| 1028 | 1029 | int noWarningFlag = 0; /* True if skipping all warnings */ |
| 1029 | - int forceFlag = 0; /* Force a fork */ | |
| 1030 | + int forceFlag = 0; /* Force a fork/commit with unresolved merge conflicts */ | |
| 1030 | 1031 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1031 | 1032 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1032 | - int allowConflict = 0; /* Allow unresolve merge conflicts */ | |
| 1033 | 1033 | int binaryOk = 0; /* The --binary-ok flag */ |
| 1034 | 1034 | char *zManifestFile; /* Name of the manifest file */ |
| 1035 | 1035 | int useCksum; /* True if checksums should be computed and verified */ |
| 1036 | 1036 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 1037 | 1037 | int testRun; /* True for a test run. Debugging only */ |
| @@ -1062,11 +1062,11 @@ | ||
| 1062 | 1062 | fossil_fatal("cannot use --delta and --baseline together"); |
| 1063 | 1063 | } |
| 1064 | 1064 | testRun = find_option("test",0,0)!=0; |
| 1065 | 1065 | zComment = find_option("comment","m",1); |
| 1066 | 1066 | forceFlag = find_option("force", "f", 0)!=0; |
| 1067 | - noWarningFlag = find_option("no-warnings", 0, 0)!=0; | |
| 1067 | + noWarningFlag = find_option("no-warnings", 0, 0)!=0 || forceFlag; | |
| 1068 | 1068 | zBranch = find_option("branch","b",1); |
| 1069 | 1069 | zColor = find_option("bgcolor",0,1); |
| 1070 | 1070 | zBrClr = find_option("branchcolor",0,1); |
| 1071 | 1071 | binaryOk = find_option("binary-ok",0,0)!=0; |
| 1072 | 1072 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -1081,11 +1081,10 @@ | ||
| 1081 | 1081 | if( zBranch==0 ) zBranch = "private"; |
| 1082 | 1082 | if( zBrClr==0 && zColor==0 ) zBrClr = "#fec084"; /* Orange */ |
| 1083 | 1083 | } |
| 1084 | 1084 | zDateOvrd = find_option("date-override",0,1); |
| 1085 | 1085 | zUserOvrd = find_option("user-override",0,1); |
| 1086 | - allowConflict = find_option("conflict",0,0)!=0; | |
| 1087 | 1086 | db_must_be_within_tree(); |
| 1088 | 1087 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 1089 | 1088 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 1090 | 1089 | useCksum = db_get_boolean("repo-cksum", 1); |
| 1091 | 1090 | outputManifest = db_get_boolean("manifest", 0); |
| @@ -1189,11 +1188,11 @@ | ||
| 1189 | 1188 | |
| 1190 | 1189 | hasChanges = unsaved_changes(); |
| 1191 | 1190 | db_begin_transaction(); |
| 1192 | 1191 | db_record_repository_filename(0); |
| 1193 | 1192 | if( hasChanges==0 && !isAMerge && !forceFlag ){ |
| 1194 | - fossil_fatal("nothing has changed"); | |
| 1193 | + fossil_fatal("nothing has changed; use -f or --force."); | |
| 1195 | 1194 | } |
| 1196 | 1195 | |
| 1197 | 1196 | /* If none of the files that were named on the command line have |
| 1198 | 1197 | ** been modified, bail out now unless the --force flag is used. |
| 1199 | 1198 | */ |
| @@ -1310,12 +1309,13 @@ | ||
| 1310 | 1309 | } |
| 1311 | 1310 | db_multi_exec("UPDATE vfile SET mrid=%d, rid=%d WHERE id=%d", nrid,nrid,id); |
| 1312 | 1311 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid); |
| 1313 | 1312 | } |
| 1314 | 1313 | db_finalize(&q); |
| 1315 | - if( nConflict && !allowConflict ){ | |
| 1316 | - fossil_fatal("abort due to unresolve merge conflicts"); | |
| 1314 | + if( nConflict && !forceFlag ){ | |
| 1315 | + fossil_fatal("abort due to unresolved merge conflicts; use -f" | |
| 1316 | + " or --force."); | |
| 1317 | 1317 | } |
| 1318 | 1318 | |
| 1319 | 1319 | /* Create the new manifest */ |
| 1320 | 1320 | if( blob_size(&comment)==0 ){ |
| 1321 | 1321 | blob_append(&comment, "(no comment)", -1); |
| 1322 | 1322 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -393,28 +393,29 @@ | |
| 393 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 394 | ** is used if the --ignore option is omitted. |
| 395 | ** |
| 396 | ** Options: |
| 397 | ** --dotfiles include files beginning with a dot (".") |
| 398 | ** --force Remove files without prompting |
| 399 | ** --ignore <CSG> ignore files matching patterns from the |
| 400 | ** comma separated list of glob patterns. |
| 401 | ** --temp Remove only Fossil-generated temporary files |
| 402 | ** |
| 403 | ** See also: addremove, extra, status |
| 404 | */ |
| 405 | void clean_cmd(void){ |
| 406 | int allFlag; |
| 407 | unsigned scanFlags = 0; |
| 408 | const char *zIgnoreFlag; |
| 409 | Blob path, repo; |
| 410 | Stmt q; |
| 411 | int n; |
| 412 | Glob *pIgnore; |
| 413 | int testFlag = 0; |
| 414 | |
| 415 | allFlag = find_option("force","f",0)!=0; |
| 416 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 417 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 418 | zIgnoreFlag = find_option("ignore",0,1); |
| 419 | testFlag = find_option("test",0,0)!=0; |
| 420 | db_must_be_within_tree(); |
| @@ -1002,16 +1003,16 @@ | |
| 1002 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1003 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1004 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1005 | ** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1006 | ** --delta use a delta manifest in the commit process |
| 1007 | ** --force|-f allow forking with this commit |
| 1008 | ** --message-file|-M FILE read the commit comment from given file |
| 1009 | ** --nosign do not attempt to sign this commit with gpg |
| 1010 | ** --private do not sync changes and their descendants |
| 1011 | ** --tag TAG-NAME assign given tag TAG-NAME to the checkin |
| 1012 | ** --conflict allow unresolved merge conflicts |
| 1013 | ** --binary-ok do not warn about committing binary files |
| 1014 | ** |
| 1015 | ** See also: branch, changes, checkout, extra, sync |
| 1016 | */ |
| 1017 | void commit_cmd(void){ |
| @@ -1024,14 +1025,13 @@ | |
| 1024 | Stmt q; /* Query to find files that have been modified */ |
| 1025 | char *zUuid; /* UUID of the new check-in */ |
| 1026 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 1027 | int isAMerge = 0; /* True if checking in a merge */ |
| 1028 | int noWarningFlag = 0; /* True if skipping all warnings */ |
| 1029 | int forceFlag = 0; /* Force a fork */ |
| 1030 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1031 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1032 | int allowConflict = 0; /* Allow unresolve merge conflicts */ |
| 1033 | int binaryOk = 0; /* The --binary-ok flag */ |
| 1034 | char *zManifestFile; /* Name of the manifest file */ |
| 1035 | int useCksum; /* True if checksums should be computed and verified */ |
| 1036 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 1037 | int testRun; /* True for a test run. Debugging only */ |
| @@ -1062,11 +1062,11 @@ | |
| 1062 | fossil_fatal("cannot use --delta and --baseline together"); |
| 1063 | } |
| 1064 | testRun = find_option("test",0,0)!=0; |
| 1065 | zComment = find_option("comment","m",1); |
| 1066 | forceFlag = find_option("force", "f", 0)!=0; |
| 1067 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 1068 | zBranch = find_option("branch","b",1); |
| 1069 | zColor = find_option("bgcolor",0,1); |
| 1070 | zBrClr = find_option("branchcolor",0,1); |
| 1071 | binaryOk = find_option("binary-ok",0,0)!=0; |
| 1072 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -1081,11 +1081,10 @@ | |
| 1081 | if( zBranch==0 ) zBranch = "private"; |
| 1082 | if( zBrClr==0 && zColor==0 ) zBrClr = "#fec084"; /* Orange */ |
| 1083 | } |
| 1084 | zDateOvrd = find_option("date-override",0,1); |
| 1085 | zUserOvrd = find_option("user-override",0,1); |
| 1086 | allowConflict = find_option("conflict",0,0)!=0; |
| 1087 | db_must_be_within_tree(); |
| 1088 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 1089 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 1090 | useCksum = db_get_boolean("repo-cksum", 1); |
| 1091 | outputManifest = db_get_boolean("manifest", 0); |
| @@ -1189,11 +1188,11 @@ | |
| 1189 | |
| 1190 | hasChanges = unsaved_changes(); |
| 1191 | db_begin_transaction(); |
| 1192 | db_record_repository_filename(0); |
| 1193 | if( hasChanges==0 && !isAMerge && !forceFlag ){ |
| 1194 | fossil_fatal("nothing has changed"); |
| 1195 | } |
| 1196 | |
| 1197 | /* If none of the files that were named on the command line have |
| 1198 | ** been modified, bail out now unless the --force flag is used. |
| 1199 | */ |
| @@ -1310,12 +1309,13 @@ | |
| 1310 | } |
| 1311 | db_multi_exec("UPDATE vfile SET mrid=%d, rid=%d WHERE id=%d", nrid,nrid,id); |
| 1312 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid); |
| 1313 | } |
| 1314 | db_finalize(&q); |
| 1315 | if( nConflict && !allowConflict ){ |
| 1316 | fossil_fatal("abort due to unresolve merge conflicts"); |
| 1317 | } |
| 1318 | |
| 1319 | /* Create the new manifest */ |
| 1320 | if( blob_size(&comment)==0 ){ |
| 1321 | blob_append(&comment, "(no comment)", -1); |
| 1322 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -393,28 +393,29 @@ | |
| 393 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 394 | ** is used if the --ignore option is omitted. |
| 395 | ** |
| 396 | ** Options: |
| 397 | ** --dotfiles include files beginning with a dot (".") |
| 398 | ** --no-warnings Remove files without prompting |
| 399 | ** --ignore <CSG> ignore files matching patterns from the |
| 400 | ** comma separated list of glob patterns. |
| 401 | ** --temp Remove only Fossil-generated temporary files |
| 402 | ** |
| 403 | ** See also: addremove, extra, status |
| 404 | */ |
| 405 | void clean_cmd(void){ |
| 406 | int allFlag, bForce; |
| 407 | unsigned scanFlags = 0; |
| 408 | const char *zIgnoreFlag; |
| 409 | Blob path, repo; |
| 410 | Stmt q; |
| 411 | int n; |
| 412 | Glob *pIgnore; |
| 413 | int testFlag = 0; |
| 414 | |
| 415 | bForce = find_option("force","f",0)!=0; |
| 416 | allFlag = find_option("no-warnings", 0, 0)!=0 || bForce; |
| 417 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 418 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 419 | zIgnoreFlag = find_option("ignore",0,1); |
| 420 | testFlag = find_option("test",0,0)!=0; |
| 421 | db_must_be_within_tree(); |
| @@ -1002,16 +1003,16 @@ | |
| 1003 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1004 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1005 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1006 | ** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1007 | ** --delta use a delta manifest in the commit process |
| 1008 | ** --force|-f allow forking/unresolved merge conflicts with this commit |
| 1009 | ** --message-file|-M FILE read the commit comment from given file |
| 1010 | ** --nosign do not attempt to sign this commit with gpg |
| 1011 | ** --no-warnings do not warn about anything |
| 1012 | ** --private do not sync changes and their descendants |
| 1013 | ** --tag TAG-NAME assign given tag TAG-NAME to the checkin |
| 1014 | ** --binary-ok do not warn about committing binary files |
| 1015 | ** |
| 1016 | ** See also: branch, changes, checkout, extra, sync |
| 1017 | */ |
| 1018 | void commit_cmd(void){ |
| @@ -1024,14 +1025,13 @@ | |
| 1025 | Stmt q; /* Query to find files that have been modified */ |
| 1026 | char *zUuid; /* UUID of the new check-in */ |
| 1027 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 1028 | int isAMerge = 0; /* True if checking in a merge */ |
| 1029 | int noWarningFlag = 0; /* True if skipping all warnings */ |
| 1030 | int forceFlag = 0; /* Force a fork/commit with unresolved merge conflicts */ |
| 1031 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1032 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1033 | int binaryOk = 0; /* The --binary-ok flag */ |
| 1034 | char *zManifestFile; /* Name of the manifest file */ |
| 1035 | int useCksum; /* True if checksums should be computed and verified */ |
| 1036 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 1037 | int testRun; /* True for a test run. Debugging only */ |
| @@ -1062,11 +1062,11 @@ | |
| 1062 | fossil_fatal("cannot use --delta and --baseline together"); |
| 1063 | } |
| 1064 | testRun = find_option("test",0,0)!=0; |
| 1065 | zComment = find_option("comment","m",1); |
| 1066 | forceFlag = find_option("force", "f", 0)!=0; |
| 1067 | noWarningFlag = find_option("no-warnings", 0, 0)!=0 || forceFlag; |
| 1068 | zBranch = find_option("branch","b",1); |
| 1069 | zColor = find_option("bgcolor",0,1); |
| 1070 | zBrClr = find_option("branchcolor",0,1); |
| 1071 | binaryOk = find_option("binary-ok",0,0)!=0; |
| 1072 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -1081,11 +1081,10 @@ | |
| 1081 | if( zBranch==0 ) zBranch = "private"; |
| 1082 | if( zBrClr==0 && zColor==0 ) zBrClr = "#fec084"; /* Orange */ |
| 1083 | } |
| 1084 | zDateOvrd = find_option("date-override",0,1); |
| 1085 | zUserOvrd = find_option("user-override",0,1); |
| 1086 | db_must_be_within_tree(); |
| 1087 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 1088 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 1089 | useCksum = db_get_boolean("repo-cksum", 1); |
| 1090 | outputManifest = db_get_boolean("manifest", 0); |
| @@ -1189,11 +1188,11 @@ | |
| 1188 | |
| 1189 | hasChanges = unsaved_changes(); |
| 1190 | db_begin_transaction(); |
| 1191 | db_record_repository_filename(0); |
| 1192 | if( hasChanges==0 && !isAMerge && !forceFlag ){ |
| 1193 | fossil_fatal("nothing has changed; use -f or --force."); |
| 1194 | } |
| 1195 | |
| 1196 | /* If none of the files that were named on the command line have |
| 1197 | ** been modified, bail out now unless the --force flag is used. |
| 1198 | */ |
| @@ -1310,12 +1309,13 @@ | |
| 1309 | } |
| 1310 | db_multi_exec("UPDATE vfile SET mrid=%d, rid=%d WHERE id=%d", nrid,nrid,id); |
| 1311 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid); |
| 1312 | } |
| 1313 | db_finalize(&q); |
| 1314 | if( nConflict && !forceFlag ){ |
| 1315 | fossil_fatal("abort due to unresolved merge conflicts; use -f" |
| 1316 | " or --force."); |
| 1317 | } |
| 1318 | |
| 1319 | /* Create the new manifest */ |
| 1320 | if( blob_size(&comment)==0 ){ |
| 1321 | blob_append(&comment, "(no comment)", -1); |
| 1322 |
+6
-5
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -582,11 +582,11 @@ | ||
| 582 | 582 | "REPLACE INTO config(name,value,mtime) VALUES('aux-schema','%s',now());", |
| 583 | 583 | CONTENT_SCHEMA, AUX_SCHEMA |
| 584 | 584 | ); |
| 585 | 585 | if( errCnt && !forceFlag ){ |
| 586 | 586 | fossil_print( |
| 587 | - "%d errors. Rolling back changes. Use --force to force a commit.\n", | |
| 587 | + "%d errors. Rolling back changes. Use -f or --force to force a commit.\n", | |
| 588 | 588 | errCnt |
| 589 | 589 | ); |
| 590 | 590 | db_end_transaction(1); |
| 591 | 591 | }else{ |
| 592 | 592 | if( runCompress ){ |
| @@ -767,21 +767,22 @@ | ||
| 767 | 767 | ** |
| 768 | 768 | ** The user is prompted to confirm the scrub unless the --force option |
| 769 | 769 | ** is used. |
| 770 | 770 | ** |
| 771 | 771 | ** Options: |
| 772 | -** --force do not prompt for confirmation | |
| 773 | -** --private only private branches are removed from the repository | |
| 774 | -** --verily scrub real thoroughly (see above) | |
| 772 | +** --no-warnings do not prompt for confirmation | |
| 773 | +** --private only private branches are removed from the repository | |
| 774 | +** --verily scrub real thoroughly (see above) | |
| 775 | 775 | */ |
| 776 | 776 | void scrub_cmd(void){ |
| 777 | 777 | int bVerily = find_option("verily",0,0)!=0; |
| 778 | 778 | int bForce = find_option("force", "f", 0)!=0; |
| 779 | + int bNoWarning = find_option("no-warnings", 0, 0)!=0 || bForce; | |
| 779 | 780 | int privateOnly = find_option("private",0,0)!=0; |
| 780 | 781 | int bNeedRebuild = 0; |
| 781 | 782 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 2); |
| 782 | - if( !bForce ){ | |
| 783 | + if( !bNoWarning ){ | |
| 783 | 784 | Blob ans; |
| 784 | 785 | char cReply; |
| 785 | 786 | blob_zero(&ans); |
| 786 | 787 | prompt_user( |
| 787 | 788 | "Scrubbing the repository will permanently delete information.\n" |
| 788 | 789 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -582,11 +582,11 @@ | |
| 582 | "REPLACE INTO config(name,value,mtime) VALUES('aux-schema','%s',now());", |
| 583 | CONTENT_SCHEMA, AUX_SCHEMA |
| 584 | ); |
| 585 | if( errCnt && !forceFlag ){ |
| 586 | fossil_print( |
| 587 | "%d errors. Rolling back changes. Use --force to force a commit.\n", |
| 588 | errCnt |
| 589 | ); |
| 590 | db_end_transaction(1); |
| 591 | }else{ |
| 592 | if( runCompress ){ |
| @@ -767,21 +767,22 @@ | |
| 767 | ** |
| 768 | ** The user is prompted to confirm the scrub unless the --force option |
| 769 | ** is used. |
| 770 | ** |
| 771 | ** Options: |
| 772 | ** --force do not prompt for confirmation |
| 773 | ** --private only private branches are removed from the repository |
| 774 | ** --verily scrub real thoroughly (see above) |
| 775 | */ |
| 776 | void scrub_cmd(void){ |
| 777 | int bVerily = find_option("verily",0,0)!=0; |
| 778 | int bForce = find_option("force", "f", 0)!=0; |
| 779 | int privateOnly = find_option("private",0,0)!=0; |
| 780 | int bNeedRebuild = 0; |
| 781 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 2); |
| 782 | if( !bForce ){ |
| 783 | Blob ans; |
| 784 | char cReply; |
| 785 | blob_zero(&ans); |
| 786 | prompt_user( |
| 787 | "Scrubbing the repository will permanently delete information.\n" |
| 788 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -582,11 +582,11 @@ | |
| 582 | "REPLACE INTO config(name,value,mtime) VALUES('aux-schema','%s',now());", |
| 583 | CONTENT_SCHEMA, AUX_SCHEMA |
| 584 | ); |
| 585 | if( errCnt && !forceFlag ){ |
| 586 | fossil_print( |
| 587 | "%d errors. Rolling back changes. Use -f or --force to force a commit.\n", |
| 588 | errCnt |
| 589 | ); |
| 590 | db_end_transaction(1); |
| 591 | }else{ |
| 592 | if( runCompress ){ |
| @@ -767,21 +767,22 @@ | |
| 767 | ** |
| 768 | ** The user is prompted to confirm the scrub unless the --force option |
| 769 | ** is used. |
| 770 | ** |
| 771 | ** Options: |
| 772 | ** --no-warnings do not prompt for confirmation |
| 773 | ** --private only private branches are removed from the repository |
| 774 | ** --verily scrub real thoroughly (see above) |
| 775 | */ |
| 776 | void scrub_cmd(void){ |
| 777 | int bVerily = find_option("verily",0,0)!=0; |
| 778 | int bForce = find_option("force", "f", 0)!=0; |
| 779 | int bNoWarning = find_option("no-warnings", 0, 0)!=0 || bForce; |
| 780 | int privateOnly = find_option("private",0,0)!=0; |
| 781 | int bNeedRebuild = 0; |
| 782 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 2); |
| 783 | if( !bNoWarning ){ |
| 784 | Blob ans; |
| 785 | char cReply; |
| 786 | blob_zero(&ans); |
| 787 | prompt_user( |
| 788 | "Scrubbing the repository will permanently delete information.\n" |
| 789 |