Diff
Not logged in

Differences From:

File src/rebuild.c part of check-in [7c7edde116] - Add the sym-trunk and newbranch tags to the root check-in when rebuilding. Also add the newbranch tag to the root check-in when creating a new repository. by drh on 2009-01-21 02:47:42. [view]

To:

File src/rebuild.c part of check-in [42c2a18e73] - Change the way branches are tagged: The value of the "branch" property is used to identify the branch name. Repository rebuild required. Also, branches must be retagged. by drh on 2009-01-22 12:03:51. [view]

@@ -174,30 +174,19 @@
 static void rebuild_tag_trunk(void){
   int tagid = db_int(0, "SELECT 1 FROM tag WHERE tagname='sym-trunk'");
   int rid;
   char *zUuid;
-  Stmt q;
 
   if( tagid>0 ) return;
   rid = db_int(0, "SELECT pid FROM plink AS x WHERE NOT EXISTS("
                   "  SELECT 1 FROM plink WHERE cid=x.pid)");
   if( rid==0 ) return;
-  db_prepare(&q, "SELECT uuid FROM tagxref, blob"
-                 " WHERE tagid=%d AND tagtype>0 AND blob.rid=tagxref.rid",
-                 TAG_NEWBRANCH);
-
-  /* Block the trunk tag at all branches */
-  while( db_step(&q)==SQLITE_ROW ){
-    const char *z = db_column_text(&q, 0);
-    tag_add_artifact("sym-", "trunk", z, 0, 0);
-  }
-  db_finalize(&q);
 
   /* Add the trunk tag to the root of the whole tree */
   zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
   if( zUuid==0 ) return;
   tag_add_artifact("sym-", "trunk", zUuid, 0, 2);
-  tag_add_artifact("", "newbranch", zUuid, 0, 1);
+  tag_add_artifact("", "branch", zUuid, "trunk", 2);
 }
 
 /*
 ** Core function to rebuild the infomration in the derived tables of a