Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [59207428e2] - Moved the functionality for splitting a changeset based on the sets of revisions for the fragments to be into a separate command, and into the changeset class, for use outside of changeset links. by aku on 2007-11-22 02:58:09. [view]

To:

File tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [65be27aa69] - 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. by aku on 2007-11-22 03:11:34. [view]

@@ -29,10 +29,15 @@
 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
@@ -46,10 +51,8 @@
 
     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"}] }