Fossil SCM
Add setting that will suppress the new fork warning with every commit.
Commit
57b8d6deacfac947751d269d82d81c7ddb952df14420503675a1814b01551013
Parent
26011322cd34934…
2 files changed
+8
-2
+3
+8
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2064,10 +2064,11 @@ | ||
| 2064 | 2064 | int allowOlder = 0; /* Allow a commit older than its ancestor */ |
| 2065 | 2065 | char *zManifestFile; /* Name of the manifest file */ |
| 2066 | 2066 | int useCksum; /* True if checksums should be computed and verified */ |
| 2067 | 2067 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 2068 | 2068 | int dryRunFlag; /* True for a test run. Debugging only */ |
| 2069 | + int forkWarnAlways; /* True to warn about fork on every commit */ | |
| 2069 | 2070 | CheckinInfo sCiInfo; /* Information about this check-in */ |
| 2070 | 2071 | const char *zComFile; /* Read commit message from this file */ |
| 2071 | 2072 | int nTag = 0; /* Number of --tag arguments */ |
| 2072 | 2073 | const char *zTag; /* A single --tag argument */ |
| 2073 | 2074 | ManifestFile *pFile; /* File structure in the manifest */ |
| @@ -2655,12 +2656,15 @@ | ||
| 2655 | 2656 | |
| 2656 | 2657 | /* Commit */ |
| 2657 | 2658 | db_multi_exec("DELETE FROM vvar WHERE name='ci-comment'"); |
| 2658 | 2659 | db_multi_exec("PRAGMA repository.application_id=252006673;"); |
| 2659 | 2660 | db_multi_exec("PRAGMA localdb.application_id=252006674;"); |
| 2661 | + forkWarnAlways = db_get_boolean("fork-warn-always",1); | |
| 2660 | 2662 | if( dryRunFlag ){ |
| 2661 | - leaf_ambiguity_warning(nvid,nvid); | |
| 2663 | + if( forkWarnAlways ){ | |
| 2664 | + leaf_ambiguity_warning(nvid,nvid); | |
| 2665 | + } | |
| 2662 | 2666 | db_end_transaction(1); |
| 2663 | 2667 | exit(1); |
| 2664 | 2668 | } |
| 2665 | 2669 | db_end_transaction(0); |
| 2666 | 2670 | |
| @@ -2680,8 +2684,10 @@ | ||
| 2680 | 2684 | autosync_loop(syncFlags, nTries, 0); |
| 2681 | 2685 | } |
| 2682 | 2686 | if( count_nonbranch_children(vid)>1 ){ |
| 2683 | 2687 | fossil_print("**** warning: a fork has occurred *****\n"); |
| 2684 | 2688 | }else{ |
| 2685 | - leaf_ambiguity_warning(nvid,nvid); | |
| 2689 | + if( forkWarnAlways ){ | |
| 2690 | + leaf_ambiguity_warning(nvid,nvid); | |
| 2691 | + } | |
| 2686 | 2692 | } |
| 2687 | 2693 | } |
| 2688 | 2694 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2064,10 +2064,11 @@ | |
| 2064 | int allowOlder = 0; /* Allow a commit older than its ancestor */ |
| 2065 | char *zManifestFile; /* Name of the manifest file */ |
| 2066 | int useCksum; /* True if checksums should be computed and verified */ |
| 2067 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 2068 | int dryRunFlag; /* True for a test run. Debugging only */ |
| 2069 | CheckinInfo sCiInfo; /* Information about this check-in */ |
| 2070 | const char *zComFile; /* Read commit message from this file */ |
| 2071 | int nTag = 0; /* Number of --tag arguments */ |
| 2072 | const char *zTag; /* A single --tag argument */ |
| 2073 | ManifestFile *pFile; /* File structure in the manifest */ |
| @@ -2655,12 +2656,15 @@ | |
| 2655 | |
| 2656 | /* Commit */ |
| 2657 | db_multi_exec("DELETE FROM vvar WHERE name='ci-comment'"); |
| 2658 | db_multi_exec("PRAGMA repository.application_id=252006673;"); |
| 2659 | db_multi_exec("PRAGMA localdb.application_id=252006674;"); |
| 2660 | if( dryRunFlag ){ |
| 2661 | leaf_ambiguity_warning(nvid,nvid); |
| 2662 | db_end_transaction(1); |
| 2663 | exit(1); |
| 2664 | } |
| 2665 | db_end_transaction(0); |
| 2666 | |
| @@ -2680,8 +2684,10 @@ | |
| 2680 | autosync_loop(syncFlags, nTries, 0); |
| 2681 | } |
| 2682 | if( count_nonbranch_children(vid)>1 ){ |
| 2683 | fossil_print("**** warning: a fork has occurred *****\n"); |
| 2684 | }else{ |
| 2685 | leaf_ambiguity_warning(nvid,nvid); |
| 2686 | } |
| 2687 | } |
| 2688 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2064,10 +2064,11 @@ | |
| 2064 | int allowOlder = 0; /* Allow a commit older than its ancestor */ |
| 2065 | char *zManifestFile; /* Name of the manifest file */ |
| 2066 | int useCksum; /* True if checksums should be computed and verified */ |
| 2067 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 2068 | int dryRunFlag; /* True for a test run. Debugging only */ |
| 2069 | int forkWarnAlways; /* True to warn about fork on every commit */ |
| 2070 | CheckinInfo sCiInfo; /* Information about this check-in */ |
| 2071 | const char *zComFile; /* Read commit message from this file */ |
| 2072 | int nTag = 0; /* Number of --tag arguments */ |
| 2073 | const char *zTag; /* A single --tag argument */ |
| 2074 | ManifestFile *pFile; /* File structure in the manifest */ |
| @@ -2655,12 +2656,15 @@ | |
| 2656 | |
| 2657 | /* Commit */ |
| 2658 | db_multi_exec("DELETE FROM vvar WHERE name='ci-comment'"); |
| 2659 | db_multi_exec("PRAGMA repository.application_id=252006673;"); |
| 2660 | db_multi_exec("PRAGMA localdb.application_id=252006674;"); |
| 2661 | forkWarnAlways = db_get_boolean("fork-warn-always",1); |
| 2662 | if( dryRunFlag ){ |
| 2663 | if( forkWarnAlways ){ |
| 2664 | leaf_ambiguity_warning(nvid,nvid); |
| 2665 | } |
| 2666 | db_end_transaction(1); |
| 2667 | exit(1); |
| 2668 | } |
| 2669 | db_end_transaction(0); |
| 2670 | |
| @@ -2680,8 +2684,10 @@ | |
| 2684 | autosync_loop(syncFlags, nTries, 0); |
| 2685 | } |
| 2686 | if( count_nonbranch_children(vid)>1 ){ |
| 2687 | fossil_print("**** warning: a fork has occurred *****\n"); |
| 2688 | }else{ |
| 2689 | if( forkWarnAlways ){ |
| 2690 | leaf_ambiguity_warning(nvid,nvid); |
| 2691 | } |
| 2692 | } |
| 2693 | } |
| 2694 |
M
src/db.c
+3
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -3410,10 +3410,13 @@ | ||
| 3410 | 3410 | ** When executing certain external commands (e.g. diff and |
| 3411 | 3411 | ** gdiff), use relative paths. |
| 3412 | 3412 | */ |
| 3413 | 3413 | #endif |
| 3414 | 3414 | /* |
| 3415 | +** SETTING: fork-warn-always boolean default=on | |
| 3416 | +** When committing, always warn about forks on every commit. | |
| 3417 | +** | |
| 3415 | 3418 | ** SETTING: gdiff-command width=40 default=gdiff |
| 3416 | 3419 | ** The value is an external command to run when performing a graphical |
| 3417 | 3420 | ** diff. If undefined, text diff will be used. |
| 3418 | 3421 | */ |
| 3419 | 3422 | /* |
| 3420 | 3423 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3410,10 +3410,13 @@ | |
| 3410 | ** When executing certain external commands (e.g. diff and |
| 3411 | ** gdiff), use relative paths. |
| 3412 | */ |
| 3413 | #endif |
| 3414 | /* |
| 3415 | ** SETTING: gdiff-command width=40 default=gdiff |
| 3416 | ** The value is an external command to run when performing a graphical |
| 3417 | ** diff. If undefined, text diff will be used. |
| 3418 | */ |
| 3419 | /* |
| 3420 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3410,10 +3410,13 @@ | |
| 3410 | ** When executing certain external commands (e.g. diff and |
| 3411 | ** gdiff), use relative paths. |
| 3412 | */ |
| 3413 | #endif |
| 3414 | /* |
| 3415 | ** SETTING: fork-warn-always boolean default=on |
| 3416 | ** When committing, always warn about forks on every commit. |
| 3417 | ** |
| 3418 | ** SETTING: gdiff-command width=40 default=gdiff |
| 3419 | ** The value is an external command to run when performing a graphical |
| 3420 | ** diff. If undefined, text diff will be used. |
| 3421 | */ |
| 3422 | /* |
| 3423 |