Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_pcollrev.tcl part of check-in [131f051880] - Moved the paranoid integrity checks of pass 2 into a separate package for use by other passes, and changed pass 4 to also run these checks, albeit in a (slightly) relaxed form. See the comments at the point of call for the reason. This completes pass 4. by aku on 2007-11-09 06:28:19. [view]

To:

File tools/cvs2fossil/lib/c2f_pcollrev.tcl part of check-in [95af789e1f] - Oops. pass 5 is not complete. Missed the breaking of internal dependencies, this is done in this pass already. Extended pass _2_ and file revisions with code to save the branchchildren (possible dependencies), and pass 5 and changesets with the proper algorithm. From cvs2svn, works, do not truly like it, as it throws away and recomputes a lot of state after each split of a cset. Could update and reuse the state to perform all splits in one go. Will try that next, for now we have a working form in the code base. by aku on 2007-11-10 20:40:06. [view]

@@ -144,8 +144,9 @@
 	    clen  INTEGER  NOT NULL,
 
 	    UNIQUE (fid, rev) -- The DTN is unique within the revision's file.
 	}
+
 	state writing optype {
 	    oid   INTEGER  NOT NULL  PRIMARY KEY,
 	    name  TEXT     NOT NULL,
 	    UNIQUE(name)
@@ -155,8 +156,20 @@
 	    INSERT INTO optype VALUES ( 0,'nothing'); -- fixed pieces, see myopstate
 	    INSERT INTO optype VALUES ( 1,'add');     -- in file::rev. myopcode is
 	    INSERT INTO optype VALUES ( 2,'change');  -- loaded from this.
 	}
+
+	state writing revisionbranchchildren {
+	    -- The non-primary children of a revision, as reachable
+	    -- through a branch symbol, are listed here. This is
+	    -- needed by pass 5 to break internal dependencies in a
+	    -- changeset.
+
+	    rid   INTEGER  NOT NULL  REFERENCES revision,
+	    brid  INTEGER  NOT NULL  REFERENCES revision,
+	    UNIQUE(rid,brid)
+	}
+
 	state writing tag {
 	    tid  INTEGER  NOT NULL  PRIMARY KEY AUTOINCREMENT,
 	    fid  INTEGER  NOT NULL  REFERENCES file,     -- File the item belongs to
 	    lod  INTEGER            REFERENCES symbol,   -- Line of development (NULL => Trunk)