Check-in [70b0aa899a]
Not logged in
Overview

SHA1 Hash:70b0aa899a4885b1d0606691d6f58c32a9c0a453
Date: 2007-10-06 22:13:25
User: aku
Comment:Found easier way to access the typevariables of singletons when writing the rcs parser. Now moved the other singletons to the same construction.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_pass.tcl from [7af6ad1f97] to [9bb3590160].

@@ -122,31 +122,32 @@
 
     # # ## ### ##### ######## #############
     ## Internal methods
 
     proc Ok? {code label ov {emptyok 1}} {
-	upvar 1 mydesc mydesc $ov ok
+	upvar 1 $ov ok
+	::variable mydesc
 	if {$emptyok && ($code eq "")} return
 	if {[info exists mydesc($code)]} return
 	if {$label ne ""} {append label " "}
 	trouble fatal "Bad ${label}pass code $code"
 	set ok 0
 	return
     }
 
     proc Convert {code default} {
-	upvar 1 mypasses mypasses
+	::variable mypasses
 	return [expr {($code eq "") ? $default : [Id $code]}]
     }
 
     proc Id {code} {
-	upvar 1 mypasses mypasses
+	::variable mypasses
 	return [lsearch -exact $mypasses $code]
     }
 
     proc Call {code args} {
-	upvar 1 mycmd mycmd
+	::variable mycmd
 	set cmd $mycmd($code)
 	foreach a $args { lappend cmd $a }
 	eval $cmd
 	return
     }

Modified tools/cvs2fossil/lib/c2f_pcollar.tcl from [e8bf2c5266] to [464bb34df8].

@@ -163,10 +163,12 @@
 
 	return $f
     }
 
     proc IsSuperceded {base rcs usr isattic} {
+	::variable myignore
+
 	if {!$isattic}                   {return 0}
 	if {![file exists $base/$usr,v]} {return 0}
 
 	# We have a regular archive and an Attic archive refering to
 	# the same user visible file. Ignore the file in the Attic.
@@ -174,11 +176,10 @@
 	# By default this is a problem causing an abort after the pass
 	# has completed. The user can however force us to ignore it.
 	# In that case the warning is still printed, but will not
 	# induce an abort any longer.
 
-	upvar 1 myignore myignore
 	if {$myignore} {
 	    log write 2 collar "Ignored $rcs, superceded archive"
 	} else {
 	    trouble warn       "Ignored $rcs, superceded archive"
 	}

Modified tools/cvs2fossil/lib/c2f_repository.tcl from [6ab6c1218d] to [41878e4fb7].

@@ -174,11 +174,12 @@
     proc .NFileLength {p} {
 	return [string length [llength [$p filenames]]]
     }
 
     proc IsRepositoryBase {path mv} {
-	upvar 1 $mv msg mybase mybase
+	::variable mybase
+	upvar 1 $mv msg
 	if {![fileutil::test $mybase         edr msg {CVS Repository}]}      {return 0}
 	if {![fileutil::test $mybase/CVSROOT edr msg {CVS Admin Directory}]} {return 0}
 	return 1
     }
 
@@ -194,20 +195,24 @@
 	}
 	return 1
     }
 
     proc TheProjects {} {
-	upvar 1 myprojects myprojects myprojpaths myprojpaths mybase mybase type type
+	upvar 1 type type
+	::variable myprojects
+	::variable myprojpaths
+	::variable mybase
 
 	if {![llength $myprojects]} {
 	    set myprojects [EmptyProjects $myprojpaths]
 	}
 	return $myprojects
     }
 
     proc EmptyProjects {projpaths} {
-	upvar 1 mybase mybase type type
+	::variable mybase
+	upvar 1 type type
 	set res {}
 	if {[llength $projpaths]} {
 	    foreach pp $projpaths {
 		lappend res [project %AUTO% $pp $type]
 	    }

Modified tools/cvs2fossil/lib/log.tcl from [dd3a2d5171] to [9e72db66cb].

@@ -107,11 +107,11 @@
 
     # # ## ### ##### ######## #############
     ## Internal, helper methods (formatting, dispatch)
 
     proc System {s} {
-	upvar 1 mysysfmt mysysfmt
+	::variable mysysfmt
 	return [format $mysysfmt $s]
     }
 
     # # ## ### ##### ######## #############
     ## Standard output callback, module internal