Differences From:
File
tools/cvs2fossil/lib/c2f_project.tcl
part of check-in
[da9295c6f6]
- Continued to flesh out revision and symbol processing. Started on the project level classses.
by
aku on
2007-10-12 07:18:27.
[view]
To:
File
tools/cvs2fossil/lib/c2f_project.tcl
part of check-in
[27470a9304]
- Extended pass I to capture the 'file executable' info of rcs archives. Currently the only way to store this info in the destination will be the use of fossil tags.
by
aku on
2007-10-13 21:15:30.
[view]
@@ -17,10 +17,11 @@
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require vc::fossil::import::cvs::file ; # CVS archive file.
-package require vc::fossil::import::cvs::state ; # State storage
-package require vc::fossil::import::cvs::project::sym ; # Per project symbols
+package require vc::fossil::import::cvs::state ; # State storage.
+package require vc::fossil::import::cvs::project::sym ; # Per project symbols.
+package require struct::list ; # Advanced list operations..
# # ## ### ##### ######## ############# #####################
##
@@ -40,10 +41,10 @@
if {$mybase eq ""} {return <Repository>}
return $mybase
}
- method add {rcs usr} {
- set myfiles($rcs) $usr
+ method addfile {rcs usr executable} {
+ set myfiles($rcs) [list $usr $executable]
return
}
method filenames {} {
@@ -79,12 +80,13 @@
# Then all files, with proper backreference to their
# project.
- foreach {rcs usr} [array get myfiles] {
+ foreach {rcs item} [array get myfiles] {
+ struct::list assign $item usr executable
state run {
- INSERT INTO file (fid, pid, name, visible)
- VALUES (NULL, $pid, $rcs, $usr);
+ INSERT INTO file (fid, pid, name, visible, exec)
+ VALUES (NULL, $pid, $rcs, $usr, $executable);
}
}
}
return
@@ -123,10 +125,11 @@
proc EmptyFiles {fv} {
upvar 1 $fv myfiles self self
set res {}
- foreach f [lsort -dict [array names myfiles]] {
- lappend res [file %AUTO% $f $self]
+ foreach item [lsort -dict [array names myfiles]] {
+ struct::list assign $item f executable
+ lappend res [file %AUTO% $f $executable $self]
}
return $res
}