| | @@ -47,36 +47,24 @@ |
| 47 | 47 | # this pass. |
| 48 | 48 | |
| 49 | 49 | state reading revision |
| 50 | 50 | state reading changeset |
| 51 | 51 | state reading csrevision |
| 52 | | - |
| 53 | | - state writing csorder { |
| 54 | | - -- Commit order of changesets based on their dependencies |
| 55 | | - cid INTEGER NOT NULL REFERENCES changeset, |
| 56 | | - pos INTEGER NOT NULL, |
| 57 | | - UNIQUE (cid), |
| 58 | | - UNIQUE (pos) |
| 59 | | - } |
| 60 | 52 | return |
| 61 | 53 | } |
| 62 | 54 | |
| 63 | 55 | typemethod load {} { |
| 64 | 56 | # Pass manager interface. Executed to load data computed by |
| 65 | 57 | # this pass into memory when this pass is skipped instead of |
| 66 | 58 | # executed. |
| 67 | | - |
| 68 | | - state reading changeset |
| 69 | | - project::rev loadcounter |
| 70 | 59 | return |
| 71 | 60 | } |
| 72 | 61 | |
| 73 | 62 | typemethod run {} { |
| 74 | 63 | # Pass manager interface. Executed to perform the |
| 75 | 64 | # functionality of the pass. |
| 76 | 65 | |
| 77 | | - cyclebreaker savecmd [myproc SaveOrder] |
| 78 | 66 | cyclebreaker breakcmd {::vc::fossil::import::cvs::cyclebreaker break} |
| 79 | 67 | |
| 80 | 68 | state transaction { |
| 81 | 69 | cyclebreaker run break-rev [myproc Changesets] |
| 82 | 70 | } |
| | @@ -87,12 +75,10 @@ |
| 87 | 75 | |
| 88 | 76 | typemethod discard {} { |
| 89 | 77 | # Pass manager interface. Executed for all passes after the |
| 90 | 78 | # run passes, to remove all data of this pass from the state, |
| 91 | 79 | # as being out of date. |
| 92 | | - |
| 93 | | - state discard csorder |
| 94 | 80 | return |
| 95 | 81 | } |
| 96 | 82 | |
| 97 | 83 | # # ## ### ##### ######## ############# |
| 98 | 84 | ## Internal methods |
| | @@ -101,22 +87,10 @@ |
| 101 | 87 | return [struct::list filter [project::rev all] [myproc IsByRevision]] |
| 102 | 88 | } |
| 103 | 89 | |
| 104 | 90 | proc IsByRevision {cset} { $cset byrevision } |
| 105 | 91 | |
| 106 | | - proc SaveOrder {graph at cset} { |
| 107 | | - set cid [$cset id] |
| 108 | | - |
| 109 | | - log write 4 breakrcycle "Comitting @ $at: [$cset str]" |
| 110 | | - state run { |
| 111 | | - INSERT INTO csorder (cid, pos) |
| 112 | | - VALUES ($cid, $at) |
| 113 | | - } |
| 114 | | - # MAYBE TODO: Write the project level changeset dependencies as well. |
| 115 | | - return |
| 116 | | - } |
| 117 | | - |
| 118 | 92 | # # ## ### ##### ######## ############# |
| 119 | 93 | ## Configuration |
| 120 | 94 | |
| 121 | 95 | pragma -hasinstances no ; # singleton |
| 122 | 96 | pragma -hastypeinfo no ; # no introspection |
| 123 | 97 | |