Overview
SHA1 Hash: | 3e76f2a5f067edd1a188a7c804cbc35cca9728bd |
---|---|
Date: | 2008-02-03 01:33:45 |
User: | aku |
Comment: | Removed the now obsolete textrange information from the revision table and updated the file revision code to not store its textrange any longer. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified tools/cvs2fossil/lib/c2f_file.tcl from [9ff9d6eaa4] to [8f9fa8b308].
@@ -224,10 +224,12 @@ # 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 @@ -299,12 +301,16 @@ 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... + # 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 @@ -318,10 +324,12 @@ # 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>
Modified tools/cvs2fossil/lib/c2f_frev.tcl from [5f2783ed91] to [fa500c1612].
@@ -352,21 +352,20 @@ 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); + 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]
Modified tools/cvs2fossil/lib/c2f_pcollrev.tcl from [e6ab3e8b4a] to [264f332a9e].
@@ -131,19 +131,16 @@ -- 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. + -- epoch, for easy comparison. 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