Overview
SHA1 Hash: | 83d75a6c230ec25df3ea87fcc92514aea8517c82 |
---|---|
Date: | 2008-02-03 00:45:57 |
User: | aku |
Comment: | 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. |
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 [64c0d8ace6] to [9ff9d6eaa4].
@@ -306,47 +306,48 @@ 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} [state run { - SELECT R.rid, R.rev, R.parent, R.child, R.coff, R.clen - FROM revision R - WHERE R.fid = $myid + 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 + FROM blob B + LEFT OUTER JOIN revision R + ON B.rid = R.rid + WHERE B.fid = $myid }] { - lappend revmap r$revnr $rid - - $zp node insert $rid - $zp node set $rid revnr $revnr - $zp node set $rid label <$revnr> - - if {$child ne ""} { - lappend zarcs $child $rid - } - - $ex node insert $rid - $ex node set $rid text [list $coff $clen] - $ex node set $rid revnr $revnr - $ex node set $rid label <$revnr> - - if {[rev istrunkrevnr $revnr]} { - # On the trunk, this revision is a delta based on the - # child. That makes the child our predecessor. - - if {$child eq ""} continue - lappend earcs $child $rid + # 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 ""} { + lappend zarcs $child $rid + } } else { - # On a branch this revision is a delta based on the - # parent. That makes the parent our predecessor. - - if {$parent eq ""} { - # Detached branch root, this is a patch based on - # the empty string. - $ex node set $rid __base__ r__empty__ - continue - } - lappend earcs $parent $rid + # We fake a revnr for the blobs which have no + # revision, for use in the expansion graph. + set revnr ghost$cid + } + + # Now the expansion graph. + + $ex node insert $cid + $ex node set $cid text [list $coff $clen] + $ex node set $cid revnr $revnr + $ex node set $cid label <$revnr> + + if {$cparent ne ""} { + # The expansion arcs go from baseline to delta + # descendant, based on the blob information. + lappend earcs $cparent $cid } } # Phase II: Insert the accumulated dependencies
Modified tools/cvs2fossil/lib/c2f_pfiltersym.tcl from [a9820cd0e4] to [3f927ba110].
@@ -214,10 +214,11 @@ DELETE FROM branch WHERE lod IN excludedsymbols; DELETE FROM branch WHERE sid IN excludedsymbols; DELETE FROM revisionbranchchildren WHERE rid IN excludedrevisions; DELETE FROM revisionbranchchildren WHERE brid IN excludedrevisions; + DELETE FROM blob WHERE rid IN excludedrevisions; DROP TABLE excludedrevisions; DROP TABLE excludedsymbols; } return