Check-in [65be27aa69]
Not logged in
Overview

SHA1 Hash:65be27aa69956266ba1f92fa2fef3e59a1b92060
Date: 2007-11-22 03:11:34
User: aku
Comment:Modified the API for the construction of changesets a bit, now allowing their construction with the correct id, instead of correcting it later. Updated pass 5 to use this, and fixed bug where the id counter for changesets was left uninitialized, allowing the improper generation of duplicate ids.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_pinitcsets.tcl from [10710518c2] to [940095b79c].

@@ -114,15 +114,15 @@
 	    set r [project::rev %AUTO% [repository projectof $pid] $cstype $srcid [state run {
 		SELECT C.rid
 		FROM   csrevision C
 		WHERE  C.cid = $id
 		ORDER  BY C.pos
-	    }]]
-	    $r setid $id
+	    }] $id]
 	}
 
 	project::rev getcstypes
+	project::rev loadcounter
 	return
     }
 
     typemethod run {} {
 	# Pass manager interface. Executed to perform the

Modified tools/cvs2fossil/lib/c2f_prev.tcl from [da85eb5f98] to [04c278bb16].

@@ -28,12 +28,17 @@
 
 snit::type ::vc::fossil::import::cvs::project::rev {
     # # ## ### ##### ######## #############
     ## Public API
 
-    constructor {project cstype srcid revisions} {
-	set myid        [incr mycounter]
+    constructor {project cstype srcid revisions {theid {}}} {
+	if {$theid ne ""} {
+	    set myid $theid
+	} else {
+	    set myid [incr mycounter]
+	}
+
 	set myproject   $project
 	set mytype      $cstype
 	set mysrcid	$srcid
 	set myrevisions $revisions
 
@@ -45,12 +50,10 @@
     }
 
     method id        {} { return $myid }
     method revisions {} { return $myrevisions }
     method data      {} { return [list $myproject $mytype $mysrcid] }
-
-    method setid {id} { set myid $id ; return }
 
     method bysymbol   {} { return [expr {$mytype eq "sym"}] }
     method byrevision {} { return [expr {$mytype eq "rev"}] }
 
     method successors {} {