Fossil SCM

Continued work on pass I. Filled in the repository management, and basic implementation of project objects. Missing are persistence and the foundation for that (cache database).

aku 2007-10-04 04:34 trunk
Commit 52f2254007f2215da3639887185db73df661d60a
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -45,12 +45,13 @@
4545
typemethod setup {} {
4646
# TODO ... artifact/cache - drop projects/files, create projects/files
4747
}
4848
4949
typemethod run {} {
50
+ set rbase [repository base?]
5051
foreach project [repository projects] {
51
- set base [$project base]
52
+ set base [file join $rbase [$project base]]
5253
log write 1 collar "Scan $base"
5354
5455
set traverse [fileutil::traverse %AUTO% $base]
5556
set n 0
5657
set r {}
@@ -61,31 +62,38 @@
6162
if {![IsRCSArchive $path]} continue
6263
6364
set usr [UserPath $rcs isattic]
6465
if {[IsSuperceded $base $rcs $usr $isattic]} continue
6566
66
- log write 1 collar "Found $rcs"
67
+ log write 4 collar "Found $rcs"
6768
$project add $rcs $usr
6869
6970
incr n
70
- log progress 0 collar $n {}
71
+ if {[log verbosity?] < 4} {
72
+ log progress 0 collar $n {}
73
+ }
7174
}
7275
7376
$traverse destroy
7477
}
78
+
79
+ repository printstatistics
80
+ repository persist
81
+
82
+ log write 1 collar "Scan completed"
7583
return
7684
}
7785
7886
typemethod ignore_conflicting_attics {} {
79
- set ignore 1
87
+ set myignore 1
8088
return
8189
}
8290
8391
# # ## ### ##### ######## #############
8492
## Internal methods
8593
86
- typevariable ignore 0
94
+ typevariable myignore 0
8795
8896
proc IsRCSArchive {path} {
8997
if {![string match *,v $path]} {return 0}
9098
if {[fileutil::test $path fr msg]} {return 1}
9199
trouble warn $msg
@@ -92,11 +100,11 @@
92100
return 0
93101
}
94102
95103
proc IsCVSAdmin {rcs} {
96104
if {![string match CVSROOT/* $rcs]} {return 0}
97
- log write 2 collar "Ignored $rcs, administrative archive"
105
+ log write 4 collar "Ignored $rcs, administrative archive"
98106
return 1
99107
}
100108
101109
proc UserPath {rcs iav} {
102110
upvar 1 $iav isattic
@@ -133,11 +141,12 @@
133141
# By default this is a problem causing an abort after the pass
134142
# has completed. The user can however force us to ignore it.
135143
# In that case the warning is still printed, but will not
136144
# induce an abort any longer.
137145
138
- if {$ignore} {
146
+ upvar 1 myignore myignore
147
+ if {$myignore} {
139148
log write 2 collar "Ignored $rcs, superceded archive"
140149
} else {
141150
trouble warn "Ignored $rcs, superceded archive"
142151
}
143152
return 1
144153
145154
ADDED tools/cvs2fossil/lib/c2f_project.tcl
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -45,12 +45,13 @@
45 typemethod setup {} {
46 # TODO ... artifact/cache - drop projects/files, create projects/files
47 }
48
49 typemethod run {} {
 
50 foreach project [repository projects] {
51 set base [$project base]
52 log write 1 collar "Scan $base"
53
54 set traverse [fileutil::traverse %AUTO% $base]
55 set n 0
56 set r {}
@@ -61,31 +62,38 @@
61 if {![IsRCSArchive $path]} continue
62
63 set usr [UserPath $rcs isattic]
64 if {[IsSuperceded $base $rcs $usr $isattic]} continue
65
66 log write 1 collar "Found $rcs"
67 $project add $rcs $usr
68
69 incr n
70 log progress 0 collar $n {}
 
 
71 }
72
73 $traverse destroy
74 }
 
 
 
 
 
75 return
76 }
77
78 typemethod ignore_conflicting_attics {} {
79 set ignore 1
80 return
81 }
82
83 # # ## ### ##### ######## #############
84 ## Internal methods
85
86 typevariable ignore 0
87
88 proc IsRCSArchive {path} {
89 if {![string match *,v $path]} {return 0}
90 if {[fileutil::test $path fr msg]} {return 1}
91 trouble warn $msg
@@ -92,11 +100,11 @@
92 return 0
93 }
94
95 proc IsCVSAdmin {rcs} {
96 if {![string match CVSROOT/* $rcs]} {return 0}
97 log write 2 collar "Ignored $rcs, administrative archive"
98 return 1
99 }
100
101 proc UserPath {rcs iav} {
102 upvar 1 $iav isattic
@@ -133,11 +141,12 @@
133 # By default this is a problem causing an abort after the pass
134 # has completed. The user can however force us to ignore it.
135 # In that case the warning is still printed, but will not
136 # induce an abort any longer.
137
138 if {$ignore} {
 
139 log write 2 collar "Ignored $rcs, superceded archive"
140 } else {
141 trouble warn "Ignored $rcs, superceded archive"
142 }
143 return 1
144
145 DDED tools/cvs2fossil/lib/c2f_project.tcl
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -45,12 +45,13 @@
45 typemethod setup {} {
46 # TODO ... artifact/cache - drop projects/files, create projects/files
47 }
48
49 typemethod run {} {
50 set rbase [repository base?]
51 foreach project [repository projects] {
52 set base [file join $rbase [$project base]]
53 log write 1 collar "Scan $base"
54
55 set traverse [fileutil::traverse %AUTO% $base]
56 set n 0
57 set r {}
@@ -61,31 +62,38 @@
62 if {![IsRCSArchive $path]} continue
63
64 set usr [UserPath $rcs isattic]
65 if {[IsSuperceded $base $rcs $usr $isattic]} continue
66
67 log write 4 collar "Found $rcs"
68 $project add $rcs $usr
69
70 incr n
71 if {[log verbosity?] < 4} {
72 log progress 0 collar $n {}
73 }
74 }
75
76 $traverse destroy
77 }
78
79 repository printstatistics
80 repository persist
81
82 log write 1 collar "Scan completed"
83 return
84 }
85
86 typemethod ignore_conflicting_attics {} {
87 set myignore 1
88 return
89 }
90
91 # # ## ### ##### ######## #############
92 ## Internal methods
93
94 typevariable myignore 0
95
96 proc IsRCSArchive {path} {
97 if {![string match *,v $path]} {return 0}
98 if {[fileutil::test $path fr msg]} {return 1}
99 trouble warn $msg
@@ -92,11 +100,11 @@
100 return 0
101 }
102
103 proc IsCVSAdmin {rcs} {
104 if {![string match CVSROOT/* $rcs]} {return 0}
105 log write 4 collar "Ignored $rcs, administrative archive"
106 return 1
107 }
108
109 proc UserPath {rcs iav} {
110 upvar 1 $iav isattic
@@ -133,11 +141,12 @@
141 # By default this is a problem causing an abort after the pass
142 # has completed. The user can however force us to ignore it.
143 # In that case the warning is still printed, but will not
144 # induce an abort any longer.
145
146 upvar 1 myignore myignore
147 if {$myignore} {
148 log write 2 collar "Ignored $rcs, superceded archive"
149 } else {
150 trouble warn "Ignored $rcs, superceded archive"
151 }
152 return 1
153
154 DDED tools/cvs2fossil/lib/c2f_project.tcl
--- a/tools/cvs2fossil/lib/c2f_project.tcl
+++ b/tools/cvs2fossil/lib/c2f_project.tcl
@@ -0,0 +1,4 @@
1
+#struct::listss]
2
+ }array names myfiles]array names myfiless]
3
+ }array names myfiles]array names myfiles]
4
+ }array na
--- a/tools/cvs2fossil/lib/c2f_project.tcl
+++ b/tools/cvs2fossil/lib/c2f_project.tcl
@@ -0,0 +1,4 @@
 
 
 
 
--- a/tools/cvs2fossil/lib/c2f_project.tcl
+++ b/tools/cvs2fossil/lib/c2f_project.tcl
@@ -0,0 +1,4 @@
1 #struct::listss]
2 }array names myfiles]array names myfiless]
3 }array names myfiles]array names myfiles]
4 }array na
--- tools/cvs2fossil/lib/c2f_repository.tcl
+++ tools/cvs2fossil/lib/c2f_repository.tcl
@@ -13,30 +13,168 @@
1313
## Repository manager. Keeps projects and their files around.
1414
1515
# # ## ### ##### ######## ############# #####################
1616
## Requirements
1717
18
-package require Tcl 8.4 ; # Required runtime.
19
-package require snit ; # OO system.
18
+package require Tcl 8.4 ; # Required runtime.
19
+package require snit ; # OO system.
20
+package require vc::tools::trouble ; # Error reporting.
21
+package require vc::tools::log ; # User feedback.
22
+package require vc::tools::misc ; # Text formatting
23
+package require vc::fossil::import::cvs::project ; # CVS projects
24
+package require struct::list ; # List operations.
2025
2126
# # ## ### ##### ######## ############# #####################
2227
##
2328
2429
snit::type ::vc::fossil::import::cvs::repository {
2530
# # ## ### ##### ######## #############
2631
## Public API
2732
2833
typemethod base {path} {
34
+ # Could be checked, easier to defer to the overall validation.
35
+ set mybase $path
36
+ return
2937
}
3038
3139
typemethod add {path} {
40
+ # Cannot be checked immediately, the base is not known while
41
+ # projects are added.
42
+ lappend myprojpaths $path
43
+ return
3244
}
3345
3446
typemethod projects {} {
47
+ # TODO: Loading from the state database if CollAr is skipped
48
+ # in a run.
49
+
50
+ return [TheProjects]
3551
}
52
+
53
+ typemethod base? {} { return $mybase }
3654
3755
typemethod validate {} {
56
+ if {![IsRepositoryBase $mybase msg]} {
57
+ trouble fatal $msg
58
+ # Without a good base directory checking any projects is
59
+ # wasted time, so we leave now.
60
+ return
61
+ }
62
+ foreach pp $myprojpaths {
63
+ if {![IsProjectBase $mybase/$pp $mybase/CVSROOT msg]} {
64
+ trouble fatal $msg
65
+ }
66
+ }
67
+ return
68
+ }
69
+
70
+ typemethod printstatistics {} {
71
+ set prlist [TheProjects]
72
+ set npr [llength $prlist]
73
+
74
+ log write 2 repository "Scanned [nsp $npr project]"
75
+
76
+ if {$npr > 1} {
77
+ set bmax [max [struct::list map $prlist [myproc .BaseLength]]]
78
+ incr bmax 2
79
+ set bfmt %-${bmax}s
80
+
81
+ set nmax [max [struct::list map $prlist [myproc .NFileLength]]]
82
+ set nfmt %${nmax}s
83
+ } else {
84
+ set bfmt %s
85
+ set nfmt %s
86
+ }
87
+
88
+ set keep {}
89
+ foreach p $prlist {
90
+ set nfiles [llength [$p files]]
91
+ set line "Project [format $bfmt \"[$p printbase]\"] : [format $nfmt $nfiles] [sp $nfiles file]"
92
+ if {$nfiles < 1} {
93
+ append line ", dropped"
94
+ } else {
95
+ lappend keep $p
96
+ }
97
+ log write 2 repository $line
98
+ }
99
+
100
+ if {![llength $keep]} {
101
+ trouble warn "Dropped all projects"
102
+ } elseif {$npr == [llength $keep]} {
103
+ log write 2 repository "Keeping all projects"
104
+ } else {
105
+ log write 2 repository "Keeping [nsp [llength $keep] project]"
106
+ trouble warn "Dropped [nsp [expr {$npr - [llength $keep]}] {empty project}]"
107
+ }
108
+
109
+ # Keep reduced set of projects.
110
+ set projects $keep
111
+ return
112
+ }
113
+
114
+ typemethod persist {} {
115
+ }
116
+
117
+ # # ## ### ##### ######## #############
118
+ ## State
119
+
120
+ typevariable mybase {}
121
+ typevariable myprojpaths {}
122
+ typevariable myprojects {}
123
+
124
+ # # ## ### ##### ######## #############
125
+ ## Internal methods
126
+
127
+ proc .BaseLength {p} {
128
+ return [string length [$p printbase]]
129
+ }
130
+
131
+ proc .NFileLength {p} {
132
+ return [string length [llength [$p files]]]
133
+ }
134
+
135
+ proc IsRepositoryBase {path mv} {
136
+ upvar 1 $mv msg mybase mybase
137
+ if {![fileutil::test $mybase edr msg {CVS Repository}]} {return 0}
138
+ if {![fileutil::test $mybase/CVSROOT edr msg {CVS Admin Directory}]} {return 0}
139
+ return 1
140
+ }
141
+
142
+ proc IsProjectBase {path admin mv} {
143
+ upvar 1 $mv msg
144
+ if {![fileutil::test $path edr msg Project]} {return 0}
145
+ if {
146
+ ($path eq $admin) ||
147
+ [string match $admin/* $path]
148
+ } {
149
+ set msg "Administrative subdirectory $path cannot be a project"
150
+ return 0
151
+ }
152
+ return 1
153
+ }
154
+
155
+ proc TheProjects {} {
156
+ upvar 1 myprojects myprojects myprojpaths myprojpaths mybase mybase
157
+
158
+ if {![llength $myprojects]} {
159
+ set myprojects [EmptyProjects $myprojpaths]
160
+ }
161
+ return $myprojects
162
+ }
163
+
164
+ proc EmptyProjects {projpaths} {
165
+ upvar 1 mybase mybase
166
+ set res {}
167
+ if {[llength $projpaths]} {
168
+ foreach pp $projpaths {
169
+ lappend res [project %AUTO% $pp]
170
+ }
171
+ } else {
172
+ # Base is the single project.
173
+ lappend res [project %AUTO% ""]
174
+ }
175
+ return $res
38176
}
39177
40178
# # ## ### ##### ######## #############
41179
## Configuration
42180
@@ -48,16 +186,18 @@
48186
}
49187
50188
namespace eval ::vc::fossil::import::cvs {
51189
namespace export repository
52190
namespace eval repository {
53
- #namespace import ::vc::tools::trouble
54
- #namespace import ::vc::tools::log
55
- #log register collar
191
+ namespace import ::vc::fossil::import::cvs::project
192
+ namespace import ::vc::tools::trouble
193
+ namespace import ::vc::tools::log
194
+ namespace import ::vc::tools::misc::*
195
+ log register repository
56196
}
57197
}
58198
59199
# # ## ### ##### ######## ############# #####################
60200
## Ready
61201
62202
package provide vc::fossil::import::cvs::repository 1.0
63203
return
64204
--- tools/cvs2fossil/lib/c2f_repository.tcl
+++ tools/cvs2fossil/lib/c2f_repository.tcl
@@ -13,30 +13,168 @@
13 ## Repository manager. Keeps projects and their files around.
14
15 # # ## ### ##### ######## ############# #####################
16 ## Requirements
17
18 package require Tcl 8.4 ; # Required runtime.
19 package require snit ; # OO system.
 
 
 
 
 
20
21 # # ## ### ##### ######## ############# #####################
22 ##
23
24 snit::type ::vc::fossil::import::cvs::repository {
25 # # ## ### ##### ######## #############
26 ## Public API
27
28 typemethod base {path} {
 
 
 
29 }
30
31 typemethod add {path} {
 
 
 
 
32 }
33
34 typemethod projects {} {
 
 
 
 
35 }
 
 
36
37 typemethod validate {} {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38 }
39
40 # # ## ### ##### ######## #############
41 ## Configuration
42
@@ -48,16 +186,18 @@
48 }
49
50 namespace eval ::vc::fossil::import::cvs {
51 namespace export repository
52 namespace eval repository {
53 #namespace import ::vc::tools::trouble
54 #namespace import ::vc::tools::log
55 #log register collar
 
 
56 }
57 }
58
59 # # ## ### ##### ######## ############# #####################
60 ## Ready
61
62 package provide vc::fossil::import::cvs::repository 1.0
63 return
64
--- tools/cvs2fossil/lib/c2f_repository.tcl
+++ tools/cvs2fossil/lib/c2f_repository.tcl
@@ -13,30 +13,168 @@
13 ## Repository manager. Keeps projects and their files around.
14
15 # # ## ### ##### ######## ############# #####################
16 ## Requirements
17
18 package require Tcl 8.4 ; # Required runtime.
19 package require snit ; # OO system.
20 package require vc::tools::trouble ; # Error reporting.
21 package require vc::tools::log ; # User feedback.
22 package require vc::tools::misc ; # Text formatting
23 package require vc::fossil::import::cvs::project ; # CVS projects
24 package require struct::list ; # List operations.
25
26 # # ## ### ##### ######## ############# #####################
27 ##
28
29 snit::type ::vc::fossil::import::cvs::repository {
30 # # ## ### ##### ######## #############
31 ## Public API
32
33 typemethod base {path} {
34 # Could be checked, easier to defer to the overall validation.
35 set mybase $path
36 return
37 }
38
39 typemethod add {path} {
40 # Cannot be checked immediately, the base is not known while
41 # projects are added.
42 lappend myprojpaths $path
43 return
44 }
45
46 typemethod projects {} {
47 # TODO: Loading from the state database if CollAr is skipped
48 # in a run.
49
50 return [TheProjects]
51 }
52
53 typemethod base? {} { return $mybase }
54
55 typemethod validate {} {
56 if {![IsRepositoryBase $mybase msg]} {
57 trouble fatal $msg
58 # Without a good base directory checking any projects is
59 # wasted time, so we leave now.
60 return
61 }
62 foreach pp $myprojpaths {
63 if {![IsProjectBase $mybase/$pp $mybase/CVSROOT msg]} {
64 trouble fatal $msg
65 }
66 }
67 return
68 }
69
70 typemethod printstatistics {} {
71 set prlist [TheProjects]
72 set npr [llength $prlist]
73
74 log write 2 repository "Scanned [nsp $npr project]"
75
76 if {$npr > 1} {
77 set bmax [max [struct::list map $prlist [myproc .BaseLength]]]
78 incr bmax 2
79 set bfmt %-${bmax}s
80
81 set nmax [max [struct::list map $prlist [myproc .NFileLength]]]
82 set nfmt %${nmax}s
83 } else {
84 set bfmt %s
85 set nfmt %s
86 }
87
88 set keep {}
89 foreach p $prlist {
90 set nfiles [llength [$p files]]
91 set line "Project [format $bfmt \"[$p printbase]\"] : [format $nfmt $nfiles] [sp $nfiles file]"
92 if {$nfiles < 1} {
93 append line ", dropped"
94 } else {
95 lappend keep $p
96 }
97 log write 2 repository $line
98 }
99
100 if {![llength $keep]} {
101 trouble warn "Dropped all projects"
102 } elseif {$npr == [llength $keep]} {
103 log write 2 repository "Keeping all projects"
104 } else {
105 log write 2 repository "Keeping [nsp [llength $keep] project]"
106 trouble warn "Dropped [nsp [expr {$npr - [llength $keep]}] {empty project}]"
107 }
108
109 # Keep reduced set of projects.
110 set projects $keep
111 return
112 }
113
114 typemethod persist {} {
115 }
116
117 # # ## ### ##### ######## #############
118 ## State
119
120 typevariable mybase {}
121 typevariable myprojpaths {}
122 typevariable myprojects {}
123
124 # # ## ### ##### ######## #############
125 ## Internal methods
126
127 proc .BaseLength {p} {
128 return [string length [$p printbase]]
129 }
130
131 proc .NFileLength {p} {
132 return [string length [llength [$p files]]]
133 }
134
135 proc IsRepositoryBase {path mv} {
136 upvar 1 $mv msg mybase mybase
137 if {![fileutil::test $mybase edr msg {CVS Repository}]} {return 0}
138 if {![fileutil::test $mybase/CVSROOT edr msg {CVS Admin Directory}]} {return 0}
139 return 1
140 }
141
142 proc IsProjectBase {path admin mv} {
143 upvar 1 $mv msg
144 if {![fileutil::test $path edr msg Project]} {return 0}
145 if {
146 ($path eq $admin) ||
147 [string match $admin/* $path]
148 } {
149 set msg "Administrative subdirectory $path cannot be a project"
150 return 0
151 }
152 return 1
153 }
154
155 proc TheProjects {} {
156 upvar 1 myprojects myprojects myprojpaths myprojpaths mybase mybase
157
158 if {![llength $myprojects]} {
159 set myprojects [EmptyProjects $myprojpaths]
160 }
161 return $myprojects
162 }
163
164 proc EmptyProjects {projpaths} {
165 upvar 1 mybase mybase
166 set res {}
167 if {[llength $projpaths]} {
168 foreach pp $projpaths {
169 lappend res [project %AUTO% $pp]
170 }
171 } else {
172 # Base is the single project.
173 lappend res [project %AUTO% ""]
174 }
175 return $res
176 }
177
178 # # ## ### ##### ######## #############
179 ## Configuration
180
@@ -48,16 +186,18 @@
186 }
187
188 namespace eval ::vc::fossil::import::cvs {
189 namespace export repository
190 namespace eval repository {
191 namespace import ::vc::fossil::import::cvs::project
192 namespace import ::vc::tools::trouble
193 namespace import ::vc::tools::log
194 namespace import ::vc::tools::misc::*
195 log register repository
196 }
197 }
198
199 # # ## ### ##### ######## ############# #####################
200 ## Ready
201
202 package provide vc::fossil::import::cvs::repository 1.0
203 return
204
--- tools/cvs2fossil/lib/cvs2fossil.tcl
+++ tools/cvs2fossil/lib/cvs2fossil.tcl
@@ -29,10 +29,11 @@
2929
# # ## ### ##### ######## ############# #####################
3030
## Support for passes etc.
3131
3232
package require vc::fossil::import::cvs::option ; # Cmd line parsing & database
3333
package require vc::fossil::import::cvs::pass ; # Pass management
34
+package require vc::tools::log ; # User feedback
3435
3536
# # ## ### ##### ######## ############# #####################
3637
##
3738
3839
snit::type ::vc::fossil::import::cvs {
@@ -45,10 +46,12 @@
4546
# are actually run is determined through the specified options
4647
# and their defaults.
4748
4849
option process $arguments
4950
pass run
51
+
52
+ vc::tools::log write 0 cvs2fossil Done
5053
return
5154
}
5255
5356
# # ## ### ##### ######## #############
5457
## Configuration
5558
5659
ADDED tools/cvs2fossil/lib/misc.tcl
--- tools/cvs2fossil/lib/cvs2fossil.tcl
+++ tools/cvs2fossil/lib/cvs2fossil.tcl
@@ -29,10 +29,11 @@
29 # # ## ### ##### ######## ############# #####################
30 ## Support for passes etc.
31
32 package require vc::fossil::import::cvs::option ; # Cmd line parsing & database
33 package require vc::fossil::import::cvs::pass ; # Pass management
 
34
35 # # ## ### ##### ######## ############# #####################
36 ##
37
38 snit::type ::vc::fossil::import::cvs {
@@ -45,10 +46,12 @@
45 # are actually run is determined through the specified options
46 # and their defaults.
47
48 option process $arguments
49 pass run
 
 
50 return
51 }
52
53 # # ## ### ##### ######## #############
54 ## Configuration
55
56 DDED tools/cvs2fossil/lib/misc.tcl
--- tools/cvs2fossil/lib/cvs2fossil.tcl
+++ tools/cvs2fossil/lib/cvs2fossil.tcl
@@ -29,10 +29,11 @@
29 # # ## ### ##### ######## ############# #####################
30 ## Support for passes etc.
31
32 package require vc::fossil::import::cvs::option ; # Cmd line parsing & database
33 package require vc::fossil::import::cvs::pass ; # Pass management
34 package require vc::tools::log ; # User feedback
35
36 # # ## ### ##### ######## ############# #####################
37 ##
38
39 snit::type ::vc::fossil::import::cvs {
@@ -45,10 +46,12 @@
46 # are actually run is determined through the specified options
47 # and their defaults.
48
49 option process $arguments
50 pass run
51
52 vc::tools::log write 0 cvs2fossil Done
53 return
54 }
55
56 # # ## ### ##### ######## #############
57 ## Configuration
58
59 DDED tools/cvs2fossil/lib/misc.tcl
--- a/tools/cvs2fossil/lib/misc.tcl
+++ b/tools/cvs2fossil/lib/misc.tcl
@@ -0,0 +1,2 @@
1
+## -*- tcl -*-
2
+# # ## ### ###### # ## ### ## # ## ### #
--- a/tools/cvs2fossil/lib/misc.tcl
+++ b/tools/cvs2fossil/lib/misc.tcl
@@ -0,0 +1,2 @@
 
 
--- a/tools/cvs2fossil/lib/misc.tcl
+++ b/tools/cvs2fossil/lib/misc.tcl
@@ -0,0 +1,2 @@
1 ## -*- tcl -*-
2 # # ## ### ###### # ## ### ## # ## ### #
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -6,7 +6,10 @@
66
package ifneeded vc::fossil::import::cvs 1.0 [list source [file join $dir cvs2fossil.tcl]]
77
package ifneeded vc::fossil::import::cvs::option 1.0 [list source [file join $dir c2f_option.tcl]]
88
package ifneeded vc::fossil::import::cvs::pass 1.0 [list source [file join $dir c2f_pass.tcl]]
99
package ifneeded vc::fossil::import::cvs::pass::collar 1.0 [list source [file join $dir c2f_pcollar.tcl]]
1010
package ifneeded vc::fossil::import::cvs::repository 1.0 [list source [file join $dir c2f_repository.tcl]]
11
+package ifneeded vc::fossil::import::cvs::project 1.0 [list source [file join $dir c2f_project.tcl]]
1112
package ifneeded vc::tools::trouble 1.0 [list source [file join $dir trouble.tcl]]
1213
package ifneeded vc::tools::log 1.0 [list source [file join $dir log.tcl]]
14
+package ifneeded vc::tools::misc 1.0 [list source [file join $dir misc.tcl]]
15
+
1316
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -6,7 +6,10 @@
6 package ifneeded vc::fossil::import::cvs 1.0 [list source [file join $dir cvs2fossil.tcl]]
7 package ifneeded vc::fossil::import::cvs::option 1.0 [list source [file join $dir c2f_option.tcl]]
8 package ifneeded vc::fossil::import::cvs::pass 1.0 [list source [file join $dir c2f_pass.tcl]]
9 package ifneeded vc::fossil::import::cvs::pass::collar 1.0 [list source [file join $dir c2f_pcollar.tcl]]
10 package ifneeded vc::fossil::import::cvs::repository 1.0 [list source [file join $dir c2f_repository.tcl]]
 
11 package ifneeded vc::tools::trouble 1.0 [list source [file join $dir trouble.tcl]]
12 package ifneeded vc::tools::log 1.0 [list source [file join $dir log.tcl]]
 
 
13
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -6,7 +6,10 @@
6 package ifneeded vc::fossil::import::cvs 1.0 [list source [file join $dir cvs2fossil.tcl]]
7 package ifneeded vc::fossil::import::cvs::option 1.0 [list source [file join $dir c2f_option.tcl]]
8 package ifneeded vc::fossil::import::cvs::pass 1.0 [list source [file join $dir c2f_pass.tcl]]
9 package ifneeded vc::fossil::import::cvs::pass::collar 1.0 [list source [file join $dir c2f_pcollar.tcl]]
10 package ifneeded vc::fossil::import::cvs::repository 1.0 [list source [file join $dir c2f_repository.tcl]]
11 package ifneeded vc::fossil::import::cvs::project 1.0 [list source [file join $dir c2f_project.tcl]]
12 package ifneeded vc::tools::trouble 1.0 [list source [file join $dir trouble.tcl]]
13 package ifneeded vc::tools::log 1.0 [list source [file join $dir log.tcl]]
14 package ifneeded vc::tools::misc 1.0 [list source [file join $dir misc.tcl]]
15
16
--- tools/cvs2fossil/lib/trouble.tcl
+++ tools/cvs2fossil/lib/trouble.tcl
@@ -58,11 +58,18 @@
5858
if {
5959
![llength $myinfo] &&
6060
![llength $mywarn] &&
6161
![llength $myfatal]
6262
} return
63
- # We have error messages to print, so stop.
63
+
64
+ # Frame the pending messages to make them more clear as the
65
+ # cause of the abort.
66
+
67
+ set myinfo [linsert $myinfo 0 "" "Encountered problems." ""]
68
+ lappend myfatal "Stopped due to problems."
69
+
70
+ # We have error messages to print, so stop now.
6471
exit 1
6572
}
6673
6774
# # ## ### ##### ######## #############
6875
## Internal, state
6976
--- tools/cvs2fossil/lib/trouble.tcl
+++ tools/cvs2fossil/lib/trouble.tcl
@@ -58,11 +58,18 @@
58 if {
59 ![llength $myinfo] &&
60 ![llength $mywarn] &&
61 ![llength $myfatal]
62 } return
63 # We have error messages to print, so stop.
 
 
 
 
 
 
 
64 exit 1
65 }
66
67 # # ## ### ##### ######## #############
68 ## Internal, state
69
--- tools/cvs2fossil/lib/trouble.tcl
+++ tools/cvs2fossil/lib/trouble.tcl
@@ -58,11 +58,18 @@
58 if {
59 ![llength $myinfo] &&
60 ![llength $mywarn] &&
61 ![llength $myfatal]
62 } return
63
64 # Frame the pending messages to make them more clear as the
65 # cause of the abort.
66
67 set myinfo [linsert $myinfo 0 "" "Encountered problems." ""]
68 lappend myfatal "Stopped due to problems."
69
70 # We have error messages to print, so stop now.
71 exit 1
72 }
73
74 # # ## ### ##### ######## #############
75 ## Internal, state
76

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button