Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Removed the now obsolete textrange information from the revision table and updated the file revision code to not store its textrange any longer. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 3e76f2a5f067edd1a188a7c804cbc35c |
User & Date: | aku 2008-02-03 01:33:45 |
Context
2008-02-03
| ||
01:36 | Merged importer to mainline. check-in: 05239834 user: aku tags: trunk | |
01:33 | Removed the now obsolete textrange information from the revision table and updated the file revision code to not store its textrange any longer. check-in: 3e76f2a5 user: aku tags: trunk | |
00:45 | Modified filtering pass to drop the blobs of excluded revisions, for them we can be sure that we will not need them later, as whole branches are dropped. Modified the file import to use the new blob information to setup the expansion graph. This fixes the trouble we had with archive files in bwidget. They are now properly expanded. check-in: 83d75a6c user: aku tags: trunk | |
Changes
Changes to tools/cvs2fossil/lib/c2f_file.tcl.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 ... 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 ... 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# that any cross-project and cross-branch commits are # separated into multiple commits, one in each of the projects # and/or branches). set lod [$self GetLOD $revnr] $rev setmeta [$myproject defmeta [$lod id] $myaid($revnr) $cmid] $rev settext $textrange $rev setlod $lod $myblob extend $revnr $textrange # If this is revision 1.1, we have to determine whether the # file seems to have been created through 'cvs add' instead of ................................................................................ method Expand {dir} { set ex [struct::graph ex] ; # Expansion graph. set zp [struct::graph zp] ; # Zip/Import graph. close [open $dir/r__empty__ w];# Base for detached roots on branches. # Phase I: Pull the revisions from memory and fill the graphs # with them... set earcs {} ; # Arcs for expansion graph set zarcs {} ; # Arcs for zip graph set revmap {} ; # path -> rid map to later merge uuid information foreach {rid revnr parent child coff clen cid cparent} [state run { SELECT B.rid, R.rev, R.parent, R.child, B.coff, B.clen, B.bid, B.pid ................................................................................ WHERE B.fid = $myid }] { # Main data are blobs, most will have revisions, but not # all. The expansion graph is blob based, whereas the # recompression graph is revision based. if {$revnr ne ""} { lappend revmap r$revnr $rid $zp node insert $rid $zp node set $rid revnr $revnr $zp node set $rid label <$revnr> if {$child ne ""} { |
> > | | > > > > > > |
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 ... 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 ... 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# that any cross-project and cross-branch commits are # separated into multiple commits, one in each of the projects # and/or branches). set lod [$self GetLOD $revnr] $rev setmeta [$myproject defmeta [$lod id] $myaid($revnr) $cmid] # Note: We keep settext on file::rev for the hastext queries # used by several checks. $rev settext $textrange $rev setlod $lod $myblob extend $revnr $textrange # If this is revision 1.1, we have to determine whether the # file seems to have been created through 'cvs add' instead of ................................................................................ method Expand {dir} { set ex [struct::graph ex] ; # Expansion graph. set zp [struct::graph zp] ; # Zip/Import graph. close [open $dir/r__empty__ w];# Base for detached roots on branches. # Phase I: Pull blobs and referenced revisions from the state # and fill the graphs with them... # Note: We use the blobs for expansion because we need them # all, even those without revision, for both proper # ordering and exact patch application. set earcs {} ; # Arcs for expansion graph set zarcs {} ; # Arcs for zip graph set revmap {} ; # path -> rid map to later merge uuid information foreach {rid revnr parent child coff clen cid cparent} [state run { SELECT B.rid, R.rev, R.parent, R.child, B.coff, B.clen, B.bid, B.pid ................................................................................ WHERE B.fid = $myid }] { # Main data are blobs, most will have revisions, but not # all. The expansion graph is blob based, whereas the # recompression graph is revision based. if {$revnr ne ""} { # Blob has revision, extend recompression graph. lappend revmap r$revnr $rid $zp node insert $rid $zp node set $rid revnr $revnr $zp node set $rid label <$revnr> if {$child ne ""} { |
Changes to tools/cvs2fossil/lib/c2f_frev.tcl.
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# # ## ### ##### ######## ############# method persist {} { set fid [$myfile id] set lod [$mylod id] set op $myopcode($myoperation) set idb $myisondefaultbranch set clen [expr {$mytextend - $mytextstart}] lappend map @P@ [expr { ($myparent eq "") ? "NULL" : [$myparent id] }] lappend map @C@ [expr { ($mychild eq "") ? "NULL" : [$mychild id] }] lappend map @DP [expr { ($mydbparent eq "") ? "NULL" : [$mydbparent id] }] lappend map @DC [expr { ($mydbchild eq "") ? "NULL" : [$mydbchild id] }] lappend map @BP [expr { ($myparentbranch eq "") ? "NULL" : [$myparentbranch id] }] set cmd { INSERT INTO revision ( rid, fid, rev, lod, parent, child, isdefault, dbparent, dbchild, bparent, op, date, state, mid, coff, clen) VALUES ($myid, $fid, $myrevnr, $lod, @P@, @C@, $idb, @DP, @DC, @BP , $op, $mydate, $mystate, $mymetaid, $mytextstart, $clen); } state transaction { state run [string map $map $cmd] # And the branch children as well, for pass 5. foreach bc $mybranchchildren { |
< | | |
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# # ## ### ##### ######## ############# method persist {} { set fid [$myfile id] set lod [$mylod id] set op $myopcode($myoperation) set idb $myisondefaultbranch lappend map @P@ [expr { ($myparent eq "") ? "NULL" : [$myparent id] }] lappend map @C@ [expr { ($mychild eq "") ? "NULL" : [$mychild id] }] lappend map @DP [expr { ($mydbparent eq "") ? "NULL" : [$mydbparent id] }] lappend map @DC [expr { ($mydbchild eq "") ? "NULL" : [$mydbchild id] }] lappend map @BP [expr { ($myparentbranch eq "") ? "NULL" : [$myparentbranch id] }] set cmd { INSERT INTO revision ( rid, fid, rev, lod, parent, child, isdefault, dbparent, dbchild, bparent, op, date, state, mid) VALUES ($myid, $fid, $myrevnr, $lod, @P@, @C@, $idb, @DP, @DC, @BP , $op, $mydate, $mystate, $mymetaid); } state transaction { state run [string map $map $cmd] # And the branch children as well, for pass 5. foreach bc $mybranchchildren { |
Changes to tools/cvs2fossil/lib/c2f_pcollrev.tcl.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
dbchild INTEGER REFERENCES revision, -- The main payload of the revision are the date/time it -- was entered, its state, operation (= type/class), text -- content, and meta data (author, log message, branch, -- project). The last is encoded as single id, see table -- 'meta'. The date/time is given in seconds since the -- epoch, for easy comparison. The text content is an -- (offset,length) pair into the rcs archive. op INTEGER NOT NULL REFERENCES optype, date INTEGER NOT NULL, state TEXT NOT NULL, mid INTEGER NOT NULL REFERENCES meta, coff INTEGER NOT NULL, clen INTEGER NOT NULL, UNIQUE (fid, rev) -- The DTN is unique within the revision's file. } # Blobs contain the information needed to extract revisions # from rcs archive files. As such each revision has an # associated blob. However we can have blobs without |
| < < < |
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
dbchild INTEGER REFERENCES revision, -- The main payload of the revision are the date/time it -- was entered, its state, operation (= type/class), text -- content, and meta data (author, log message, branch, -- project). The last is encoded as single id, see table -- 'meta'. The date/time is given in seconds since the -- epoch, for easy comparison. op INTEGER NOT NULL REFERENCES optype, date INTEGER NOT NULL, state TEXT NOT NULL, mid INTEGER NOT NULL REFERENCES meta, UNIQUE (fid, rev) -- The DTN is unique within the revision's file. } # Blobs contain the information needed to extract revisions # from rcs archive files. As such each revision has an # associated blob. However we can have blobs without |