Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_fsym.tcl part of check-in [adf168e23e] - Extended handling of id's for files so that we have them for backreferences from symbols and revisions. Completed persistence of revisions and symbols at file-level and fixed small problem with left-over links to branches. by aku on 2007-10-24 08:01:01. [view]

To:

File tools/cvs2fossil/lib/c2f_fsym.tcl part of check-in [2c08006d9d] - Changed the coding of trunk symbols. Using NULL makes for difficult comparisons later when doing integrity checks. Each trunk now has a regular unique id as a symbol. Added documentation to the table definitions, about references, constraints, etc. by aku on 2007-10-25 05:13:41. [view]

@@ -122,33 +122,34 @@
 	# associated information.
 
 	set fid [$myfile   id]
 	set sid [$mysymbol id]
-
-	lappend map @L@ [expr { [$mylod istrunk] ? "NULL" : [$mylod id] }]
+	set lod [$mylod    id]
 
 	switch -exact -- $mytype {
 	    tag {
 		set rid [$mytagrev id]
-		set cmd {
-		    INSERT INTO tag ( tid,   fid, lod,  sid,  rev)
-		    VALUES          ($myid, $fid, @L@, $sid, $rid);
+		state transaction {
+		    state run {
+			INSERT INTO tag ( tid,   fid,  lod,  sid,  rev)
+			VALUES          ($myid, $fid, $lod, $sid, $rid);
+		    }
 		}
 	    }
 	    branch {
 		lappend map @F@ [expr { ($mybranchchild eq "") ? "NULL" : [$mybranchchild id] }]
 
 		set rid [$mybranchparent id]
 		set cmd {
-		    INSERT INTO branch ( bid,   fid, lod,  sid,  root, first, bra )
-		    VALUES             ($myid, $fid, @L@, $sid, $rid,  @F@, $mynr);
+		    INSERT INTO branch ( bid,   fid,  lod,  sid,  root, first, bra )
+		    VALUES             ($myid, $fid, $lod, $sid, $rid,  @F@,  $mynr);
+		}
+		state transaction {
+		    state run [string map $map $cmd]
 		}
 	    }
 	}
 
-	state transaction {
-	    state run [string map $map $cmd]
-	}
 	return
     }
 
     # # ## ### ##### ######## #############