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