Differences From:
File tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl part of check-in [b42cff97e3] - Replaced the checks for self-referential changesets in the cycle breaker with a scheme in the changeset class doing checks when splitting a changeset, which is also called by the general changeset integrity code, after each pass. Extended log output at high verbosity levels. Thorough checking of the fragments a changeset is to be split into. by aku on 2007-11-30 03:57:19. [view]
To:
File tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl part of check-in [00bf8c198e] - The performance was still not satisfying, even with faster recomputing of successors. Doing it multiple times (Building the graph in each breaker and sort passes) eats time. Caching in memory blows the memory. Chosen solution: Cache this information in the database.Created a new pass 'CsetDeps' which is run between 'InitCsets' and 'BreakRevCsetCycles' (i.e. changeset creation and first breaker pass). It computes the changeset dependencies from the file-level dependencies once and saves the result in the state, in the new table 'cssuccessor'. Now the breaker and sort passes can get the information quickly, with virtually no effort. The dependencies are recomputed incrementally when a changeset is split by one of the breaker passes, for its fragments and its predecessors.
The loop check is now trivial, and integrated into the successor computation, with the heavy lifting for the detailed analysis and reporting moved down into the type-dependent SQL queries. The relevant new method is 'loops'. Now that the loop check is incremental the pass based checks have been removed from the integrity module, and the option '--loopcheck' has been eliminated. For paranoia the graph setup and modification code got its loop check reinstated as an assert, redusing the changeset report code.
Renumbered the breaker and sort passes. A number of places, like graph setup and traversal, loading of changesets, etc. got feedback indicators to show their progress.
The selection of revision and symbol changesets for the associated breaker passes was a bit on the slow side. We now keep changeset lists sorted by type (during loading or general construction) and access them directly.
by aku on 2007-12-02 20:04:40. [view]
@@ -9,11 +9,11 @@ # individuals. For exact contribution history, see the revision # history and logs, available at http://fossil-scm.hwaci.com/fossil # # ## ### ##### ######## ############# ##################### -## Pass VI. This pass goes over the set of revision based changesets +## Pass VII. This pass goes over the set of revision based changesets ## and breaks all dependency cycles they may be in. We need a -## dependency tree. Identical to pass VII, except for the selection of +## dependency tree. Identical to pass IX, except for the selection of ## the changesets. # # ## ### ##### ######## ############# ##################### ## Requirements @@ -70,9 +70,9 @@ cyclebreaker run break-rev [myproc Changesets] } repository printcsetstatistics - integrity changesets [project::rev all] + integrity changesets return } typemethod discard {} { @@ -85,12 +85,11 @@ # # ## ### ##### ######## ############# ## Internal methods proc Changesets {} { - return [struct::list filter [project::rev all] [myproc IsByRevision]] - } - - proc IsByRevision {cset} { $cset byrevision } + log write 2 breakrcycle {Selecting the revision changesets} + return [project::rev rev] + } # # ## ### ##### ######## ############# ## Configuration