Differences From:
File
tools/cvs2fossil/lib/c2f_repository.tcl
part of check-in
[66235f2430]
- Updated the copyright information of all files touched in the new year.
by
aku on
2008-02-06 05:04:12.
Also file
tools/cvs2fossil/lib/c2f_repository.tcl
part of check-in
[6b78df3861]
- Merge in changes from Andreas's branch.
by
drh on
2008-02-08 21:52:21.
[view]
To:
File
tools/cvs2fossil/lib/c2f_repository.tcl
part of check-in
[f637d42206]
- Updated my notes regarding memory usage. Converted more locations to incremental query processing via 'state foreachrow', now throughout the importer.
by
aku on
2008-02-24 18:01:40.
[view]
@@ -153,21 +153,21 @@
}
typemethod load {} {
state transaction {
- foreach {pid name} [state run {
+ state foreachrow {
SELECT pid, name FROM project ;
- }] {
+ } {
set project [project %AUTO% $name $type]
lappend myprojpaths $name
lappend myprojects $project
set myprojmap($pid) $project
$project setid $pid
}
- foreach {fid pid name visible exec} [state run {
+ state foreachrow {
SELECT fid, pid, name, visible, exec FROM file ;
- }] {
+ } {
$myprojmap($pid) addfile $name $visible $exec $fid
}
}
return
@@ -245,13 +245,12 @@
state transaction {
# We load the symbol ids at large to have the mapping
# right from the beginning.
- foreach {sid pid name tc bc cc} [state run {
- SELECT sid, pid, name, tag_count, branch_count, commit_count
+ state foreachrow {
+ SELECT sid, pid, name, tag_count AS tc, branch_count AS bc, commit_count AS cc
FROM symbol
- ;
- }] {
+ } {
$mysymbol map $sid [list $pid $name]
set project $myprojmap($pid)
set force [$project hassymbol $name]
@@ -272,21 +271,21 @@
# Beyond the symbols we also load the author, commit log,
# and meta information.
- foreach {aid aname} [state run {
- SELECT aid, name FROM author
- }] {
+ state foreachrow {
+ SELECT aid, name AS aname FROM author
+ } {
$myauthor map $aid $aname
}
- foreach {cid text} [state run {
+ state foreachrow {
SELECT cid, text FROM cmessage
- }] {
+ } {
$mycmsg map $cid $text
}
- foreach {mid pid bid aid cid} [state run {
+ state foreachrow {
SELECT mid, pid, bid, aid, cid FROM meta
- }] {
+ } {
$mymeta map $mid [list $pid $bid $aid $cid]
}
}
return