Fossil SCM

Partial walk-back of [66d55e9b43]: instead of simply removing the recommendation to pass --allow-fork to fossil checkin to solve the "would fork" problem, recommend instead that the user create a new branch with --branch. That advice causes Fossil to create a named branch rather than a nameless branch -- well, *duplicate-named*, anyway -- which is easier to cope with and doesn't make all the other Fossil instances in an organization start griping about unresolved forks. Only the user who created the named fork is bothered with creating and resolving the fork in this mode of operation.

wyoung 2019-06-18 01:48 trunk
Commit 8dcf4ffce1a74d19bbe7bcce72b1aa74eaf26e5dafd3923010df0ff661f186e9
1 file changed +2 -2
+2 -2
--- src/checkin.c
+++ src/checkin.c
@@ -2272,18 +2272,18 @@
22722272
*/
22732273
if( !vid ){
22742274
if( sCiInfo.zBranch==0 ){
22752275
if( allowFork==0 && forceFlag==0 && g.markPrivate==0
22762276
&& db_exists("SELECT 1 from event where type='ci'") ){
2277
- fossil_fatal("would fork. \"update\" first.");
2277
+ fossil_fatal("would fork. \"update\" first or use --branch.");
22782278
}
22792279
sCiInfo.zBranch = db_get("main-branch", "trunk");
22802280
}
22812281
}else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
22822282
&& g.markPrivate==0 && !is_a_leaf(vid)
22832283
){
2284
- fossil_fatal("would fork. \"update\" first.");
2284
+ fossil_fatal("would fork. \"update\" first or use --branch.");
22852285
}
22862286
22872287
/*
22882288
** Do not allow a commit against a closed leaf unless the commit
22892289
** ends up on a different branch.
22902290
--- src/checkin.c
+++ src/checkin.c
@@ -2272,18 +2272,18 @@
2272 */
2273 if( !vid ){
2274 if( sCiInfo.zBranch==0 ){
2275 if( allowFork==0 && forceFlag==0 && g.markPrivate==0
2276 && db_exists("SELECT 1 from event where type='ci'") ){
2277 fossil_fatal("would fork. \"update\" first.");
2278 }
2279 sCiInfo.zBranch = db_get("main-branch", "trunk");
2280 }
2281 }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
2282 && g.markPrivate==0 && !is_a_leaf(vid)
2283 ){
2284 fossil_fatal("would fork. \"update\" first.");
2285 }
2286
2287 /*
2288 ** Do not allow a commit against a closed leaf unless the commit
2289 ** ends up on a different branch.
2290
--- src/checkin.c
+++ src/checkin.c
@@ -2272,18 +2272,18 @@
2272 */
2273 if( !vid ){
2274 if( sCiInfo.zBranch==0 ){
2275 if( allowFork==0 && forceFlag==0 && g.markPrivate==0
2276 && db_exists("SELECT 1 from event where type='ci'") ){
2277 fossil_fatal("would fork. \"update\" first or use --branch.");
2278 }
2279 sCiInfo.zBranch = db_get("main-branch", "trunk");
2280 }
2281 }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
2282 && g.markPrivate==0 && !is_a_leaf(vid)
2283 ){
2284 fossil_fatal("would fork. \"update\" first or use --branch.");
2285 }
2286
2287 /*
2288 ** Do not allow a commit against a closed leaf unless the commit
2289 ** ends up on a different branch.
2290

Keyboard Shortcuts

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