Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_frev.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_frev.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]

@@ -344,24 +344,24 @@
     # # ## ### ##### ######## #############
 
     method persist {} {
 	set fid [$myfile id]
+	set lod [$mylod id]
 	set op  $myopcode($myoperation)
 	set idb $myisondefaultbranch
 
-	struct::list assign $mytext cs cl
-	set cl [expr {$cl - $cs}]
-
-	lappend map @L@ [expr { [$mylod istrunk]        ? "NULL" : [$mylod          id] }]
+	struct::list assign $mytext coff end
+	set clen [expr {$end - $coff}]
+
 	lappend map @P@ [expr { ($myparent       eq "") ? "NULL" : [$myparent       id] }]
 	lappend map @C@ [expr { ($mychild        eq "") ? "NULL" : [$mychild        id] }]
 	lappend map @DP [expr { ($mydbparent     eq "") ? "NULL" : [$mydbparent     id] }]
 	lappend map @DC [expr { ($mydbchild      eq "") ? "NULL" : [$mydbchild      id] }]
 	lappend map @BP [expr { ($myparentbranch eq "") ? "NULL" : [$myparentbranch id] }]
 
 	set cmd {
-	    INSERT INTO revision ( rid,   fid, lod,  rev,      date,    state,    mid,       cs,  cl, op,   isdefault, parent, child, dbparent, dbchild, bparent)
-	    VALUES               ($myid, $fid, @L@, $myrevnr, $mydate, $mystate, $mymetaid, $cs, $cl, $op, $idb,       @P@,    @C@,   @DP,      @DC,     @BP);
+	    INSERT INTO revision ( rid,   fid,  rev,      lod, parent, child,  isdefault, dbparent, dbchild, bparent,  op,  date,    state,    mid,       coff,  clen)
+	    VALUES               ($myid, $fid, $myrevnr, $lod, @P@,    @C@,   $idb,       @DP,      @DC,     @BP    , $op, $mydate, $mystate, $mymetaid, $coff, $clen);
 	}
 
 	state transaction {
 	    state run [string map $map $cmd]