Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_pcollrev.tcl part of check-in [7208c7ac4d] - Changes to cvs2fossil to import tcllib CVS into fossil on Win32

* using ::file instead of file in snit methods to get the core file command * taking care of files that only differ in case in the Attic and the repo on case insensitive FS * passing platform specific

by mjanssen on 2008-01-28 23:57:27. [view]

To:

File tools/cvs2fossil/lib/c2f_pcollrev.tcl part of check-in [aa04ac9d10] - 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. by aku on 2008-02-03 00:04:37. [view]

@@ -144,8 +144,34 @@
 	    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
+	# revisions. This happens if a logically irrelevant revision
+	# is removed. We may however still need its blob to correctly
+	# expand other revisions, both its contents and for the
+	# ordering.
+
+	state extend blob {
+	    bid  INTEGER  NOT NULL  PRIMARY KEY AUTOINCREMENT,
+	    rid  INTEGER            REFERENCES revision,
+	    fid  INTEGER  NOT NULL  REFERENCES file,   -- File owning blob.
+
+	    -- The text content is an (offset,length) pair into the
+	    -- rcs archive. For deltas we additionally refer to the
+	    -- parent blob the delta is made against.
+
+	    coff INTEGER  NOT NULL,
+	    clen INTEGER  NOT NULL,
+	    pid  INTEGER            REFERENCES blob,
+
+	    UNIQUE (rid)
+	} { fid }
+	# Index on owning file to collect all blobs of a file when the
+	# time for its expansion comes.
 
 	state extend optype {
 	    oid   INTEGER  NOT NULL  PRIMARY KEY,
 	    name  TEXT     NOT NULL,