Check-in [39e19c0cf3]
Not logged in
Overview

SHA1 Hash:39e19c0cf304c7ba7dd2e5a65ba8b8e1cc3e7792
Date: 2007-11-29 07:41:48
User: aku
Comment:Simplified some code dealing with the item -> changeset map, using the changed semantics (1:n -> 1:1).
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_prev.tcl from [01c2b1ab5b] to [ee1979daea].

@@ -89,14 +89,11 @@
     method successormap {} {
 	# NOTE / FUTURE: Possible bottleneck.
 	array set tmp {}
 	foreach {rev children} [$self nextmap] {
 	    foreach child $children {
-		# 8.5 lappend tmp($rev) {*}$myitemmap($child)
-		foreach cset $myitemmap($child) {
-		    lappend tmp($rev) $cset
-		}
+		lappend tmp($rev) $myitemmap($child)
 	    }
 	    set tmp($rev) [lsort -unique $tmp($rev)]
 	}
 	return [array get tmp]
     }
@@ -105,14 +102,11 @@
     method successors {} {
 	# NOTE / FUTURE: Possible bottleneck.
 	set csets {}
 	foreach {_ children} [$self nextmap] {
 	    foreach child $children {
-		# 8.5 lappend csets {*}$myitemmap($child)
-		foreach cset $myitemmap($child) {
-		    lappend csets $cset
-		}
+		lappend csets $myitemmap($child)
 	    }
 	}
 	return [lsort -unique $csets]
     }
 
@@ -120,14 +114,11 @@
     method predecessormap {} {
 	# NOTE / FUTURE: Possible bottleneck.
 	array set tmp {}
 	foreach {rev children} [$self premap] {
 	    foreach child $children {
-		# 8.5 lappend tmp($rev) {*}$myitemmap($child)
-		foreach cset $myitemmap($child) {
-		    lappend tmp($rev) $cset
-		}
+		lappend tmp($rev) $myitemmap($child)
 	    }
 	    set tmp($rev) [lsort -unique $tmp($rev)]
 	}
 	return [array get tmp]
     }