Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_pass.tcl part of check-in [70b0aa899a] - Found easier way to access the typevariables of singletons when writing the rcs parser. Now moved the other singletons to the same construction. by aku on 2007-10-06 22:13:25. [view]

To:

File tools/cvs2fossil/lib/c2f_pass.tcl part of check-in [ae19c0fcb4] - Extended pass manager to handle the skipped and defered passes coming before and after the actually executed passes. Extended passes I and II to have the required methods. Implemented loading (for skipped passes) as skeletons, implemented discarding (for defered passes) completely. Extended state manager with ability to discard state. by aku on 2007-10-13 23:29:17. [view]

@@ -96,25 +96,36 @@
     }
 
     typemethod run {} {
 	if {$mystart < 0} {set mystart 0}
-	if {$myend   < 0} {set myend end}
-
-	set runlist [lrange $mypasses $mystart $myend]
+	if {$myend   < 0} {set myend [expr {[llength $mypasses] - 1}]}
+
 	# TODO: Timing statistics for the passes.
 	# TODO: Artifact manager (clean after pass?. need to know skipped/defered passes ?)
 	# TODO:
 	# TODO:
 
-	foreach p $runlist {
+	set skipped [lrange $mypasses 0 [expr {$mystart - 1}]]
+	set run     [lrange $mypasses $mystart $myend]
+	set defered [lrange $mypasses [expr {$myend + 1}] end]
+
+	foreach p $skipped {
+	    log write 0 pass "Skip  $p"
+	    Call $p load
+	}
+	foreach p $run {
 	    log write 0 pass "Setup $p"
 	    Call $p setup
 	}
-	foreach p $runlist {
+	foreach p $run {
 	    log write 0 pass "Begin $p"
 	    Call $p run
 	    log write 0 pass "Done  $p"
 	    trouble abort?
+	}
+	foreach p $defered {
+	    log write 0 pass "Defer $p"
+	    Call $p discard
 	}
 
 	state release
 	return