Fossil SCM

Extended the collection of revisions for a file with a separate blob store to manage the text ranges of revisions and their dependencies separate from the revisions. This will be used later (upcoming) to properly expand a file even if revisions were removed as irrelevant during the collection and filter passes.

aku 2008-02-03 00:04 trunk
Commit aa04ac9d10aab85fa43e75be859ae52c839c7ed9
--- a/tools/cvs2fossil/lib/c2f_blobstore.tcl
+++ b/tools/cvs2fossil/lib/c2f_blobstore.tcl
@@ -0,0 +1,154 @@
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
+## Blob storage. Each instance stores the blob data of a single rcs
14
+## archive file, i.e. which file, all text ranges, delta dependencies,
15
+## and associated revisions (as object references). The data is
16
+## persistent and used by the import pass(es) to expand the revisions
17
+## of a file.
18
+
19
+# # ## ### ##### ######## ############# #####################
20
+## Requirements
21
+
22
+package require Tcl 8.4 ; # Required runtime.
23
+package require snit ; # OO system.
24
+package require vc::fossil::import::cvs::state ; # State storage.
25
+package require vc::fossil::import::cvs::integrity ; # State integrity checks.
26
+package require vc::tools::trouble ; # Error reporting.
27
+package require vc::tools::log ; # User feedback
28
+#package require vc::tools::misc ; # Text formatting
29
+
30
+# # ## ### ##### ######## ############# #####################
31
+##
32
+
33
+snit::type ::vc::fossil::import::cvs::blobstore {
34
+ # # ## ### ##### ######## #############
35
+ ## Public API
36
+
37
+ constructor {fid} {
38
+ set myfile $fid
39
+ array set myparent {}
40
+ array set myblob {}
41
+ return
42
+ }
43
+
44
+ method setid {id} {
45
+ integrity assert {$myfile eq ""} {Already has an id, '$myfile'}
46
+ set myfile $id
47
+ return
48
+ }
49
+
50
+ # Remember the file revision object for the revision REVNR.
51
+
52
+ method add {revnr rev} {
53
+ set myblob($revnr) $rev
54
+ return
55
+ }
56
+
57
+ # Remember that the DELTA revision is specified as a delta against
58
+ # the BASE revision. Both are specified as revision numbers.
59
+
60
+ method delta {delta base} {
61
+ set myparent($delta) $base
62
+ return
63
+ }
64
+
65
+ # Specify the text range in the archive file for the data of the
66
+ # revision identified by REVNR.
67
+
68
+ method extend {revnr textrange} {
69
+ struct::list assign $textrange coff end
70
+ set clen [expr {$end - $coff}]
71
+ lappend myblob($revnr) $coff $clen
72
+ return
73
+ }
74
+
75
+ # Write the stored information into the persistent state.
76
+
77
+ method persist {} {
78
+ array set bids {}
79
+ state transaction {
80
+ # Phase I: Store the basic blob information.
81
+
82
+ foreach revnr [lsort [array names myblob]] {
83
+ struct::list assign $myblob($revnr) rev coff clen
84
+ state run {
85
+ INSERT INTO blob (bid, rid, fid, coff, clen, pid)
86
+ VALUES (NULL, NULL, $myfile, $coff, $clen, NULL)
87
+ }
88
+ set current [state id]
89
+ set bids($revnr) $current
90
+
91
+ # Ia. Set the reference to the revision of the blob,
92
+ # if applicable. We can have blobs without revisions,
93
+ # their revisions were removed as irrelevant. We need
94
+ # them however for the proper delta ordering and patch
95
+ # application when expanding a file (-> Import passes).
96
+
97
+ set rid [$rev id]
98
+ if {$rid eq ""} continue
99
+ state run {
100
+ UPDATE blob
101
+ SET rid = $rid
102
+ WHERE bid = $current
103
+ }
104
+ }
105
+
106
+ # Phase II: Set the parent links for deltas.
107
+ foreach revnr [array names myparent] {
108
+ set bid $bids($revnr)
109
+ set pid $bids($myparent($revnr))
110
+
111
+ state run {
112
+ UPDATE blob
113
+ SET pid = $pid
114
+ WHERE bid = $bid
115
+ }
116
+ }
117
+ }
118
+ return
119
+ }
120
+
121
+ # # ## ### ##### ######## #############
122
+ ## State
123
+
124
+ variable myfile {} ; # Id of the file the blobs belong to.
125
+ variable myparent -array {} ; # Map delta-encoded revision numbers
126
+ # to their baseline revisions.
127
+ variable myblob -array {} ; # Map revision numbers to associated
128
+ # file revision object and text
129
+ # range.
130
+
131
+ # # ## ### ##### ######## #############
132
+ ## Configuration
133
+
134
+ pragma -hastypeinfo no ; # no type introspection
135
+ pragma -hasinfo no ; # no object introspection
136
+ pragma -hastypemethods no ; # type is not relevant.
137
+
138
+ # # ## ### ##### ######## #############
139
+}
140
+
141
+namespace eval ::vc::fossil::import::cvs {
142
+ namespace export blobstore
143
+ namespace eval blobstore {
144
+ namespace import ::vc::tools::trouble
145
+ namespace import ::vc::tools::log
146
+ namespace import ::vc::fossil::import::cvs::state
147
+ namespace import ::vc::fossil::import::cvs::integrity
148
+ }
149
+}
150
+
151
+# # ## ### ##### ######## ############# #####################
152
+## Ready
153
+
154
+package provide vc::fossil::import:
--- a/tools/cvs2fossil/lib/c2f_blobstore.tcl
+++ b/tools/cvs2fossil/lib/c2f_blobstore.tcl
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/tools/cvs2fossil/lib/c2f_blobstore.tcl
+++ b/tools/cvs2fossil/lib/c2f_blobstore.tcl
@@ -0,0 +1,154 @@
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 ## Blob storage. Each instance stores the blob data of a single rcs
14 ## archive file, i.e. which file, all text ranges, delta dependencies,
15 ## and associated revisions (as object references). The data is
16 ## persistent and used by the import pass(es) to expand the revisions
17 ## of a file.
18
19 # # ## ### ##### ######## ############# #####################
20 ## Requirements
21
22 package require Tcl 8.4 ; # Required runtime.
23 package require snit ; # OO system.
24 package require vc::fossil::import::cvs::state ; # State storage.
25 package require vc::fossil::import::cvs::integrity ; # State integrity checks.
26 package require vc::tools::trouble ; # Error reporting.
27 package require vc::tools::log ; # User feedback
28 #package require vc::tools::misc ; # Text formatting
29
30 # # ## ### ##### ######## ############# #####################
31 ##
32
33 snit::type ::vc::fossil::import::cvs::blobstore {
34 # # ## ### ##### ######## #############
35 ## Public API
36
37 constructor {fid} {
38 set myfile $fid
39 array set myparent {}
40 array set myblob {}
41 return
42 }
43
44 method setid {id} {
45 integrity assert {$myfile eq ""} {Already has an id, '$myfile'}
46 set myfile $id
47 return
48 }
49
50 # Remember the file revision object for the revision REVNR.
51
52 method add {revnr rev} {
53 set myblob($revnr) $rev
54 return
55 }
56
57 # Remember that the DELTA revision is specified as a delta against
58 # the BASE revision. Both are specified as revision numbers.
59
60 method delta {delta base} {
61 set myparent($delta) $base
62 return
63 }
64
65 # Specify the text range in the archive file for the data of the
66 # revision identified by REVNR.
67
68 method extend {revnr textrange} {
69 struct::list assign $textrange coff end
70 set clen [expr {$end - $coff}]
71 lappend myblob($revnr) $coff $clen
72 return
73 }
74
75 # Write the stored information into the persistent state.
76
77 method persist {} {
78 array set bids {}
79 state transaction {
80 # Phase I: Store the basic blob information.
81
82 foreach revnr [lsort [array names myblob]] {
83 struct::list assign $myblob($revnr) rev coff clen
84 state run {
85 INSERT INTO blob (bid, rid, fid, coff, clen, pid)
86 VALUES (NULL, NULL, $myfile, $coff, $clen, NULL)
87 }
88 set current [state id]
89 set bids($revnr) $current
90
91 # Ia. Set the reference to the revision of the blob,
92 # if applicable. We can have blobs without revisions,
93 # their revisions were removed as irrelevant. We need
94 # them however for the proper delta ordering and patch
95 # application when expanding a file (-> Import passes).
96
97 set rid [$rev id]
98 if {$rid eq ""} continue
99 state run {
100 UPDATE blob
101 SET rid = $rid
102 WHERE bid = $current
103 }
104 }
105
106 # Phase II: Set the parent links for deltas.
107 foreach revnr [array names myparent] {
108 set bid $bids($revnr)
109 set pid $bids($myparent($revnr))
110
111 state run {
112 UPDATE blob
113 SET pid = $pid
114 WHERE bid = $bid
115 }
116 }
117 }
118 return
119 }
120
121 # # ## ### ##### ######## #############
122 ## State
123
124 variable myfile {} ; # Id of the file the blobs belong to.
125 variable myparent -array {} ; # Map delta-encoded revision numbers
126 # to their baseline revisions.
127 variable myblob -array {} ; # Map revision numbers to associated
128 # file revision object and text
129 # range.
130
131 # # ## ### ##### ######## #############
132 ## Configuration
133
134 pragma -hastypeinfo no ; # no type introspection
135 pragma -hasinfo no ; # no object introspection
136 pragma -hastypemethods no ; # type is not relevant.
137
138 # # ## ### ##### ######## #############
139 }
140
141 namespace eval ::vc::fossil::import::cvs {
142 namespace export blobstore
143 namespace eval blobstore {
144 namespace import ::vc::tools::trouble
145 namespace import ::vc::tools::log
146 namespace import ::vc::fossil::import::cvs::state
147 namespace import ::vc::fossil::import::cvs::integrity
148 }
149 }
150
151 # # ## ### ##### ######## ############# #####################
152 ## Ready
153
154 package provide vc::fossil::import:
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -18,10 +18,11 @@
1818
1919
package require Tcl 8.4 ; # Required runtime.
2020
package require snit ; # OO system.
2121
package require struct::set ; # Set operations.
2222
package require struct::list ; # Higher order operations.
23
+package require vc::fossil::import::cvs::blobstore ; # Blob storage.
2324
package require vc::fossil::import::cvs::file::rev ; # CVS per file revisions.
2425
package require vc::fossil::import::cvs::file::sym ; # CVS per file symbols.
2526
package require vc::fossil::import::cvs::state ; # State storage.
2627
package require vc::fossil::import::cvs::integrity ; # State integrity checks.
2728
package require vc::fossil::import::cvs::gtcore ; # Graph traversal core.
@@ -41,16 +42,18 @@
4142
set mypath $path
4243
set myusrpath $usrpath
4344
set myexecutable $executable
4445
set myproject $project
4546
set mytrunk [$myproject trunk]
47
+ set myblob [blobstore ${selfns}::%AUTO% $id]
4648
return
4749
}
4850
4951
method setid {id} {
5052
integrity assert {$myid eq ""} {File '$mypath' already has an id, '$myid'}
5153
set myid $id
54
+ $myblob setid $id
5255
return
5356
}
5457
5558
method id {} { return $myid }
5659
method path {} { return $mypath }
@@ -94,10 +97,11 @@
9497
foreach sym $symbols { $sym defid }
9598
9699
state transaction {
97100
foreach rev $revisions { $rev persist }
98101
foreach sym $symbols { $sym persist }
102
+ $myblob persist
99103
}
100104
return
101105
}
102106
103107
method drop {} {
@@ -156,10 +160,21 @@
156160
return
157161
}
158162
159163
set myaid($revnr) [$myproject defauthor $author]
160164
set myrev($revnr) [rev %AUTO% $revnr $date $state $self]
165
+
166
+ $myblob add $revnr $myrev($revnr)
167
+
168
+ if {$next ne ""} {
169
+ # parent revision NEXT is a delta of current.
170
+ $myblob delta $next $revnr
171
+ }
172
+ foreach b $branches {
173
+ # branch child revision B is a delta of current.
174
+ $myblob delta $b $revnr
175
+ }
161176
162177
$self RecordBasicDependencies $revnr $next
163178
return
164179
}
165180
@@ -211,10 +226,12 @@
211226
set lod [$self GetLOD $revnr]
212227
213228
$rev setmeta [$myproject defmeta [$lod id] $myaid($revnr) $cmid]
214229
$rev settext $textrange
215230
$rev setlod $lod
231
+
232
+ $myblob extend $revnr $textrange
216233
217234
# If this is revision 1.1, we have to determine whether the
218235
# file seems to have been created through 'cvs add' instead of
219236
# 'cvs import'. This can be done by looking at the un-
220237
# adulterated commit message, as CVS uses a hardwired magic
@@ -575,10 +592,14 @@
575592
variable mytrunk {} ; # Direct reference to myproject -> trunk.
576593
variable myroots {} ; # List of roots in the forest of
577594
# lod's. Object references to revisions and
578595
# branches. The latter can appear when they
579596
# are severed from their parent.
597
+
598
+ variable myblob {} ; # Reference to the object managing the blob
599
+ # information (textrange of revisions, and
600
+ # delta dependencies) of this file.
580601
581602
# # ## ### ##### ######## #############
582603
## Internal methods
583604
584605
method RecordBranchCommits {branches} {
@@ -1389,10 +1410,11 @@
13891410
# namespace import ::vc::fossil::import::cvs::file::rev
13901411
# namespace import ::vc::fossil::import::cvs::file::sym
13911412
namespace import ::vc::tools::misc::*
13921413
namespace import ::vc::tools::trouble
13931414
namespace import ::vc::tools::log
1415
+ namespace import ::vc::fossil::import::cvs::blobstore
13941416
namespace import ::vc::fossil::import::cvs::state
13951417
namespace import ::vc::fossil::import::cvs::integrity
13961418
namespace import ::vc::fossil::import::cvs::gtcore
13971419
}
13981420
}
13991421
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -18,10 +18,11 @@
18
19 package require Tcl 8.4 ; # Required runtime.
20 package require snit ; # OO system.
21 package require struct::set ; # Set operations.
22 package require struct::list ; # Higher order operations.
 
