| | @@ -50,13 +50,10 @@ |
| 50 | 50 | lappend myprojpaths $path |
| 51 | 51 | return |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | typemethod projects {} { |
| 55 | | - # TODO: Loading from the state database if CollAr is skipped |
| 56 | | - # in a run. |
| 57 | | - |
| 58 | 55 | return [TheProjects] |
| 59 | 56 | } |
| 60 | 57 | |
| 61 | 58 | typemethod base? {} { return $mybase } |
| 62 | 59 | |
| | @@ -135,10 +132,28 @@ |
| 135 | 132 | state transaction { |
| 136 | 133 | foreach p [TheProjects] { $p persist } |
| 137 | 134 | } |
| 138 | 135 | return |
| 139 | 136 | } |
| 137 | + |
| 138 | + typemethod load {} { |
| 139 | + array set pr {} |
| 140 | + state transaction { |
| 141 | + foreach {pid name} [state run { |
| 142 | + SELECT pid, name FROM project ; |
| 143 | + }] { |
| 144 | + lappend myprojpaths $name |
| 145 | + lappend myprojects [set pr($pid) [project %AUTO% $name $type]] |
| 146 | + } |
| 147 | + foreach {fid pid name visible exec} [state run { |
| 148 | + SELECT fid, pid, name, visible, exec FROM file ; |
| 149 | + }] { |
| 150 | + $pr($pid) addfile $name $visible $exec |
| 151 | + } |
| 152 | + } |
| 153 | + return |
| 154 | + } |
| 140 | 155 | |
| 141 | 156 | # pass II results |
| 142 | 157 | typemethod printrevstatistics {} { |
| 143 | 158 | log write 2 repository "Scanned ..." |
| 144 | 159 | # number of revisions, symbols, repository wide, per project ... |
| | @@ -198,11 +213,10 @@ |
| 198 | 213 | |
| 199 | 214 | proc TheProjects {} { |
| 200 | 215 | upvar 1 type type |
| 201 | 216 | ::variable myprojects |
| 202 | 217 | ::variable myprojpaths |
| 203 | | - ::variable mybase |
| 204 | 218 | |
| 205 | 219 | if {![llength $myprojects]} { |
| 206 | 220 | set myprojects [EmptyProjects $myprojpaths] |
| 207 | 221 | } |
| 208 | 222 | return $myprojects |
| 209 | 223 | |