Fossil SCM

Add setting that will suppress the new fork warning with every commit.

andybradford 2020-05-11 14:09 trunk
Commit 57b8d6deacfac947751d269d82d81c7ddb952df14420503675a1814b01551013
2 files changed +8 -2 +3
+8 -2
--- src/checkin.c
+++ src/checkin.c
@@ -2064,10 +2064,11 @@
20642064
int allowOlder = 0; /* Allow a commit older than its ancestor */
20652065
char *zManifestFile; /* Name of the manifest file */
20662066
int useCksum; /* True if checksums should be computed and verified */
20672067
int outputManifest; /* True to output "manifest" and "manifest.uuid" */
20682068
int dryRunFlag; /* True for a test run. Debugging only */
2069
+ int forkWarnAlways; /* True to warn about fork on every commit */
20692070
CheckinInfo sCiInfo; /* Information about this check-in */
20702071
const char *zComFile; /* Read commit message from this file */
20712072
int nTag = 0; /* Number of --tag arguments */
20722073
const char *zTag; /* A single --tag argument */
20732074
ManifestFile *pFile; /* File structure in the manifest */
@@ -2655,12 +2656,15 @@
26552656
26562657
/* Commit */
26572658
db_multi_exec("DELETE FROM vvar WHERE name='ci-comment'");
26582659
db_multi_exec("PRAGMA repository.application_id=252006673;");
26592660
db_multi_exec("PRAGMA localdb.application_id=252006674;");
2661
+ forkWarnAlways = db_get_boolean("fork-warn-always",1);
26602662
if( dryRunFlag ){
2661
- leaf_ambiguity_warning(nvid,nvid);
2663
+ if( forkWarnAlways ){
2664
+ leaf_ambiguity_warning(nvid,nvid);
2665
+ }
26622666
db_end_transaction(1);
26632667
exit(1);
26642668
}
26652669
db_end_transaction(0);
26662670
@@ -2680,8 +2684,10 @@
26802684
autosync_loop(syncFlags, nTries, 0);
26812685
}
26822686
if( count_nonbranch_children(vid)>1 ){
26832687
fossil_print("**** warning: a fork has occurred *****\n");
26842688
}else{
2685
- leaf_ambiguity_warning(nvid,nvid);
2689
+ if( forkWarnAlways ){
2690
+ leaf_ambiguity_warning(nvid,nvid);
2691
+ }
26862692
}
26872693
}
26882694
--- 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
+3
--- src/db.c
+++ src/db.c
@@ -3410,10 +3410,13 @@
34103410
** When executing certain external commands (e.g. diff and
34113411
** gdiff), use relative paths.
34123412
*/
34133413
#endif
34143414
/*
3415
+** SETTING: fork-warn-always boolean default=on
3416
+** When committing, always warn about forks on every commit.
3417
+**
34153418
** SETTING: gdiff-command width=40 default=gdiff
34163419
** The value is an external command to run when performing a graphical
34173420
** diff. If undefined, text diff will be used.
34183421
*/
34193422
/*
34203423
--- 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

Keyboard Shortcuts

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