23 package require vc::fossil::import::cvs::file::rev ; # CVS per file revisions.
24 package require vc::fossil::import::cvs::file::sym ; # CVS per file symbols.
25 package require vc::fossil::import::cvs::state ; # State storage.
26 package require vc::fossil::import::cvs::integrity ; # State integrity checks.
27 package require vc::fossil::import::cvs::gtcore ; # Graph traversal core.
@@ -41,16 +42,18 @@
41 set mypath $path
42 set myusrpath $usrpath
43 set myexecutable $executable
44 set myproject $project
45 set mytrunk [$myproject trunk]
 
46 return
47 }
48
49 method setid {id} {
50 integrity assert {$myid eq ""} {File '$mypath' already has an id, '$myid'}
51 set myid $id
 
52 return
53 }
54
55 method id {} { return $myid }
56 method path {} { return $mypath }
@@ -94,10 +97,11 @@
94 foreach sym $symbols { $sym defid }
95
96 state transaction {
97 foreach rev $revisions { $rev persist }
98 foreach sym $symbols { $sym persist }
 
99 }
100 return
101 }
102
103 method drop {} {
@@ -156,10 +160,21 @@
156 return
157 }
158
159 set myaid($revnr) [$myproject defauthor $author]
160 set myrev($revnr) [rev %AUTO% $revnr $date $state $self]
 
 
 
 
 
 
 
 
 
 
 
