Fossil SCM

Added a link to https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching from the recent changes to the fossil ci "would fork" error message. *Hopefully* this will end the debate.

wyoung 2019-06-19 18:24 trunk
Commit b761a72922ab2b02855a6226685191c4dcfdc114b8184a1ba2155409680a8d16
1 file changed +8 -2
+8 -2
--- src/checkin.c
+++ src/checkin.c
@@ -2272,18 +2272,24 @@
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 or use --branch.");
2277
+ fossil_fatal("would fork. \"update\" first or use --branch. See also\n"
2278
+ "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching");
22782279
}
22792280
sCiInfo.zBranch = db_get("main-branch", "trunk");
22802281
}
22812282
}else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
22822283
&& g.markPrivate==0 && !is_a_leaf(vid)
22832284
){
2284
- fossil_fatal("would fork. \"update\" first or use --branch.");
2285
+ /* Can't avoid duplicating this string because some C compilers
2286
+ ** refuse to see static const char zErr[] = "... as "constant"
2287
+ ** enough for a printf() style format string. (e.g. Clang 10)
2288
+ */
2289
+ fossil_fatal("would fork. \"update\" first or use --branch. See also\n"
2290
+ "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching");
22852291
}
22862292
22872293
/*
22882294
** Do not allow a commit against a closed leaf unless the commit
22892295
** ends up on a different branch.
22902296
--- src/checkin.c
+++ src/checkin.c
@@ -2272,18 +2272,24 @@
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
--- src/checkin.c
+++ src/checkin.c
@@ -2272,18 +2272,24 @@
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. See also\n"
2278 "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching");
2279 }
2280 sCiInfo.zBranch = db_get("main-branch", "trunk");
2281 }
2282 }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
2283 && g.markPrivate==0 && !is_a_leaf(vid)
2284 ){
2285 /* Can't avoid duplicating this string because some C compilers
2286 ** refuse to see static const char zErr[] = "... as "constant"
2287 ** enough for a printf() style format string. (e.g. Clang 10)
2288 */
2289 fossil_fatal("would fork. \"update\" first or use --branch. See also\n"
2290 "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching");
2291 }
2292
2293 /*
2294 ** Do not allow a commit against a closed leaf unless the commit
2295 ** ends up on a different branch.
2296

Keyboard Shortcuts

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