Fossil

Check-in [b761a729]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b761a72922ab2b02855a6226685191c4dcfdc114b8184a1ba2155409680a8d16
User & Date: wyoung 2019-06-19 18:24:01
Context
2019-06-19
18:45
Added a new section, "Branch Names Need Not Be Unique" to www/branching.wiki. check-in: 42bfe936 user: wyoung tags: trunk
18:24
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. check-in: b761a729 user: wyoung tags: trunk
18:09
Several expansions on the new points in www/branching.wiki check-in: bf048cd5 user: wyoung tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

2270
2271
2272
2273
2274
2275
2276
2277

2278
2279
2280
2281
2282
2283




2284

2285
2286
2287
2288
2289
2290
2291
  ** or --force flags is used, or unless this is a private check-in.
  ** The initial commit MUST have tags "trunk" and "sym-trunk".
  */
  if( !vid ){
    if( sCiInfo.zBranch==0 ){
      if( allowFork==0 && forceFlag==0 && g.markPrivate==0
        && db_exists("SELECT 1 from event where type='ci'") ){
        fossil_fatal("would fork.  \"update\" first or use --branch.");

      }
      sCiInfo.zBranch = db_get("main-branch", "trunk");
    }
  }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
    && g.markPrivate==0 && !is_a_leaf(vid)
  ){




    fossil_fatal("would fork.  \"update\" first or use --branch.");

  }

  /*
  ** Do not allow a commit against a closed leaf unless the commit
  ** ends up on a different branch.
  */
  if(







|
>






>
>
>
>
|
>







2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
  ** or --force flags is used, or unless this is a private check-in.
  ** The initial commit MUST have tags "trunk" and "sym-trunk".
  */
  if( !vid ){
    if( sCiInfo.zBranch==0 ){
      if( allowFork==0 && forceFlag==0 && g.markPrivate==0
        && db_exists("SELECT 1 from event where type='ci'") ){
        fossil_fatal("would fork.  \"update\" first or use --branch.  See also\n"
          "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching");
      }
      sCiInfo.zBranch = db_get("main-branch", "trunk");
    }
  }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
    && g.markPrivate==0 && !is_a_leaf(vid)
  ){
    /* Can't avoid duplicating this string because some C compilers
    ** refuse to see static const char zErr[] = "... as "constant"
    ** enough for a printf() style format string.  (e.g. Clang 10)
    */
    fossil_fatal("would fork.  \"update\" first or use --branch.  See also\n"
      "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching");
  }

  /*
  ** Do not allow a commit against a closed leaf unless the commit
  ** ends up on a different branch.
  */
  if(