Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [47e271a448] - Fixed bug in the initialization of mybranchcode for changesets. by aku on 2007-11-22 04:56:39. [view]

To:

File tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [eabaea870a] - Added a number of assertions and must-not-happens with associated log output. Plus some small tweaks, and notes. by aku on 2007-11-24 04:15:46. [view]

@@ -316,8 +316,11 @@
 	$cset destroy
 
 	set newcsets {}
 	foreach fragmentrevisions $args {
+	    if {![llength $fragmentrevisions]} {
+		trouble internal "Attempted to create an empty changeset, i.e. without revisions"
+	    }
 	    lappend newcsets [$type %AUTO% $project $cstype $cssrc $fragmentrevisions]
 	}
 
 	foreach c $newcsets { $c persist }
@@ -429,8 +432,9 @@
 		trouble internal "Revision $rid depends on itself."
 	    }
 	    lappend dependencies($rid) $child
 	}
+	return
     }
 
     proc PullPredecessorRevisions {dv revisions} {
 	upvar 1 $dv dependencies
@@ -454,8 +458,9 @@
 		trouble internal "Revision $rid depends on itself."
 	    }
 	    lappend dependencies($rid) $parent
 	}
+	return
     }
 
     proc InitializeBreakState {revisions} {
 	upvar 1 pos pos cross cross range range depc depc delta delta \