Diff
Not logged in

Differences From:

File src/checkin.c part of check-in [b6e22e62cf] - Attempting to rationalize the tagging and branching logic. The "branch" command has been resurrected and appears to work now. The "tag branch" command has been removed. Special tags "newbranch" and "closed" used to manage branches. New changes are not well-tested - use with caution. You must "rebuild" when upgrading through this version. by drh on 2009-01-20 16:51:19. [view]

To:

File src/checkin.c part of check-in [b7f32a71ab] - Add web-based branch color changer. Add the "branch list" command. Simplifications to color propagation logic. by drh on 2009-01-20 22:21:24. [view]

@@ -347,14 +347,14 @@
   }
 }
 
 /*
-** Return true if the check-in with RID=rid has one or more child
+** Return true if the check-in with RID=rid has no child
 ** check-ins which are not tagged with "newbranch".  In other words,
-** return true if the check-in is not a leaf.
+** return true if the check-in is a leaf.
 */
-int is_not_a_leaf(int rid){
-  return db_exists(
+int is_a_leaf(int rid){
+  return !db_exists(
     "SELECT 1 FROM plink"
     " WHERE pid=%d"
       " AND NOT EXIST("
                      "SELECT 1 FROM tagxref"
@@ -460,9 +460,9 @@
     }
   }
 
   vid = db_lget_int("checkout", 0);
-  if( is_not_a_leaf(vid) ){
+  if( !is_a_leaf(vid) ){
     wouldFork=1;
     if( forceFlag==0 ){
       fossil_fatal("would fork.  \"update\" first or use -f or --force.");
     }