Diff
Not logged in

Differences From:

File tools/lib/cvs.tcl part of check-in [df91d389d5] - First semi-complete app for import from CVS. Trunk only, wholesale only. by aku on 2007-09-04 05:36:56. [view]

To:

File tools/lib/cvs.tcl part of check-in [8469631cc9] - Extended import app with switch to stop execution just before a specific changeset, to aid in debugging problems. by aku on 2007-09-08 03:48:40. [view]

@@ -341,9 +341,21 @@
     variable rtree
 
     set c $node
     while {1} {
-	uplevel 1 $script
+	set code [catch {uplevel 1 $script} res]
+
+	# 0 - ok, 1 - error, 2 - return, 3 - break, 4 - continue
+	switch -- $code {
+	    0 {}
+	    1 { return -errorcode $::errorcode -code error $res }
+	    2 {}
+	    3 { return }
+	    4 {}
+	    default {
+		return -code $code $result
+	    }
+	}
 
 	# Stop on reaching the head.
 	if {![llength [$rtree children $c]]} break