1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
## -*- tcl -*-
# # ## ### ##### ######## ############# #####################
## Copyright (c) 2007 Andreas Kupries.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#
# This software consists of voluntary contributions made by many
# individuals. For exact contribution history, see the revision
# history and logs, available at http://fossil-scm.hwaci.com/fossil
# # ## ### ##### ######## ############# #####################
## Pass II. This pass parses the colected rcs archives and extracts
## all the information they contain (revisions, and symbols).
# # ## ### ##### ######## ############# #####################
## Requirements
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require fileutil::traverse ; # Directory traversal.
package require fileutil ; # File & path utilities.
package require vc::tools::trouble ; # Error reporting.
package require vc::tools::log ; # User feedback.
package require vc::fossil::import::cvs::pass ; # Pass management.
package require vc::fossil::import::cvs::repository ; # Repository management.
package require vc::fossil::import::cvs::state ; # State storage.
package require vc::rcs::parser ; # Rcs archive data extraction.
|
|
<
<
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
## -*- tcl -*-
# # ## ### ##### ######## ############# #####################
## Copyright (c) 2007 Andreas Kupries.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#
# This software consists of voluntary contributions made by many
# individuals. For exact contribution history, see the revision
# history and logs, available at http://fossil-scm.hwaci.com/fossil
# # ## ### ##### ######## ############# #####################
## Pass II. This pass parses the collected rcs archives and extracts
## all the information they contain (revisions, and symbols).
# # ## ### ##### ######## ############# #####################
## Requirements
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require vc::tools::trouble ; # Error reporting.
package require vc::tools::log ; # User feedback.
package require vc::fossil::import::cvs::pass ; # Pass management.
package require vc::fossil::import::cvs::repository ; # Repository management.
package require vc::fossil::import::cvs::state ; # State storage.
package require vc::rcs::parser ; # Rcs archive data extraction.
|
| ︙ | | | ︙ | |
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
# pBranch <- pSymbol, pLineOfDevelopment
# pTag <- pSymbol, pLineOfDevelopment
state writing symbol {
sid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
pid INTEGER NOT NULL REFERENCES project, -- Project the symbol belongs to
name TEXT NOT NULL,
type INTEGER NOT NULL, -- enum { tag = 1, branch, undefined }
tag_count INTEGER NOT NULL, -- How often the symbol is used as tag.
branch_count INTEGER NOT NULL, -- How often the symbol is used as branch
commit_count INTEGER NOT NULL, -- How often a file was committed on the symbol
UNIQUE (pid, name) -- Symbols are unique within the project
}
|
|
|
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
# pBranch <- pSymbol, pLineOfDevelopment
# pTag <- pSymbol, pLineOfDevelopment
state writing symbol {
sid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
pid INTEGER NOT NULL REFERENCES project, -- Project the symbol belongs to
name TEXT NOT NULL,
type INTEGER NOT NULL REFERENCES symtype, -- enum { excluded = 0, tag, branch, undefined }
tag_count INTEGER NOT NULL, -- How often the symbol is used as tag.
branch_count INTEGER NOT NULL, -- How often the symbol is used as branch
commit_count INTEGER NOT NULL, -- How often a file was committed on the symbol
UNIQUE (pid, name) -- Symbols are unique within the project
}
|
| ︙ | | | ︙ | |
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
-- a possible parent in some file, and how often.
sid INTEGER NOT NULL REFERENCES symbol, --
pid INTEGER NOT NULL REFERENCES symbol, -- Possible parent of sid
n INTEGER NOT NULL, -- How often pid can act as parent.
UNIQUE (sid, pid)
}
state writing meta {
-- Meta data of revisions. See revision.mid for the
-- reference. Many revisions can share meta data. This is
-- actually one of the criterions used to sort revisions
-- into changesets.
|
>
>
>
>
>
>
>
>
>
>
>
>
|
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
-- a possible parent in some file, and how often.
sid INTEGER NOT NULL REFERENCES symbol, --
pid INTEGER NOT NULL REFERENCES symbol, -- Possible parent of sid
n INTEGER NOT NULL, -- How often pid can act as parent.
UNIQUE (sid, pid)
}
state writing symtype {
tid INTEGER NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
UNIQUE (name)
}
state run {
INSERT INTO symtype VALUES (0,'excluded');
INSERT INTO symtype VALUES (1,'tag');
INSERT INTO symtype VALUES (2,'branch');
INSERT INTO symtype VALUES (3,'undefined');
}
state writing meta {
-- Meta data of revisions. See revision.mid for the
-- reference. Many revisions can share meta data. This is
-- actually one of the criterions used to sort revisions
-- into changesets.
|
| ︙ | | | ︙ | |
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
text TEXT NOT NULL UNIQUE
}
return
}
typemethod load {} {
# TODO
return
}
typemethod run {} {
# Pass manager interface. Executed to perform the
# functionality of the pass.
|
>
|
>
|
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
text TEXT NOT NULL UNIQUE
}
return
}
typemethod load {} {
state reading symbol
repository loadsymbols
return
}
typemethod run {} {
# Pass manager interface. Executed to perform the
# functionality of the pass.
|
| ︙ | | | ︙ | |
311
312
313
314
315
316
317
318
319
320
321
322
323
324
|
state discard revision
state discard tag
state discard branch
state discard symbol
state discard blocker
state discard parent
state discard meta
state discard author
state discard cmessage
return
}
proc Paranoia {} {
|
>
|
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
state discard revision
state discard tag
state discard branch
state discard symbol
state discard blocker
state discard parent
state discard symtype
state discard meta
state discard author
state discard cmessage
return
}
proc Paranoia {} {
|
| ︙ | | | ︙ | |