161
162 $self RecordBasicDependencies $revnr $next
163 return
164 }
165
@@ -211,10 +226,12 @@
211 set lod [$self GetLOD $revnr]
212
213 $rev setmeta [$myproject defmeta [$lod id] $myaid($revnr) $cmid]
214 $rev settext $textrange
215 $rev setlod $lod
 
 
216
217 # If this is revision 1.1, we have to determine whether the
218 # file seems to have been created through 'cvs add' instead of
219 # 'cvs import'. This can be done by looking at the un-
220 # adulterated commit message, as CVS uses a hardwired magic
@@ -575,10 +592,14 @@
575 variable mytrunk {} ; # Direct reference to myproject -> trunk.
576 variable myroots {} ; # List of roots in the forest of
577 # lod's. Object references to revisions and
578 # branches. The latter can appear when they
579 # are severed from their parent.
 
 
 
 
580
581 # # ## ### ##### ######## #############
582 ## Internal methods
583
584 method RecordBranchCommits {branches} {
@@ -1389,10 +1410,11 @@
1389 # namespace import ::vc::fossil::import::cvs::file::rev
1390 # namespace import ::vc::fossil::import::cvs::file::sym
1391 namespace import ::vc::tools::misc::*
1392 namespace import ::vc::tools::trouble
1393 namespace import ::vc::tools::log
 
1394 namespace import ::vc::fossil::import::cvs::state
1395 namespace import ::vc::fossil::import::cvs::integrity
1396 namespace import ::vc::fossil::import::cvs::gtcore
1397 }
1398 }
1399
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -18,10 +18,11 @@
18
19 package require Tcl 8.4 ; # Required runtime.
20 package require snit ; # OO system.
21 package require struct::set ; # Set operations.
22 package require struct::list ; # Higher order operations.
23 package require vc::fossil::import::cvs::blobstore ; # Blob storage.
24 package require vc::fossil::import::cvs::file::rev ; # CVS per file revisions.
25 package require vc::fossil::import::cvs::file::sym ; # CVS per file symbols.
26 package require vc::fossil::import::cvs::state ; # State storage.
27 package require vc::fossil::import::cvs::integrity ; # State integrity checks.
28 package require vc::fossil::import::cvs::gtcore ; # Graph traversal core.
@@ -41,16 +42,18 @@
42 set mypath $path
43 set myusrpath $usrpath
44 set myexecutable $executable
45 set myproject $project
46 set mytrunk [$myproject trunk]
47 set myblob [blobstore ${selfns}::%AUTO% $id]
48 return
49 }
50
51 method setid {id} {
52 integrity assert {$myid eq ""} {File '$mypath' already has an id, '$myid'}
53 set myid $id
54 $myblob setid $id
55 return
56 }
57
58 method id {} { return $myid }
59 method path {} { return $mypath }
@@ -94,10 +97,11 @@
97 foreach sym $symbols { $sym defid }
98
99 state transaction {
100 foreach rev $revisions { $rev persist }
101 foreach sym $symbols { $sym persist }
102 $myblob persist
103 }
104 return
105 }
106
107 method drop {} {
@@ -156,10 +160,21 @@
160 return
161 }
162
163 set myaid($revnr) [$myproject defauthor $author]
164 set myrev($revnr) [rev %AUTO% $revnr $date $state $self]
165
166 $myblob add $revnr $myrev($revnr)
167
168 if {$next ne ""} {
169 # parent revision NEXT is a delta of current.
170 $myblob delta $next $revnr
171 }
172 foreach b $branches {
173 # branch child revision B is a delta of current.
174 $myblob delta $b $revnr
175 }
176
177 $self RecordBasicDependencies $revnr $next
178 return
179 }
180
@@ -211,10 +226,12 @@
226 set lod [$self GetLOD $revnr]
227
228 $rev setmeta [$myproject defmeta [$lod id] $myaid($revnr) $cmid]
229 $rev settext $textrange
230 $rev setlod $lod
231
232 $myblob extend $revnr $textrange
233
234 # If this is revision 1.1, we have to determine whether the
235 # file seems to have been created through 'cvs add' instead of
236 # 'cvs import'. This can be done by looking at the un-
237 # adulterated commit message, as CVS uses a hardwired magic
@@ -575,10 +592,14 @@
592 variable mytrunk {} ; # Direct reference to myproject -> trunk.
593 variable myroots {} ; # List of roots in the forest of
594 # lod's. Object references to revisions and
595 # branches. The latter can appear when they
596 # are severed from their parent.
597
598 variable myblob {} ; # Reference to the object managing the blob
599 # information (textrange of revisions, and
600 # delta dependencies) of this file.
601
602 # # ## ### ##### ######## #############
603 ## Internal methods
604
605 method RecordBranchCommits {branches} {
@@ -1389,10 +1410,11 @@
1410 # namespace import ::vc::fossil::import::cvs::file::rev
1411 # namespace import ::vc::fossil::import::cvs::file::sym
1412 namespace import ::vc::tools::misc::*
1413 namespace import ::vc::tools::trouble
1414 namespace import ::vc::tools::log
1415 namespace import ::vc::fossil::import::cvs::blobstore
1416 namespace import ::vc::fossil::import::cvs::state
1417 namespace import ::vc::fossil::import::cvs::integrity
1418 namespace import ::vc::fossil::import::cvs::gtcore
1419 }
1420 }
1421
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -143,10 +143,36 @@
143143
coff INTEGER NOT NULL,
144144
clen INTEGER NOT NULL,
145145
146146
UNIQUE (fid, rev) -- The DTN is unique within the revision's file.
147147
}
148
+
149
+ # Blobs contain the information needed to extract revisions
150
+ # from rcs archive files. As such each revision has an
151
+ # associated blob. However we can have blobs without
152
+ # revisions. This happens if a logically irrelevant revision
153
+ # is removed. We may however still need its blob to correctly
154
+ # expand other revisions, both its contents and for the
155
+ # ordering.
156
+
157
+ state extend blob {
158
+ bid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
159
+ rid INTEGER REFERENCES revision,
160
+ fid INTEGER NOT NULL REFERENCES file, -- File owning blob.
161
+
162
+ -- The text content is an (offset,length) pair into the
163
+ -- rcs archive. For deltas we additionally refer to the
164
+ -- parent blob the delta is made against.
165
+
166
+ coff INTEGER NOT NULL,
167
+ clen INTEGER NOT NULL,
168
+ pid INTEGER REFERENCES blob,
169
+
170
+ UNIQUE (rid)
171
+ } { fid }
172
+ # Index on owning file to collect all blobs of a file when the
173
+ # time for its expansion comes.
148174
149175
state extend optype {
150176
oid INTEGER NOT NULL PRIMARY KEY,
151177
name TEXT NOT NULL,
152178
UNIQUE(name)
153179
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -143,10 +143,36 @@
143 coff INTEGER NOT NULL,
144 clen INTEGER NOT NULL,
145
146 UNIQUE (fid, rev) -- The DTN is unique within the revision's file.
147 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
149 state extend optype {
150 oid INTEGER NOT NULL PRIMARY KEY,
151 name TEXT NOT NULL,
152 UNIQUE(name)
153
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -143,10 +143,36 @@
143 coff INTEGER NOT NULL,
144 clen INTEGER NOT NULL,
145
146 UNIQUE (fid, rev) -- The DTN is unique within the revision's file.
147 }
148
149 # Blobs contain the information needed to extract revisions
150 # from rcs archive files. As such each revision has an
151 # associated blob. However we can have blobs without
152 # revisions. This happens if a logically irrelevant revision
153 # is removed. We may however still need its blob to correctly
154 # expand other revisions, both its contents and for the
155 # ordering.
156
157 state extend blob {
158 bid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
159 rid INTEGER REFERENCES revision,
160 fid INTEGER NOT NULL REFERENCES file, -- File owning blob.
161
162 -- The text content is an (offset,length) pair into the
163 -- rcs archive. For deltas we additionally refer to the
164 -- parent blob the delta is made against.
165
166 coff INTEGER NOT NULL,
167 clen INTEGER NOT NULL,
168 pid INTEGER REFERENCES blob,
169
170 UNIQUE (rid)
171 } { fid }
172 # Index on owning file to collect all blobs of a file when the
173 # time for its expansion comes.
174
175 state extend optype {
176 oid INTEGER NOT NULL PRIMARY KEY,
177 name TEXT NOT NULL,
178 UNIQUE(name)
179
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -2,10 +2,11 @@
22
## Package management.
33
## Index of the local packages required by cvs2fossil
44
# # ## ### ##### ######## ############# #####################
55
if {![package vsatisfies [package require Tcl] 8.4]} return
66
package ifneeded vc::fossil::import::cvs 1.0 [list source [file join $dir cvs2fossil.tcl]]
7
+package ifneeded vc::fossil::import::cvs::blobstore 1.0 [list source [file join $dir c2f_blobstore.tcl]]
78
package ifneeded vc::fossil::import::cvs::file 1.0 [list source [file join $dir c2f_file.tcl]]
89
package ifneeded vc::fossil::import::cvs::file::rev 1.0 [list source [file join $dir c2f_frev.tcl]]
910
package ifneeded vc::fossil::import::cvs::file::sym 1.0 [list source [file join $dir c2f_fsym.tcl]]
1011
package ifneeded vc::fossil::import::cvs::file::trunk 1.0 [list source [file join $dir c2f_ftrunk.tcl]]
1112
package ifneeded vc::fossil::import::cvs::fossil 1.0 [list source [file join $dir c2f_fossil.tcl]]
1213
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -2,10 +2,11 @@
2 ## Package management.
3 ## Index of the local packages required by cvs2fossil
4 # # ## ### ##### ######## ############# #####################
5 if {![package vsatisfies [package require Tcl] 8.4]} return
6 package ifneeded vc::fossil::import::cvs 1.0 [list source [file join $dir cvs2fossil.tcl]]
 
7 package ifneeded vc::fossil::import::cvs::file 1.0 [list source [file join $dir c2f_file.tcl]]
8 package ifneeded vc::fossil::import::cvs::file::rev 1.0 [list source [file join $dir c2f_frev.tcl]]
9 package ifneeded vc::fossil::import::cvs::file::sym 1.0 [list source [file join $dir c2f_fsym.tcl]]
10 package ifneeded vc::fossil::import::cvs::file::trunk 1.0 [list source [file join $dir c2f_ftrunk.tcl]]
11 package ifneeded vc::fossil::import::cvs::fossil 1.0 [list source [file join $dir c2f_fossil.tcl]]
12
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -2,10 +2,11 @@
2 ## Package management.
3 ## Index of the local packages required by cvs2fossil
4 # # ## ### ##### ######## ############# #####################
5 if {![package vsatisfies [package require Tcl] 8.4]} return
6 package ifneeded vc::fossil::import::cvs 1.0 [list source [file join $dir cvs2fossil.tcl]]
7 package ifneeded vc::fossil::import::cvs::blobstore 1.0 [list source [file join $dir c2f_blobstore.tcl]]
8 package ifneeded vc::fossil::import::cvs::file 1.0 [list source [file join $dir c2f_file.tcl]]
9 package ifneeded vc::fossil::import::cvs::file::rev 1.0 [list source [file join $dir c2f_frev.tcl]]
10 package ifneeded vc::fossil::import::cvs::file::sym 1.0 [list source [file join $dir c2f_fsym.tcl]]
11 package ifneeded vc::fossil::import::cvs::file::trunk 1.0 [list source [file join $dir c2f_ftrunk.tcl]]
12 package ifneeded vc::fossil::import::cvs::fossil 1.0 [list source [file join $dir c2f_fossil.tcl]]
13

Keyboard Shortcuts

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