|
1
|
## -*- tcl -*- |
|
2
|
# # ## ### ##### ######## ############# ##################### |
|
3
|
## Copyright (c) 2007 Andreas Kupries. |
|
4
|
# |
|
5
|
# This software is licensed as described in the file LICENSE, which |
|
6
|
# you should have received as part of this distribution. |
|
7
|
# |
|
8
|
# This software consists of voluntary contributions made by many |
|
9
|
# individuals. For exact contribution history, see the revision |
|
10
|
# history and logs, available at http://fossil-scm.hwaci.com/fossil |
|
11
|
# # ## ### ##### ######## ############# ##################### |
|
12
|
|
|
13
|
## Main package of the cvs conversion/import facility. Loads the |
|
14
|
## required pieces and controls their interaction. |
|
15
|
|
|
16
|
# # ## ### ##### ######## ############# ##################### |
|
17
|
## Requirements |
|
18
|
|
|
19
|
package require Tcl 8.4 ; # Required runtime. |
|
20
|
package require snit ; # OO system |
|
21
|
|
|
22
|
# # ## ### ##### ######## ############# ##################### |
|
23
|
## Passes. The order in which the various passes are loaded is |
|
24
|
## important. It is the same order in which they will |
|
25
|
## register, and then be run in. |
|
26
|
|
|
27
|
package require vc::fossil::import::cvs::pass::collar ; # Coll'ect Ar'chives. |
|
28
|
package require vc::fossil::import::cvs::pass::collrev ; # Coll'ect Rev'isions. |
|
29
|
package require vc::fossil::import::cvs::pass::collsym ; # Coll'ate Sym'bols |
|
30
|
package require vc::fossil::import::cvs::pass::filtersym ; # Filter' Sym'bols |
|
31
|
|
|
32
|
# Note: cvs2svn's SortRevisionSummaryPass and SortSymbolSummaryPass |
|
33
|
# are not implemented by us. They are irrelevant due to our use |
|
34
|
# of a relational database proper for the persistent state, |
|
35
|
# allowing us to sort the data on the fly as we need it. |
|
36
|
|
|
37
|
package require vc::fossil::import::cvs::pass::initcsets ; # Init'ialize C'hange'Sets |
|
38
|
package require vc::fossil::import::cvs::pass::csetdeps ; # C'hange'Set Dep'endencies |
|
39
|
package require vc::fossil::import::cvs::pass::breakrcycle ; # Break' R'evision Cycle's |
|
40
|
package require vc::fossil::import::cvs::pass::rtopsort ; # R'evision Top'ological Sort' |
|
41
|
package require vc::fossil::import::cvs::pass::breakscycle ; # Break' S'ymbol Cycle's |
|
42
|
package require vc::fossil::import::cvs::pass::breakacycle ; # Break' A'll Cycle's |
|
43
|
package require vc::fossil::import::cvs::pass::atopsort ; # A'll Top'ological Sort' |
|
44
|
package require vc::fossil::import::cvs::pass::importfiles ; # Import' Files |
|
45
|
package require vc::fossil::import::cvs::pass::importcsets ; # Import' Changesets |
|
46
|
package require vc::fossil::import::cvs::pass::importfinal ; # Import' Finalization |
|
47
|
|
|
48
|
# # ## ### ##### ######## ############# ##################### |
|
49
|
## Support for passes etc. |
|
50
|
|
|
51
|
package require vc::fossil::import::cvs::option ; # Cmd line parsing & database |
|
52
|
package require vc::fossil::import::cvs::pass ; # Pass management |
|
53
|
package require vc::tools::log ; # User feedback |
|
54
|
|
|
55
|
# # ## ### ##### ######## ############# ##################### |
|
56
|
## |
|
57
|
|
|
58
|
snit::type ::vc::fossil::import::cvs { |
|
59
|
# # ## ### ##### ######## ############# |
|
60
|
## Public API, Methods |
|
61
|
|
|
62
|
typemethod run {arguments} { |
|
63
|
# Run a series of passes over the cvs repository to extract, |
|
64
|
# filter, and order its historical information. Which passes |
|
65
|
# are actually run is determined through the specified options |
|
66
|
# and their defaults. |
|
67
|
|
|
68
|
option process $arguments |
|
69
|
pass run |
|
70
|
|
|
71
|
vc::tools::log write 0 cvs2fossil Done |
|
72
|
return |
|
73
|
} |
|
74
|
|
|
75
|
# # ## ### ##### ######## ############# |
|
76
|
## Configuration |
|
77
|
|
|
78
|
pragma -hasinstances no ; # singleton |
|
79
|
pragma -hastypeinfo no ; # no introspection |
|
80
|
pragma -hastypedestroy no ; # immortal |
|
81
|
|
|
82
|
# # ## ### ##### ######## ############# |
|
83
|
} |
|
84
|
|
|
85
|
# # ## ### ##### ######## ############# ##################### |
|
86
|
## Ready |
|
87
|
|
|
88
|
package provide vc::fossil::import::cvs 1.0 |
|
89
|
return |
|
90
|
|