Differences From:
File
tools/cvs2fossil/lib/c2f_project.tcl
part of check-in
[2c08006d9d]
- Changed the coding of trunk symbols. Using NULL makes for difficult comparisons later when doing integrity checks. Each trunk now has a regular unique id as a symbol. Added documentation to the table definitions, about references, constraints, etc.
by
aku on
2007-10-25 05:13:41.
[view]
To:
File
tools/cvs2fossil/lib/c2f_project.tcl
part of check-in
[1deb3786aa]
- Added saving of the fundamental symbol information (project level).
by
aku on
2007-10-26 05:28:24.
[view]
@@ -44,8 +44,9 @@
if {$mybase eq ""} {return <Repository>}
return $mybase
}
+ method id {} { return $myid }
method setid {id} { set myid $id ; return }
method addfile {rcs usr executable {fid {}}} {
set myfiles($rcs) [list $usr $executable $fid]
@@ -69,13 +70,13 @@
return [$myrepository defmeta $myid $bid $aid $cid]
}
method getsymbol {name} {
- if {![info exists mysymbols($name)]} {
- set mysymbols($name) \
- [sym %AUTO% $name [$myrepository defsymbol $myid $name]]
+ if {![info exists mysymbol($name)]} {
+ set mysymbol($name) \
+ [sym %AUTO% $name [$myrepository defsymbol $myid $name] $self]
}
- return $mysymbols($name)
+ return $mysymbol($name)
}
# pass I persistence
method persist {} {
@@ -108,15 +109,22 @@
# pass II persistence
method persistrev {} {
# Note: The per file information (incl. revisions and symbols)
- # has already been saved and dropped, immediately after
- # processing it, to keep out use of memory under control. Now
- # we just have to save the remaining project level parts to
- # fix the left-over dangling references.
+ # has already been saved and dropped. This was done
+ # immediately after processing it, i.e. as part of the main
+ # segment of the pass, to keep out use of memory under
+ # control.
+ #
+ # The repository level information has been saved as well too,
+ # just before saving the projects started. So now we just have
+ # to save the remaining project level parts to fix the
+ # left-over dangling references, which are the symbols.
state transaction {
- # TODO: per project persistence (symbols, meta data)
+ foreach {name symbol} [array get mysymbol] {
+ $symbol persistrev
+ }
}
return
}
@@ -131,9 +139,9 @@
# their user-visible files.
variable myfobj {} ; # File objects for the rcs archives
variable myfmap -array {} ; # Map rcs archive to their object.
variable myrepository {} ; # Repository the prject belongs to.
- variable mysymbols -array {} ; # Map symbol names to project-level
+ variable mysymbol -array {} ; # Map symbol names to project-level
# symbol objects.
# # ## ### ##### ######## #############
## Internal methods