Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_pinitcsets.tcl part of check-in [8c6488ded2] - Continued work on the integrity checks for changesets. Moved callers out of transactions. Two checks are already tripping on bad changesets made by InitCSets (pass 5). by aku on 2007-11-27 04:26:56. [view]

To:

File tools/cvs2fossil/lib/c2f_pinitcsets.tcl part of check-in [2e07cd7164] - Bugfix in the generation of the initial symbol changesets. Keep entries apart per line-of-development. by aku on 2007-11-27 08:59:54. [view]

@@ -226,26 +226,28 @@
 	# First process the tags, then the branches. We know that
 	# their ids do not overlap with each other.
 
 	set lastsymbol  {}
+	set lastlod     {}
 	set lastproject {}
 	set revisions   {}
 
-	foreach {sid rid pid} [state run {
-	    SELECT S.sid, R.rid, S.pid
+	foreach {sid rid lod pid} [state run {
+	    SELECT S.sid, R.rid, R.lod, S.pid
 	    FROM  tag T, revision R, symbol S     -- T ==> R/S, using PK indices of R, S.
 	    WHERE T.rev = R.rid
 	    AND   T.sid = S.sid
-	    ORDER BY S.sid, R.date
+	    ORDER BY S.sid, R.lod, R.date
 	}] {
-	    if {$lastsymbol != $sid} {
+	    if {($lastlod != $lod) || ($lastsymbol != $sid)} {
 		if {[llength $revisions]} {
 		    incr n
 		    set  p [repository projectof $lastproject]
 		    project::rev %AUTO% $p sym $lastsymbol $revisions
 		    set revisions {}
 		}
 		set lastsymbol  $sid
+		set lastlod     $lod
 		set lastproject $pid
 	    }
 	    lappend revisions $rid
 	}
@@ -256,26 +258,28 @@
 	    project::rev %AUTO% $p sym $lastsymbol $revisions
 	}
 
 	set lastsymbol {}
+	set lastlod    {}
 	set lasproject {}
 	set revisions  {}
 
-	foreach {sid rid pid} [state run {
-	    SELECT S.sid, R.rid, S.pid
+	foreach {sid rid lod pid} [state run {
+	    SELECT S.sid, R.rid, R.lod, S.pid
 	    FROM  branch B, revision R, symbol S  -- B ==> R/S, using PK indices of R, S.
 	    WHERE B.root = R.rid
 	    AND   B.sid  = S.sid
-	    ORDER BY S.sid, R.date
+	    ORDER BY S.sid, R.lod, R.date
 	}] {
-	    if {$lastsymbol != $sid} {
+	    if {($lastlod != $lod) || ($lastsymbol != $sid)} {
 		if {[llength $revisions]} {
 		    incr n
 		    set  p [repository projectof $lastproject]
 		    project::rev %AUTO% $p sym $lastsymbol $revisions
 		    set revisions {}
 		}
 		set lastsymbol  $sid
+		set lastlod     $lod
 		set lastproject $pid
 	    }
 	    lappend revisions $rid
 	}