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.
Commit
8dcf4ffce1a74d19bbe7bcce72b1aa74eaf26e5dafd3923010df0ff661f186e9
Parent
56530e9b6d061ab…
1 file changed
+2
-2
+2
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2272,18 +2272,18 @@ | ||
| 2272 | 2272 | */ |
| 2273 | 2273 | if( !vid ){ |
| 2274 | 2274 | if( sCiInfo.zBranch==0 ){ |
| 2275 | 2275 | if( allowFork==0 && forceFlag==0 && g.markPrivate==0 |
| 2276 | 2276 | && 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."); | |
| 2278 | 2278 | } |
| 2279 | 2279 | sCiInfo.zBranch = db_get("main-branch", "trunk"); |
| 2280 | 2280 | } |
| 2281 | 2281 | }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0 |
| 2282 | 2282 | && g.markPrivate==0 && !is_a_leaf(vid) |
| 2283 | 2283 | ){ |
| 2284 | - fossil_fatal("would fork. \"update\" first."); | |
| 2284 | + fossil_fatal("would fork. \"update\" first or use --branch."); | |
| 2285 | 2285 | } |
| 2286 | 2286 | |
| 2287 | 2287 | /* |
| 2288 | 2288 | ** Do not allow a commit against a closed leaf unless the commit |
| 2289 | 2289 | ** ends up on a different branch. |
| 2290 | 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."); |
| 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 |