Artifact 9244bb5c27f6171d72a851e29677eb5512353359:
File tools/cvs2fossil/lib/c2f_pbreakacycle.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.
0000: 23 23 20 2d 2a 2d 20 74 63 6c 20 2d 2a 2d 0a 23 ## -*- tcl -*-.# 0010: 20 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 # ## ### ##### 0020: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 ######## ####### 0030: 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 ###### ######### 0040: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 23 20 ############.## 0050: 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 32 30 Copyright (c) 20 0060: 30 37 20 41 6e 64 72 65 61 73 20 4b 75 70 72 69 07 Andreas Kupri 0070: 65 73 2e 0a 23 0a 23 20 54 68 69 73 20 73 6f 66 es..#.# This sof 0080: 74 77 61 72 65 20 69 73 20 6c 69 63 65 6e 73 65 tware is license 0090: 64 20 61 73 20 64 65 73 63 72 69 62 65 64 20 69 d as described i 00a0: 6e 20 74 68 65 20 66 69 6c 65 20 4c 49 43 45 4e n the file LICEN 00b0: 53 45 2c 20 77 68 69 63 68 0a 23 20 79 6f 75 20 SE, which.# you 00c0: 73 68 6f 75 6c 64 20 68 61 76 65 20 72 65 63 65 should have rece 00d0: 69 76 65 64 20 61 73 20 70 61 72 74 20 6f 66 20 ived as part of 00e0: 74 68 69 73 20 64 69 73 74 72 69 62 75 74 69 6f this distributio 00f0: 6e 2e 0a 23 0a 23 20 54 68 69 73 20 73 6f 66 74 n..#.# This soft 0100: 77 61 72 65 20 63 6f 6e 73 69 73 74 73 20 6f 66 ware consists of 0110: 20 76 6f 6c 75 6e 74 61 72 79 20 63 6f 6e 74 72 voluntary contr 0120: 69 62 75 74 69 6f 6e 73 20 6d 61 64 65 20 62 79 ibutions made by 0130: 20 6d 61 6e 79 0a 23 20 69 6e 64 69 76 69 64 75 many.# individu 0140: 61 6c 73 2e 20 20 46 6f 72 20 65 78 61 63 74 20 als. For exact 0150: 63 6f 6e 74 72 69 62 75 74 69 6f 6e 20 68 69 73 contribution his 0160: 74 6f 72 79 2c 20 73 65 65 20 74 68 65 20 72 65 tory, see the re 0170: 76 69 73 69 6f 6e 0a 23 20 68 69 73 74 6f 72 79 vision.# history 0180: 20 61 6e 64 20 6c 6f 67 73 2c 20 61 76 61 69 6c and logs, avail 0190: 61 62 6c 65 20 61 74 20 68 74 74 70 3a 2f 2f 66 able at http://f 01a0: 6f 73 73 69 6c 2d 73 63 6d 2e 68 77 61 63 69 2e ossil-scm.hwaci. 01b0: 63 6f 6d 2f 66 6f 73 73 69 6c 0a 23 20 23 20 23 com/fossil.# # # 01c0: 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 23 # ### ##### #### 01d0: 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 #### ########### 01e0: 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23 ## ############# 01f0: 23 23 23 23 23 23 23 23 0a 0a 23 23 20 50 61 73 ########..## Pas 0200: 73 20 58 2e 20 54 68 69 73 20 69 73 20 74 68 65 s X. This is the 0210: 20 66 69 6e 61 6c 20 70 61 73 73 20 66 6f 72 20 final pass for 0220: 62 72 65 61 6b 69 6e 67 20 63 68 61 6e 67 65 73 breaking changes 0230: 65 74 20 64 65 70 65 6e 64 65 6e 63 79 0a 23 23 et dependency.## 0240: 20 63 79 63 6c 65 73 2e 20 54 68 65 20 70 72 65 cycles. The pre 0250: 76 69 6f 75 73 20 62 72 65 61 6b 65 72 20 70 61 vious breaker pa 0260: 73 73 65 73 20 28 37 20 61 6e 64 20 39 29 20 62 sses (7 and 9) b 0270: 72 6f 6b 65 20 63 79 63 6c 65 73 20 63 6f 76 65 roke cycles cove 0280: 72 69 6e 67 0a 23 23 20 72 65 76 69 73 69 6f 6e ring.## revision 0290: 20 61 6e 64 20 73 79 6d 62 6f 6c 20 63 68 61 6e and symbol chan 02a0: 67 65 73 65 74 73 2c 20 72 65 73 70 65 63 74 69 gesets, respecti 02b0: 76 65 6c 79 2e 20 54 68 69 73 20 70 61 73 73 20 vely. This pass 02c0: 6e 6f 77 20 62 72 65 61 6b 73 0a 23 23 20 61 6e now breaks.## an 02d0: 79 20 72 65 6d 61 69 6e 69 6e 67 20 63 79 63 6c y remaining cycl 02e0: 65 73 2c 20 65 61 63 68 20 6f 66 20 77 68 69 63 es, each of whic 02f0: 68 20 68 61 73 20 74 6f 20 63 6f 6e 74 61 69 6e h has to contain 0300: 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 0a 23 23 at least one.## 0310: 20 72 65 76 69 73 69 6f 6e 20 61 6e 64 20 61 74 revision and at 0320: 20 6c 65 61 73 74 20 6f 6e 65 20 73 79 6d 62 6f least one symbo 0330: 6c 20 63 68 61 6e 67 65 73 65 74 2e 0a 0a 23 20 l changeset...# 0340: 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23 # ## ### ##### # 0350: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 ####### ######## 0360: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ########## 0370: 23 23 23 23 23 23 23 23 23 23 23 0a 23 23 20 52 ###########.## R 0380: 65 71 75 69 72 65 6d 65 6e 74 73 0a 0a 70 61 63 equirements..pac 0390: 6b 61 67 65 20 72 65 71 75 69 72 65 20 54 63 6c kage require Tcl 03a0: 20 38 2e 34 20 20 20 20 20 20 20 20 20 20 20 20 8.4 03b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 03c0: 20 20 20 20 20 20 20 3b 20 23 20 52 65 71 75 69 ; # Requi 03d0: 72 65 64 20 72 75 6e 74 69 6d 65 2e 0a 70 61 63 red runtime..pac 03e0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 73 6e 69 kage require sni 03f0: 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t 0400: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0410: 20 20 20 20 20 20 20 3b 20 23 20 4f 4f 20 73 79 ; # OO sy 0420: 73 74 65 6d 2e 0a 70 61 63 6b 61 67 65 20 72 65 stem..package re 0430: 71 75 69 72 65 20 73 74 72 75 63 74 3a 3a 6c 69 quire struct::li 0440: 73 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 st 0450: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0460: 3b 20 23 20 48 69 67 68 65 72 20 6f 72 64 65 72 ; # Higher order 0470: 20 6c 69 73 74 20 6f 70 65 72 61 74 69 6f 6e 73 list operations 0480: 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 ..package requir 0490: 65 20 73 74 72 75 63 74 3a 3a 73 65 74 20 20 20 e struct::set 04a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 04b0: 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 23 20 ; # 04c0: 53 65 74 20 6f 70 65 72 61 74 69 6f 6e 73 2e 0a Set operations.. 04d0: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 package require 04e0: 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6d 69 73 63 20 vc::tools::misc 04f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0500: 20 20 20 20 20 20 20 20 20 20 3b 20 23 20 4d 69 ; # Mi 0510: 6e 2c 20 6d 61 78 2e 0a 70 61 63 6b 61 67 65 20 n, max..package 0520: 72 65 71 75 69 72 65 20 76 63 3a 3a 74 6f 6f 6c require vc::tool 0530: 73 3a 3a 6c 6f 67 20 20 20 20 20 20 20 20 20 20 s::log 0540: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0550: 20 20 3b 20 23 20 55 73 65 72 20 66 65 65 64 62 ; # User feedb 0560: 61 63 6b 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 ack..package req 0570: 75 69 72 65 20 76 63 3a 3a 74 6f 6f 6c 73 3a 3a uire vc::tools:: 0580: 74 72 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 trouble 0590: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b ; 05a0: 20 23 20 45 72 72 6f 72 20 72 65 70 6f 72 74 69 # Error reporti 05b0: 6e 67 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ng..package requ 05c0: 69 72 65 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a ire vc::fossil:: 05d0: 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 72 65 70 import::cvs::rep 05e0: 6f 73 69 74 6f 72 79 20 20 20 20 20 20 20 3b 20 ository ; 05f0: 23 20 52 65 70 6f 73 69 74 6f 72 79 20 6d 61 6e # Repository man 0600: 61 67 65 6d 65 6e 74 2e 0a 70 61 63 6b 61 67 65 agement..package 0610: 20 72 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 require vc::fos 0620: 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 sil::import::cvs 0630: 3a 3a 63 79 63 6c 65 62 72 65 61 6b 65 72 20 20 ::cyclebreaker 0640: 20 20 20 3b 20 23 20 42 72 65 61 6b 69 6e 67 20 ; # Breaking 0650: 64 65 70 65 6e 64 65 6e 63 79 20 63 79 63 6c 65 dependency cycle 0660: 73 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 s..package requi 0670: 72 65 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 re vc::fossil::i 0680: 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 73 74 61 74 mport::cvs::stat 0690: 65 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 23 e ; # 06a0: 20 53 74 61 74 65 20 73 74 6f 72 61 67 65 2e 0a State storage.. 06b0: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 package require 06c0: 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f vc::fossil::impo 06d0: 72 74 3a 3a 63 76 73 3a 3a 69 6e 74 65 67 72 69 rt::cvs::integri 06e0: 74 79 20 20 20 20 20 20 20 20 3b 20 23 20 53 74 ty ; # St 06f0: 61 74 65 20 69 6e 74 65 67 72 69 74 79 20 63 68 ate integrity ch 0700: 65 63 6b 73 2e 0a 70 61 63 6b 61 67 65 20 72 65 ecks..package re 0710: 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 69 6c quire vc::fossil 0720: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 ::import::cvs::p 0730: 72 6f 6a 65 63 74 3a 3a 72 65 76 20 20 20 20 20 roject::rev 0740: 3b 20 23 20 50 72 6f 6a 65 63 74 20 6c 65 76 65 ; # Project leve 0750: 6c 20 63 68 61 6e 67 65 73 65 74 73 0a 0a 23 20 l changesets..# 0760: 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23 # ## ### ##### # 0770: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 ####### ######## 0780: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ########## 0790: 23 23 23 23 23 23 23 23 23 23 23 0a 23 23 20 52 ###########.## R 07a0: 65 67 69 73 74 65 72 20 74 68 65 20 70 61 73 73 egister the pass 07b0: 20 77 69 74 68 20 74 68 65 20 6d 61 6e 61 67 65 with the manage 07c0: 6d 65 6e 74 0a 0a 76 63 3a 3a 66 6f 73 73 69 6c ment..vc::fossil 07d0: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 ::import::cvs::p 07e0: 61 73 73 20 64 65 66 69 6e 65 20 5c 0a 20 20 20 ass define \. 07f0: 20 42 72 65 61 6b 41 6c 6c 43 73 65 74 43 79 63 BreakAllCsetCyc 0800: 6c 65 73 20 5c 0a 20 20 20 20 7b 42 72 65 61 6b les \. {Break 0810: 20 52 65 6d 61 69 6e 69 6e 67 20 43 68 61 6e 67 Remaining Chang 0820: 65 53 65 74 20 44 65 70 65 6e 64 65 6e 63 79 20 eSet Dependency 0830: 43 79 63 6c 65 73 7d 20 5c 0a 20 20 20 20 3a 3a Cycles} \. :: 0840: 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f vc::fossil::impo 0850: 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a 3a 62 rt::cvs::pass::b 0860: 72 65 61 6b 61 63 79 63 6c 65 0a 0a 23 20 23 20 reakacycle..# # 0870: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 ## ### ##### ### 0880: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ########## 0890: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 ### ############ 08a0: 23 23 23 23 23 23 23 23 23 0a 23 23 0a 0a 73 6e #########.##..sn 08b0: 69 74 3a 3a 74 79 70 65 20 3a 3a 76 63 3a 3a 66 it::type ::vc::f 08c0: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c 08d0: 76 73 3a 3a 70 61 73 73 3a 3a 62 72 65 61 6b 61 vs::pass::breaka 08e0: 63 79 63 6c 65 20 7b 0a 20 20 20 20 23 20 23 20 cycle {. # # 08f0: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 ## ### ##### ### 0900: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ########## 0910: 23 23 23 0a 20 20 20 20 23 23 20 50 75 62 6c 69 ###. ## Publi 0920: 63 20 41 50 49 0a 0a 20 20 20 20 74 79 70 65 6d c API.. typem 0930: 65 74 68 6f 64 20 73 65 74 75 70 20 7b 7d 20 7b ethod setup {} { 0940: 0a 09 23 20 44 65 66 69 6e 65 20 74 68 65 20 6e ..# Define the n 0950: 61 6d 65 73 20 61 6e 64 20 73 74 72 75 63 74 75 ames and structu 0960: 72 65 20 6f 66 20 74 68 65 20 70 65 72 73 69 73 re of the persis 0970: 74 65 6e 74 20 73 74 61 74 65 20 6f 66 0a 09 23 tent state of..# 0980: 20 74 68 69 73 20 70 61 73 73 2e 0a 0a 09 73 74 this pass....st 0990: 61 74 65 20 72 65 61 64 69 6e 67 20 63 68 61 6e ate reading chan 09a0: 67 65 73 65 74 0a 09 73 74 61 74 65 20 72 65 61 geset..state rea 09b0: 64 69 6e 67 20 63 73 69 74 65 6d 0a 09 73 74 61 ding csitem..sta 09c0: 74 65 20 72 65 61 64 69 6e 67 20 63 73 6f 72 64 te reading csord 09d0: 65 72 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d er..return. } 09e0: 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 .. typemethod 09f0: 20 6c 6f 61 64 20 7b 7d 20 7b 0a 09 23 20 50 61 load {} {..# Pa 0a00: 73 73 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 ss manager inter 0a10: 66 61 63 65 2e 20 45 78 65 63 75 74 65 64 20 74 face. Executed t 0a20: 6f 20 6c 6f 61 64 20 64 61 74 61 20 63 6f 6d 70 o load data comp 0a30: 75 74 65 64 20 62 79 0a 09 23 20 74 68 69 73 20 uted by..# this 0a40: 70 61 73 73 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 pass into memory 0a50: 20 77 68 65 6e 20 74 68 69 73 20 70 61 73 73 20 when this pass 0a60: 69 73 20 73 6b 69 70 70 65 64 20 69 6e 73 74 65 is skipped inste 0a70: 61 64 20 6f 66 0a 09 23 20 65 78 65 63 75 74 65 ad of..# execute 0a80: 64 2e 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d d...return. } 0a90: 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 .. typemethod 0aa0: 20 72 75 6e 20 7b 7d 20 7b 0a 09 23 20 50 61 73 run {} {..# Pas 0ab0: 73 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 s manager interf 0ac0: 61 63 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f ace. Executed to 0ad0: 20 70 65 72 66 6f 72 6d 20 74 68 65 0a 09 23 20 perform the..# 0ae0: 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 6f 66 functionality of 0af0: 20 74 68 65 20 70 61 73 73 2e 0a 0a 09 73 65 74 the pass....set 0b00: 20 6c 65 6e 20 5b 73 74 72 69 6e 67 20 6c 65 6e len [string len 0b10: 67 74 68 20 5b 70 72 6f 6a 65 63 74 3a 3a 72 65 gth [project::re 0b20: 76 20 6e 75 6d 5d 5d 0a 09 73 65 74 20 6d 79 61 v num]]..set mya 0b30: 74 66 6d 74 20 25 24 7b 6c 65 6e 7d 73 0a 09 69 tfmt %${len}s..i 0b40: 6e 63 72 20 6c 65 6e 20 31 32 0a 09 73 65 74 20 ncr len 12..set 0b50: 6d 79 63 73 66 6d 74 20 25 24 7b 6c 65 6e 7d 73 mycsfmt %${len}s 0b60: 0a 0a 09 63 79 63 6c 65 62 72 65 61 6b 65 72 20 ...cyclebreaker 0b70: 70 72 65 63 6d 64 20 20 20 5b 6d 79 70 72 6f 63 precmd [myproc 0b80: 20 42 72 65 61 6b 42 61 63 6b 77 61 72 64 5d 0a BreakBackward]. 0b90: 09 63 79 63 6c 65 62 72 65 61 6b 65 72 20 73 61 .cyclebreaker sa 0ba0: 76 65 63 6d 64 20 20 5b 6d 79 70 72 6f 63 20 4b vecmd [myproc K 0bb0: 65 65 70 4f 72 64 65 72 5d 0a 0a 09 73 74 61 74 eepOrder]...stat 0bc0: 65 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 7b 0a e transaction {. 0bd0: 09 20 20 20 20 4c 6f 61 64 43 6f 6d 6d 69 74 4f . LoadCommitO 0be0: 72 64 65 72 0a 09 20 20 20 20 63 79 63 6c 65 62 rder.. cycleb 0bf0: 72 65 61 6b 65 72 20 72 75 6e 20 62 72 65 61 6b reaker run break 0c00: 2d 61 6c 6c 20 5b 6d 79 70 72 6f 63 20 43 68 61 -all [myproc Cha 0c10: 6e 67 65 73 65 74 73 5d 0a 09 7d 0a 0a 09 72 65 ngesets]..}...re 0c20: 70 6f 73 69 74 6f 72 79 20 70 72 69 6e 74 63 73 pository printcs 0c30: 65 74 73 74 61 74 69 73 74 69 63 73 0a 09 69 6e etstatistics..in 0c40: 74 65 67 72 69 74 79 20 63 68 61 6e 67 65 73 65 tegrity changese 0c50: 74 73 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d ts..return. } 0c60: 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 .. typemethod 0c70: 20 64 69 73 63 61 72 64 20 7b 7d 20 7b 0a 09 23 discard {} {..# 0c80: 20 50 61 73 73 20 6d 61 6e 61 67 65 72 20 69 6e Pass manager in 0c90: 74 65 72 66 61 63 65 2e 20 45 78 65 63 75 74 65 terface. Execute 0ca0: 64 20 66 6f 72 20 61 6c 6c 20 70 61 73 73 65 73 d for all passes 0cb0: 20 61 66 74 65 72 20 74 68 65 0a 09 23 20 72 75 after the..# ru 0cc0: 6e 20 70 61 73 73 65 73 2c 20 74 6f 20 72 65 6d n passes, to rem 0cd0: 6f 76 65 20 61 6c 6c 20 64 61 74 61 20 6f 66 20 ove all data of 0ce0: 74 68 69 73 20 70 61 73 73 20 66 72 6f 6d 20 74 this pass from t 0cf0: 68 65 20 73 74 61 74 65 2c 0a 09 23 20 61 73 20 he state,..# as 0d00: 62 65 69 6e 67 20 6f 75 74 20 6f 66 20 64 61 74 being out of dat 0d10: 65 2e 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d e...return. } 0d20: 0a 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 23 .. # # ## ### 0d30: 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 20 ##### ######## 0d40: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20 20 #############. 0d50: 20 20 23 23 20 49 6e 74 65 72 6e 61 6c 20 6d 65 ## Internal me 0d60: 74 68 6f 64 73 0a 0a 20 20 20 20 70 72 6f 63 20 thods.. proc 0d70: 43 68 61 6e 67 65 73 65 74 73 20 7b 7d 20 7b 0a Changesets {} {. 0d80: 09 6c 6f 67 20 77 72 69 74 65 20 32 20 62 72 65 .log write 2 bre 0d90: 61 6b 72 63 79 63 6c 65 20 7b 53 65 6c 65 63 74 akrcycle {Select 0da0: 69 6e 67 20 61 6c 6c 20 63 68 61 6e 67 65 73 65 ing all changese 0db0: 74 73 7d 0a 09 72 65 74 75 72 6e 20 5b 70 72 6f ts}..return [pro 0dc0: 6a 65 63 74 3a 3a 72 65 76 20 61 6c 6c 5d 0a 20 ject::rev all]. 0dd0: 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 4c }.. proc L 0de0: 6f 61 64 43 6f 6d 6d 69 74 4f 72 64 65 72 20 7b oadCommitOrder { 0df0: 7d 20 7b 0a 09 3a 3a 76 61 72 69 61 62 6c 65 20 } {..::variable 0e00: 6d 79 63 73 65 74 0a 09 3a 3a 76 61 72 69 61 62 mycset..::variab 0e10: 6c 65 20 6d 79 72 65 76 69 73 69 6f 6e 63 68 61 le myrevisioncha 0e20: 6e 67 65 73 65 74 73 0a 0a 09 73 74 61 74 65 20 ngesets...state 0e30: 74 72 61 6e 73 61 63 74 69 6f 6e 20 7b 0a 09 20 transaction {.. 0e40: 20 20 20 66 6f 72 65 61 63 68 20 7b 63 69 64 20 foreach {cid 0e50: 70 6f 73 7d 20 5b 73 74 61 74 65 20 72 75 6e 20 pos} [state run 0e60: 7b 20 53 45 4c 45 43 54 20 63 69 64 2c 20 70 6f { SELECT cid, po 0e70: 73 20 46 52 4f 4d 20 63 73 6f 72 64 65 72 20 7d s FROM csorder } 0e80: 5d 20 7b 0a 09 09 73 65 74 20 63 73 65 74 20 5b ] {...set cset [ 0e90: 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 6f 66 20 project::rev of 0ea0: 24 63 69 64 5d 0a 09 09 24 63 73 65 74 20 73 65 $cid]...$cset se 0eb0: 74 70 6f 73 20 24 70 6f 73 0a 09 09 73 65 74 20 tpos $pos...set 0ec0: 6d 79 63 73 65 74 28 24 70 6f 73 29 20 24 63 73 mycset($pos) $cs 0ed0: 65 74 0a 09 09 6c 61 70 70 65 6e 64 20 6d 79 72 et...lappend myr 0ee0: 65 76 69 73 69 6f 6e 63 68 61 6e 67 65 73 65 74 evisionchangeset 0ef0: 73 20 24 63 73 65 74 0a 09 20 20 20 20 7d 0a 09 s $cset.. }.. 0f00: 7d 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a }..return. }. 0f10: 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 23 20 . # # ## ### 0f20: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 ##### ######## # 0f30: 23 23 23 23 23 23 23 23 23 23 23 23 0a 0a 20 20 ############.. 0f40: 20 20 70 72 6f 63 20 42 72 65 61 6b 42 61 63 6b proc BreakBack 0f50: 77 61 72 64 20 7b 67 72 61 70 68 7d 20 7b 0a 09 ward {graph} {.. 0f60: 23 20 57 65 20 67 6f 20 6f 76 65 72 20 61 6c 6c # We go over all 0f70: 20 62 72 61 6e 63 68 20 63 68 61 6e 67 65 73 65 branch changese 0f80: 74 73 2c 20 69 2e 65 2e 20 74 68 65 20 63 68 61 ts, i.e. the cha 0f90: 6e 67 65 73 65 74 73 0a 09 23 20 63 72 65 61 74 ngesets..# creat 0fa0: 65 64 20 62 79 20 74 68 65 20 73 79 6d 62 6f 6c ed by the symbol 0fb0: 73 20 77 68 69 63 68 20 61 72 65 20 74 72 61 6e s which are tran 0fc0: 73 6c 61 74 65 64 20 61 73 20 62 72 61 6e 63 68 slated as branch 0fd0: 65 73 2c 20 61 6e 64 0a 09 23 20 62 72 65 61 6b es, and..# break 0fe0: 20 61 6e 79 20 77 68 69 63 68 20 61 72 65 20 27 any which are ' 0ff0: 62 61 63 6b 77 61 72 64 27 2c 20 77 68 69 63 68 backward', which 1000: 20 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 79 means that they 1010: 20 68 61 76 65 0a 09 23 20 61 74 20 6c 65 61 73 have..# at leas 1020: 74 20 6f 6e 65 20 69 6e 63 6f 6d 69 6e 67 20 72 t one incoming r 1030: 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 evision changese 1040: 74 20 77 68 69 63 68 20 69 73 20 63 6f 6d 6d 69 t which is commi 1050: 74 74 65 64 0a 09 23 20 61 66 74 65 72 20 61 74 tted..# after at 1060: 20 6c 65 61 73 74 20 6f 6e 65 20 6f 66 20 74 68 least one of th 1070: 65 20 6f 75 74 67 6f 69 6e 67 20 72 65 76 69 73 e outgoing revis 1080: 69 6f 6e 20 63 68 61 6e 67 65 73 65 74 73 2c 20 ion changesets, 1090: 70 65 72 0a 09 23 20 74 68 65 20 6f 72 64 65 72 per..# the order 10a0: 20 63 6f 6d 70 75 74 65 64 20 69 6e 20 70 61 73 computed in pas 10b0: 73 20 36 2e 20 49 6e 20 22 63 76 73 32 73 76 6e s 6. In "cvs2svn 10c0: 22 20 74 68 69 73 20 69 73 20 63 61 6c 6c 65 64 " this is called 10d0: 0a 09 23 20 22 72 65 74 72 6f 67 72 61 64 65 22 ..# "retrograde" 10e0: 2e 0a 0a 09 73 65 74 20 6e 20 30 0a 09 73 65 74 ....set n 0..set 10f0: 20 6d 61 78 20 5b 6c 6c 65 6e 67 74 68 20 5b 24 max [llength [$ 1100: 67 72 61 70 68 20 6e 6f 64 65 73 5d 5d 0a 09 66 graph nodes]]..f 1110: 6f 72 65 61 63 68 20 63 73 65 74 20 5b 24 67 72 oreach cset [$gr 1120: 61 70 68 20 6e 6f 64 65 73 5d 20 7b 0a 09 20 20 aph nodes] {.. 1130: 20 20 6c 6f 67 20 70 72 6f 67 72 65 73 73 20 32 log progress 2 1140: 20 62 72 65 61 6b 61 63 79 63 6c 65 20 24 6e 20 breakacycle $n 1150: 24 6d 61 78 20 3b 20 69 6e 63 72 20 6e 0a 09 20 $max ; incr n.. 1160: 20 20 20 69 66 20 7b 21 5b 24 63 73 65 74 20 69 if {![$cset i 1170: 73 62 72 61 6e 63 68 5d 7d 20 63 6f 6e 74 69 6e sbranch]} contin 1180: 75 65 0a 09 20 20 20 20 43 68 65 63 6b 41 6e 64 ue.. CheckAnd 1190: 42 72 65 61 6b 42 61 63 6b 77 61 72 64 20 24 67 BreakBackward $g 11a0: 72 61 70 68 20 24 63 73 65 74 0a 09 7d 0a 09 72 raph $cset..}..r 11b0: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 eturn. }.. 11c0: 20 70 72 6f 63 20 43 68 65 63 6b 41 6e 64 42 72 proc CheckAndBr 11d0: 65 61 6b 42 61 63 6b 77 61 72 64 20 7b 67 72 61 eakBackward {gra 11e0: 70 68 20 63 73 65 74 7d 20 7b 0a 09 77 68 69 6c ph cset} {..whil 11f0: 65 20 7b 5b 49 73 42 61 63 6b 77 61 72 64 20 24 e {[IsBackward $ 1200: 67 72 61 70 68 20 24 63 73 65 74 5d 7d 20 7b 0a graph $cset]} {. 1210: 09 20 20 20 20 23 20 4b 6e 6f 77 69 6e 67 20 74 . # Knowing t 1220: 68 61 74 20 74 68 65 20 62 72 61 6e 63 68 20 63 hat the branch c 1230: 68 61 6e 67 65 73 65 74 20 69 73 20 62 61 63 6b hangeset is back 1240: 77 61 72 64 20 77 65 20 6e 6f 77 0a 09 20 20 20 ward we now.. 1250: 20 23 20 6c 6f 6f 6b 20 61 74 20 74 68 65 20 69 # look at the i 1260: 6e 64 69 76 69 64 75 61 6c 20 62 72 61 6e 63 68 ndividual branch 1270: 65 73 20 69 6e 20 74 68 65 20 63 68 61 6e 67 65 es in the change 1280: 73 65 74 20 61 6e 64 0a 09 20 20 20 20 23 20 64 set and.. # d 1290: 65 74 65 72 6d 69 6e 65 20 77 68 69 63 68 20 6f etermine which o 12a0: 66 20 74 68 65 6d 20 61 72 65 20 72 65 73 70 6f f them are respo 12b0: 6e 73 69 62 6c 65 20 66 6f 72 20 74 68 65 0a 09 nsible for the.. 12c0: 20 20 20 20 23 20 6f 76 65 72 6c 61 70 2e 20 54 # overlap. T 12d0: 68 69 73 20 61 6c 6c 6f 77 73 20 75 73 20 74 6f his allows us to 12e0: 20 73 70 6c 69 74 20 74 68 65 6d 20 69 6e 74 6f split them into 12f0: 20 74 77 6f 20 73 65 74 73 2c 20 6f 6e 65 0a 09 two sets, one.. 1300: 20 20 20 20 23 20 6f 66 20 6e 6f 6e 2d 6f 76 65 # of non-ove 1310: 72 6c 61 70 70 69 6e 67 20 62 72 61 6e 63 68 65 rlapping branche 1320: 73 2c 20 61 6e 64 20 6f 66 20 6f 76 65 72 6c 61 s, and of overla 1330: 70 70 69 6e 67 0a 09 20 20 20 20 23 20 6f 6e 65 pping.. # one 1340: 73 2e 20 45 61 63 68 20 73 65 74 20 69 6e 64 75 s. Each set indu 1350: 63 65 73 20 61 20 6e 65 77 20 63 68 61 6e 67 65 ces a new change 1360: 73 65 74 2c 20 61 6e 64 20 74 68 65 20 73 65 63 set, and the sec 1370: 6f 6e 64 0a 09 20 20 20 20 23 20 6f 6e 65 20 6d ond.. # one m 1380: 61 79 20 73 74 69 6c 6c 20 62 65 20 62 61 63 6b ay still be back 1390: 77 61 72 64 20 61 6e 64 20 69 6e 20 6e 65 65 64 ward and in need 13a0: 20 6f 66 20 66 75 72 74 68 65 72 0a 09 20 20 20 of further.. 13b0: 20 23 20 73 70 6c 69 74 74 69 6e 67 2e 20 48 65 # splitting. He 13c0: 6e 63 65 20 74 68 65 20 6c 6f 6f 70 69 6e 67 2e nce the looping. 13d0: 0a 09 20 20 20 20 23 0a 09 20 20 20 20 23 20 54 .. #.. # T 13e0: 68 65 20 62 6f 72 64 65 72 20 75 73 65 64 20 66 he border used f 13f0: 6f 72 20 74 68 65 20 73 70 6c 69 74 20 69 73 20 or the split is 1400: 74 68 65 20 6d 69 6e 69 6d 61 6c 20 63 6f 6d 6d the minimal comm 1410: 69 74 0a 09 20 20 20 20 23 20 70 6f 73 69 74 69 it.. # positi 1420: 6f 6e 20 61 6d 6f 6e 67 20 74 68 65 20 6d 69 6e on among the min 1430: 69 6d 61 6c 20 73 75 63 65 73 73 6f 72 20 63 6f imal sucessor co 1440: 6d 6d 69 74 20 70 6f 73 69 74 69 6f 6e 73 20 66 mmit positions f 1450: 6f 72 0a 09 20 20 20 20 23 20 74 68 65 20 62 72 or.. # the br 1460: 61 6e 63 68 65 73 20 69 6e 20 74 68 65 20 63 68 anches in the ch 1470: 61 6e 67 65 73 65 74 2e 0a 0a 09 20 20 20 20 23 angeset.... # 1480: 20 4e 6f 74 65 20 74 68 61 74 20 69 6e 64 69 76 Note that indiv 1490: 69 64 75 61 6c 20 62 72 61 6e 63 68 65 73 20 6d idual branches m 14a0: 61 79 20 6e 6f 74 20 68 61 76 65 20 63 68 61 6e ay not have chan 14b0: 67 65 73 65 74 73 0a 09 20 20 20 20 23 20 77 68 gesets.. # wh 14c0: 69 63 68 20 61 72 65 20 74 68 65 69 72 20 70 72 ich are their pr 14d0: 65 64 65 63 65 73 73 6f 72 73 20 61 6e 64 2f 6f edecessors and/o 14e0: 72 20 73 75 63 63 65 73 73 6f 72 73 2c 20 6c 65 r successors, le 14f0: 61 76 69 6e 67 0a 09 20 20 20 20 23 20 74 68 65 aving.. # the 1500: 20 6c 69 6d 69 74 73 20 70 61 72 74 69 61 6c 6c limits partiall 1510: 79 20 6f 72 20 63 6f 6d 70 6c 65 74 65 6c 79 20 y or completely 1520: 75 6e 64 65 66 69 6e 65 64 2e 0a 0a 09 20 20 20 undefined.... 1530: 20 23 20 6c 69 6d 69 74 73 20 3a 20 64 69 63 74 # limits : dict 1540: 20 28 72 65 76 69 73 69 6f 6e 20 2d 3e 20 6c 69 (revision -> li 1550: 73 74 20 28 6d 61 78 20 70 72 65 64 65 63 65 73 st (max predeces 1560: 73 6f 72 20 63 6f 6d 6d 69 74 2c 20 6d 69 6e 20 sor commit, min 1570: 73 75 63 65 73 73 6f 72 20 63 6f 6d 6d 69 74 29 sucessor commit) 1580: 29 0a 0a 09 20 20 20 20 43 6f 6d 70 75 74 65 4c )... ComputeL 1590: 69 6d 69 74 73 20 24 63 73 65 74 20 6c 69 6d 69 imits $cset limi 15a0: 74 73 20 62 6f 72 64 65 72 0a 0a 09 20 20 20 20 ts border... 15b0: 6c 6f 67 20 77 72 69 74 65 20 35 20 62 72 65 61 log write 5 brea 15c0: 6b 61 63 79 63 6c 65 20 22 42 72 65 61 6b 69 6e kacycle "Breakin 15d0: 67 20 62 61 63 6b 77 61 72 64 20 63 68 61 6e 67 g backward chang 15e0: 65 73 65 74 20 5b 24 63 73 65 74 20 73 74 72 5d eset [$cset str] 15f0: 20 77 69 74 68 20 63 6f 6d 6d 69 74 20 70 6f 73 with commit pos 1600: 69 74 69 6f 6e 20 24 62 6f 72 64 65 72 20 61 73 ition $border as 1610: 20 62 6f 72 64 65 72 22 0a 0a 09 20 20 20 20 23 border"... # 1620: 20 53 65 63 6f 6e 64 6c 79 20 77 65 20 73 6f 72 Secondly we sor 1630: 74 20 74 68 65 20 66 69 6c 65 20 6c 65 76 65 6c t the file level 1640: 20 69 74 65 6d 73 20 62 61 73 65 64 20 6f 6e 20 items based on 1650: 74 68 65 72 65 0a 09 20 20 20 20 23 20 74 68 65 there.. # the 1660: 79 20 73 69 74 20 72 65 6c 61 74 69 76 65 20 74 y sit relative t 1670: 6f 20 74 68 65 20 62 6f 72 64 65 72 20 69 6e 74 o the border int 1680: 6f 20 62 65 66 6f 72 65 20 61 6e 64 20 61 66 74 o before and aft 1690: 65 72 0a 09 20 20 20 20 23 20 74 68 65 20 62 6f er.. # the bo 16a0: 72 64 65 72 2e 0a 0a 09 20 20 20 20 53 70 6c 69 rder.... Spli 16b0: 74 49 74 65 6d 73 20 24 6c 69 6d 69 74 73 20 24 tItems $limits $ 16c0: 62 6f 72 64 65 72 20 6e 6f 72 6d 61 6c 69 74 65 border normalite 16d0: 6d 73 20 62 61 63 6b 77 61 72 64 69 74 65 6d 73 ms backwarditems 16e0: 0a 0a 09 20 20 20 20 73 65 74 20 72 65 70 6c 61 ... set repla 16f0: 63 65 6d 65 6e 74 73 20 5b 70 72 6f 6a 65 63 74 cements [project 1700: 3a 3a 72 65 76 20 73 70 6c 69 74 20 24 63 73 65 ::rev split $cse 1710: 74 20 24 6e 6f 72 6d 61 6c 69 74 65 6d 73 20 24 t $normalitems $ 1720: 62 61 63 6b 77 61 72 64 69 74 65 6d 73 5d 0a 09 backwarditems].. 1730: 20 20 20 20 63 79 63 6c 65 62 72 65 61 6b 65 72 cyclebreaker 1740: 20 72 65 70 6c 61 63 65 20 24 67 72 61 70 68 20 replace $graph 1750: 24 63 73 65 74 20 24 72 65 70 6c 61 63 65 6d 65 $cset $replaceme 1760: 6e 74 73 0a 0a 09 20 20 20 20 23 20 41 74 20 6c nts... # At l 1770: 61 73 74 20 63 68 65 63 6b 20 74 68 61 74 20 74 ast check that t 1780: 68 65 20 6e 6f 72 6d 61 6c 20 66 72 61 6d 65 6e he normal framen 1790: 74 20 69 73 20 69 6e 64 65 65 64 20 6e 6f 74 0a t is indeed not. 17a0: 09 20 20 20 20 23 20 62 61 63 6b 77 61 72 64 2c . # backward, 17b0: 20 61 6e 64 20 69 74 65 72 61 74 65 20 6f 76 65 and iterate ove 17c0: 72 20 74 68 65 20 70 6f 73 73 69 62 6c 79 20 73 r the possibly s 17d0: 74 69 6c 6c 20 62 61 63 6b 77 61 72 64 0a 09 20 till backward.. 17e0: 20 20 20 23 20 73 65 63 6f 6e 64 20 66 72 61 67 # second frag 17f0: 6d 65 6e 74 2e 0a 0a 09 20 20 20 20 73 74 72 75 ment.... stru 1800: 63 74 3a 3a 6c 69 73 74 20 61 73 73 69 67 6e 20 ct::list assign 1810: 24 72 65 70 6c 61 63 65 6d 65 6e 74 73 20 6e 6f $replacements no 1820: 72 6d 61 6c 20 62 61 63 6b 77 61 72 64 0a 09 20 rmal backward.. 1830: 20 20 20 69 6e 74 65 67 72 69 74 79 20 61 73 73 integrity ass 1840: 65 72 74 20 7b 0a 09 09 21 5b 49 73 42 61 63 6b ert {...![IsBack 1850: 77 61 72 64 20 24 67 72 61 70 68 20 24 6e 6f 72 ward $graph $nor 1860: 6d 61 6c 5d 0a 09 20 20 20 20 7d 20 7b 54 68 65 mal].. } {The 1870: 20 6e 6f 72 6d 61 6c 20 66 72 61 67 6d 65 6e 74 normal fragment 1880: 20 69 73 20 75 6e 65 78 70 65 63 74 65 64 6c 79 is unexpectedly 1890: 20 62 61 63 6b 77 61 72 64 7d 0a 0a 09 20 20 20 backward}... 18a0: 20 73 65 74 20 63 73 65 74 20 24 62 61 63 6b 77 set cset $backw 18b0: 61 72 64 0a 09 7d 0a 09 72 65 74 75 72 6e 0a 20 ard..}..return. 18c0: 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 49 }.. proc I 18d0: 73 42 61 63 6b 77 61 72 64 20 7b 64 67 20 63 73 sBackward {dg cs 18e0: 65 74 7d 20 7b 0a 09 23 20 41 20 62 72 61 6e 63 et} {..# A branc 18f0: 68 20 69 73 20 22 62 61 63 6b 77 61 72 64 22 20 h is "backward" 1900: 69 66 20 69 74 20 68 61 73 20 61 74 20 6c 65 61 if it has at lea 1910: 73 74 20 6f 6e 65 20 69 6e 63 6f 6d 69 6e 67 0a st one incoming. 1920: 09 23 20 72 65 76 69 73 69 6f 6e 20 63 68 61 6e .# revision chan 1930: 67 65 73 65 74 20 77 68 69 63 68 20 69 73 20 63 geset which is c 1940: 6f 6d 6d 69 74 74 65 64 20 61 66 74 65 72 20 61 ommitted after a 1950: 74 20 6c 65 61 73 74 20 6f 6e 65 20 6f 66 0a 09 t least one of.. 1960: 23 20 74 68 65 20 6f 75 74 67 6f 69 6e 67 20 72 # the outgoing r 1970: 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 evision changese 1980: 74 73 2c 20 70 65 72 20 74 68 65 20 6f 72 64 65 ts, per the orde 1990: 72 20 63 6f 6d 70 75 74 65 64 20 62 79 0a 09 23 r computed by..# 19a0: 20 70 61 73 73 20 36 2e 0a 0a 09 23 20 52 65 70 pass 6....# Rep 19b0: 68 72 61 73 65 64 2c 20 74 68 65 20 6d 61 78 69 hrased, the maxi 19c0: 6d 61 6c 20 63 6f 6d 6d 69 74 20 70 6f 73 69 74 mal commit posit 19d0: 69 6f 6e 20 66 6f 75 6e 64 20 61 6d 6f 6e 67 20 ion found among 19e0: 74 68 65 0a 09 23 20 69 6e 63 6f 6d 69 6e 67 20 the..# incoming 19f0: 72 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 73 revision changes 1a00: 65 74 73 20 69 73 20 6c 61 72 67 65 72 20 74 68 ets is larger th 1a10: 61 6e 20 74 68 65 20 6d 69 6e 69 6d 61 6c 0a 09 an the minimal.. 1a20: 23 20 63 6f 6d 6d 69 74 20 70 6f 73 69 74 69 6f # commit positio 1a30: 6e 20 66 6f 75 6e 64 20 61 6d 6f 6e 67 20 74 68 n found among th 1a40: 65 20 6f 75 74 67 6f 69 6e 67 20 72 65 76 69 73 e outgoing revis 1a50: 69 6f 6e 0a 09 23 20 63 68 61 6e 67 65 73 65 74 ion..# changeset 1a60: 73 2e 20 41 73 73 75 6d 69 6e 67 20 74 68 61 74 s. Assuming that 1a70: 20 77 65 20 68 61 76 65 20 62 6f 74 68 20 69 6e we have both in 1a80: 63 6f 6d 69 6e 67 20 61 6e 64 20 6f 75 74 67 6f coming and outgo 1a90: 69 6e 67 0a 09 23 20 72 65 76 69 73 69 6f 6e 20 ing..# revision 1aa0: 63 68 61 6e 67 65 73 65 74 73 20 66 6f 72 20 74 changesets for t 1ab0: 68 65 20 62 72 61 6e 63 68 2e 0a 0a 09 23 20 54 he branch....# T 1ac0: 68 65 20 68 65 6c 70 65 72 20 22 50 6f 73 69 74 he helper "Posit 1ad0: 69 6f 6e 73 22 20 63 6f 6d 70 75 74 65 73 20 74 ions" computes t 1ae0: 68 65 20 73 65 74 20 6f 66 20 63 6f 6d 6d 69 74 he set of commit 1af0: 20 70 6f 73 69 74 69 6f 6e 73 0a 09 23 20 66 6f positions..# fo 1b00: 72 20 61 20 73 65 74 20 6f 66 20 63 68 61 6e 67 r a set of chang 1b10: 65 73 65 74 73 2c 20 77 68 69 63 68 20 63 61 6e esets, which can 1b20: 20 62 65 20 61 20 6d 69 78 20 6f 66 20 72 65 76 be a mix of rev 1b30: 69 73 69 6f 6e 20 61 6e 64 0a 09 23 20 73 79 6d ision and..# sym 1b40: 62 6f 6c 20 63 68 61 6e 67 65 73 65 74 73 2e 0a bol changesets.. 1b50: 0a 09 73 65 74 20 70 72 65 64 65 63 65 73 73 6f ..set predecesso 1b60: 72 73 20 5b 50 6f 73 69 74 69 6f 6e 73 20 5b 24 rs [Positions [$ 1b70: 64 67 20 6e 6f 64 65 73 20 2d 69 6e 20 20 24 63 dg nodes -in $c 1b80: 73 65 74 5d 5d 0a 09 73 65 74 20 73 75 63 63 65 set]]..set succe 1b90: 73 73 6f 72 73 20 20 20 5b 50 6f 73 69 74 69 6f ssors [Positio 1ba0: 6e 73 20 5b 24 64 67 20 6e 6f 64 65 73 20 2d 6f ns [$dg nodes -o 1bb0: 75 74 20 24 63 73 65 74 5d 5d 0a 0a 09 72 65 74 ut $cset]]...ret 1bc0: 75 72 6e 20 5b 65 78 70 72 20 7b 0a 09 09 20 20 urn [expr {... 1bd0: 20 20 20 20 5b 6c 6c 65 6e 67 74 68 20 24 70 72 [llength $pr 1be0: 65 64 65 63 65 73 73 6f 72 73 5d 20 26 26 0a 09 edecessors] &&.. 1bf0: 09 20 20 20 20 20 20 5b 6c 6c 65 6e 67 74 68 20 . [llength 1c00: 24 73 75 63 63 65 73 73 6f 72 73 5d 20 20 20 26 $successors] & 1c10: 26 0a 09 09 20 20 20 20 20 20 28 5b 6d 61 78 20 &... ([max 1c20: 24 70 72 65 64 65 63 65 73 73 6f 72 73 5d 20 3e $predecessors] > 1c30: 3d 20 5b 6d 69 6e 20 24 73 75 63 63 65 73 73 6f = [min $successo 1c40: 72 73 5d 29 0a 09 09 20 20 7d 5d 0a 20 20 20 20 rs])... }]. 1c50: 7d 0a 0a 20 20 20 20 70 72 6f 63 20 50 6f 73 69 }.. proc Posi 1c60: 74 69 6f 6e 73 20 7b 63 68 61 6e 67 65 73 65 74 tions {changeset 1c70: 73 7d 20 7b 0a 09 23 20 54 6f 20 63 6f 6d 70 75 s} {..# To compu 1c80: 74 65 20 74 68 65 20 73 65 74 20 6f 66 20 63 6f te the set of co 1c90: 6d 6d 69 74 20 70 6f 73 69 74 69 6f 6e 73 20 66 mmit positions f 1ca0: 72 6f 6d 20 74 68 65 20 73 65 74 20 6f 66 0a 09 rom the set of.. 1cb0: 23 20 63 68 61 6e 67 65 73 65 74 73 20 77 65 20 # changesets we 1cc0: 66 69 72 73 74 20 6d 61 70 20 65 61 63 68 20 63 first map each c 1cd0: 68 61 6e 67 65 73 65 74 20 74 6f 20 69 74 73 20 hangeset to its 1ce0: 70 6f 73 69 74 69 6f 6e 20 28 2a 29 0a 09 23 20 position (*)..# 1cf0: 61 6e 64 20 74 68 65 6e 20 66 69 6c 74 65 72 20 and then filter 1d00: 6f 75 74 20 74 68 65 20 69 6e 76 61 6c 69 64 20 out the invalid 1d10: 72 65 73 70 6f 6e 73 65 73 20 28 74 68 65 20 65 responses (the e 1d20: 6d 70 74 79 20 73 74 72 69 6e 67 29 0a 09 23 20 mpty string)..# 1d30: 72 65 74 75 72 6e 65 64 20 62 79 20 74 68 65 20 returned by the 1d40: 73 79 6d 62 6f 6c 20 63 68 61 6e 67 65 73 65 74 symbol changeset 1d50: 73 2e 0a 09 23 0a 09 23 20 28 2a 29 20 54 68 69 s...#..# (*) Thi 1d60: 73 20 64 61 74 61 20 77 61 73 20 6c 6f 61 64 65 s data was loade 1d70: 64 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 65 61 d into memory ea 1d80: 72 6c 69 72 20 69 6e 20 74 68 65 20 70 61 73 73 rlir in the pass 1d90: 2c 20 62 79 0a 09 23 20 20 20 20 20 4c 6f 61 64 , by..# Load 1da0: 43 6f 6d 6d 69 74 4f 72 64 65 72 2e 0a 0a 09 72 CommitOrder....r 1db0: 65 74 75 72 6e 20 5b 73 74 72 75 63 74 3a 3a 6c eturn [struct::l 1dc0: 69 73 74 20 66 69 6c 74 65 72 20 5b 73 74 72 75 ist filter [stru 1dd0: 63 74 3a 3a 6c 69 73 74 20 6d 61 70 20 24 63 68 ct::list map $ch 1de0: 61 6e 67 65 73 65 74 73 20 5c 0a 09 09 09 09 09 angesets \...... 1df0: 20 5b 6d 79 70 72 6f 63 20 54 6f 50 6f 73 69 74 [myproc ToPosit 1e00: 69 6f 6e 5d 5d 20 5c 0a 09 09 20 20 20 20 5b 6d ion]] \... [m 1e10: 79 70 72 6f 63 20 56 61 6c 69 64 50 6f 73 69 74 yproc ValidPosit 1e20: 69 6f 6e 5d 5d 0a 20 20 20 20 7d 0a 0a 20 20 20 ion]]. }.. 1e30: 20 70 72 6f 63 20 54 6f 50 6f 73 69 74 69 6f 6e proc ToPosition 1e40: 20 20 20 20 7b 63 73 65 74 7d 20 7b 20 24 63 73 {cset} { $cs 1e50: 65 74 20 70 6f 73 20 7d 0a 20 20 20 20 70 72 6f et pos }. pro 1e60: 63 20 56 61 6c 69 64 50 6f 73 69 74 69 6f 6e 20 c ValidPosition 1e70: 7b 70 6f 73 7d 20 20 7b 20 65 78 70 72 20 7b 24 {pos} { expr {$ 1e80: 70 6f 73 20 6e 65 20 22 22 7d 20 7d 0a 0a 20 20 pos ne ""} }.. 1e90: 20 20 70 72 6f 63 20 43 6f 6d 70 75 74 65 4c 69 proc ComputeLi 1ea0: 6d 69 74 73 20 7b 63 73 65 74 20 6c 76 20 62 76 mits {cset lv bv 1eb0: 7d 20 7b 0a 09 75 70 76 61 72 20 31 20 24 6c 76 } {..upvar 1 $lv 1ec0: 20 74 68 65 6c 69 6d 69 74 73 20 24 62 76 20 62 thelimits $bv b 1ed0: 6f 72 64 65 72 0a 0a 09 23 20 49 6e 69 74 69 61 order...# Initia 1ee0: 6c 69 7a 65 20 74 68 65 20 62 6f 75 6e 64 61 72 lize the boundar 1ef0: 69 65 73 20 66 6f 72 20 61 6c 6c 20 69 74 65 6d ies for all item 1f00: 73 2e 0a 0a 09 61 72 72 61 79 20 73 65 74 20 6c s....array set l 1f10: 69 6d 69 74 73 20 7b 7d 0a 09 66 6f 72 65 61 63 imits {}..foreac 1f20: 68 20 72 65 76 69 73 69 6f 6e 20 5b 24 63 73 65 h revision [$cse 1f30: 74 20 69 74 65 6d 73 5d 20 7b 0a 09 20 20 20 20 t items] {.. 1f40: 73 65 74 20 6c 69 6d 69 74 73 28 24 72 65 76 69 set limits($revi 1f50: 73 69 6f 6e 29 20 7b 30 20 7b 7d 7d 0a 09 7d 0a sion) {0 {}}..}. 1f60: 0a 09 23 20 43 6f 6d 70 75 74 65 20 61 6e 64 20 ..# Compute and 1f70: 73 74 6f 72 65 20 74 68 65 20 6d 61 78 69 6d 61 store the maxima 1f80: 6c 20 70 72 65 64 65 63 65 73 73 6f 72 73 20 70 l predecessors p 1f90: 65 72 20 69 74 65 6d 20 28 62 72 61 6e 63 68 29 er item (branch) 1fa0: 0a 0a 09 66 6f 72 65 61 63 68 20 7b 69 74 65 6d ...foreach {item 1fb0: 20 63 73 65 74 73 7d 20 5b 24 63 73 65 74 20 70 csets} [$cset p 1fc0: 72 65 64 65 63 65 73 73 6f 72 6d 61 70 5d 20 7b redecessormap] { 1fd0: 0a 09 20 20 20 20 73 65 74 20 73 20 5b 50 6f 73 .. set s [Pos 1fe0: 69 74 69 6f 6e 73 20 24 63 73 65 74 73 5d 0a 09 itions $csets].. 1ff0: 20 20 20 20 69 66 20 7b 21 5b 6c 6c 65 6e 67 74 if {![llengt 2000: 68 20 24 73 5d 7d 20 63 6f 6e 74 69 6e 75 65 0a h $s]} continue. 2010: 09 20 20 20 20 73 65 74 20 6c 69 6d 69 74 73 28 . set limits( 2020: 24 69 74 65 6d 29 20 5b 6c 72 65 70 6c 61 63 65 $item) [lreplace 2030: 20 24 6c 69 6d 69 74 73 28 24 69 74 65 6d 29 20 $limits($item) 2040: 30 20 30 20 5b 6d 61 78 20 24 73 5d 5d 0a 09 7d 0 0 [max $s]]..} 2050: 0a 0a 09 23 20 43 6f 6d 70 75 74 65 20 61 6e 64 ...# Compute and 2060: 20 73 74 6f 72 65 20 74 68 65 20 6d 69 6e 69 6d store the minim 2070: 61 6c 20 73 75 63 63 65 73 73 6f 72 73 20 70 65 al successors pe 2080: 72 20 69 74 65 6d 20 28 62 72 61 6e 63 68 29 0a r item (branch). 2090: 0a 09 66 6f 72 65 61 63 68 20 7b 69 74 65 6d 20 ..foreach {item 20a0: 63 73 65 74 73 7d 20 5b 24 63 73 65 74 20 73 75 csets} [$cset su 20b0: 63 63 65 73 73 6f 72 6d 61 70 5d 20 7b 0a 09 20 ccessormap] {.. 20c0: 20 20 20 73 65 74 20 73 20 5b 50 6f 73 69 74 69 set s [Positi 20d0: 6f 6e 73 20 24 63 73 65 74 73 5d 0a 09 20 20 20 ons $csets].. 20e0: 20 69 66 20 7b 21 5b 6c 6c 65 6e 67 74 68 20 24 if {![llength $ 20f0: 73 5d 7d 20 63 6f 6e 74 69 6e 75 65 0a 09 20 20 s]} continue.. 2100: 20 20 73 65 74 20 6c 69 6d 69 74 73 28 24 69 74 set limits($it 2110: 65 6d 29 20 5b 6c 72 65 70 6c 61 63 65 20 24 6c em) [lreplace $l 2120: 69 6d 69 74 73 28 24 69 74 65 6d 29 20 31 20 31 imits($item) 1 1 2130: 20 5b 6d 69 6e 20 24 73 5d 5d 0a 09 7d 0a 0a 09 [min $s]]..}... 2140: 23 20 43 68 65 63 6b 20 74 68 61 74 20 74 68 65 # Check that the 2150: 20 6f 72 64 65 72 69 6e 67 20 61 74 20 74 68 65 ordering at the 2160: 20 66 69 6c 65 20 6c 65 76 65 6c 20 69 73 20 63 file level is c 2170: 6f 72 72 65 63 74 2e 20 57 65 0a 09 23 20 63 61 orrect. We..# ca 2180: 6e 6e 6f 74 20 68 61 76 65 20 62 61 63 6b 77 61 nnot have backwa 2190: 72 64 20 6f 72 64 65 72 69 6e 67 20 70 65 72 20 rd ordering per 21a0: 62 72 61 6e 63 68 2c 20 6f 72 20 73 6f 6d 65 74 branch, or somet 21b0: 68 69 6e 67 20 69 73 0a 09 23 20 77 72 6f 6e 67 hing is..# wrong 21c0: 2e 0a 0a 09 66 6f 72 65 61 63 68 20 69 74 65 6d ....foreach item 21d0: 20 5b 61 72 72 61 79 20 6e 61 6d 65 73 20 6c 69 [array names li 21e0: 6d 69 74 73 5d 20 7b 0a 09 20 20 20 20 73 74 72 mits] {.. str 21f0: 75 63 74 3a 3a 6c 69 73 74 20 61 73 73 69 67 6e uct::list assign 2200: 20 24 6c 69 6d 69 74 73 28 24 69 74 65 6d 29 20 $limits($item) 2210: 6d 61 78 70 20 6d 69 6e 73 0a 09 20 20 20 20 23 maxp mins.. # 2220: 20 48 61 6e 64 6c 65 20 6d 69 6e 20 73 75 63 63 Handle min succ 2230: 65 73 73 6f 72 20 70 6f 73 69 74 69 6f 6e 20 22 essor position " 2240: 22 20 61 73 20 72 65 70 72 65 73 65 6e 74 69 6e " as representin 2250: 67 20 69 6e 66 69 6e 69 74 79 0a 09 20 20 20 20 g infinity.. 2260: 69 6e 74 65 67 72 69 74 79 20 61 73 73 65 72 74 integrity assert 2270: 20 7b 0a 09 09 28 24 6d 69 6e 73 20 65 71 20 22 {...($mins eq " 2280: 22 29 20 7c 7c 20 28 24 6d 61 78 70 20 3c 20 24 ") || ($maxp < $ 2290: 6d 69 6e 73 29 20 0a 09 20 20 20 20 7d 20 7b 49 mins) .. } {I 22a0: 74 65 6d 20 3c 24 69 74 65 6d 3e 20 69 73 20 62 tem <$item> is b 22b0: 61 63 6b 77 61 72 64 20 61 74 20 66 69 6c 65 20 ackward at file 22c0: 6c 65 76 65 6c 20 28 24 6d 61 78 70 20 3e 3d 20 level ($maxp >= 22d0: 24 6d 69 6e 73 29 7d 0a 09 7d 0a 0a 09 23 20 53 $mins)}..}...# S 22e0: 61 76 65 20 74 68 65 20 6c 69 6d 69 74 73 20 66 ave the limits f 22f0: 6f 72 20 74 68 65 20 73 70 6c 69 74 74 65 72 2c or the splitter, 2300: 20 61 6e 64 20 63 6f 6d 70 75 74 65 20 74 68 65 and compute the 2310: 20 62 6f 72 64 65 72 20 61 74 0a 09 23 20 77 68 border at..# wh 2320: 69 63 68 20 74 6f 20 73 70 6c 69 74 20 61 73 20 ich to split as 2330: 74 68 65 20 6d 69 6e 69 6d 75 6d 20 6f 66 20 61 the minimum of a 2340: 6c 6c 20 6d 69 6e 69 6d 61 6c 20 73 75 63 63 65 ll minimal succe 2350: 73 73 6f 72 0a 09 23 20 70 6f 73 69 74 69 6f 6e ssor..# position 2360: 73 2e 0a 0a 09 73 65 74 20 74 68 65 6c 69 6d 69 s....set thelimi 2370: 74 73 20 5b 61 72 72 61 79 20 67 65 74 20 6c 69 ts [array get li 2380: 6d 69 74 73 5d 0a 09 73 65 74 20 62 6f 72 64 65 mits]..set borde 2390: 72 20 5b 6d 69 6e 20 5b 73 74 72 75 63 74 3a 3a r [min [struct:: 23a0: 6c 69 73 74 20 66 69 6c 74 65 72 20 5b 73 74 72 list filter [str 23b0: 75 63 74 3a 3a 6c 69 73 74 20 6d 61 70 20 5b 56 uct::list map [V 23c0: 61 6c 75 65 73 20 24 74 68 65 6c 69 6d 69 74 73 alues $thelimits 23d0: 5d 20 5c 0a 09 09 09 09 09 09 20 20 5b 6d 79 70 ] \....... [myp 23e0: 72 6f 63 20 4d 69 6e 53 75 63 63 65 73 73 6f 72 roc MinSuccessor 23f0: 50 6f 73 69 74 69 6f 6e 5d 5d 20 5c 0a 09 09 09 Position]] \.... 2400: 20 20 20 20 20 5b 6d 79 70 72 6f 63 20 56 61 6c [myproc Val 2410: 69 64 50 6f 73 69 74 69 6f 6e 5d 5d 5d 0a 09 72 idPosition]]]..r 2420: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 eturn. }.. 2430: 20 70 72 6f 63 20 56 61 6c 75 65 73 20 7b 64 69 proc Values {di 2440: 63 74 7d 20 7b 0a 09 73 65 74 20 72 65 73 20 7b ct} {..set res { 2450: 7d 0a 09 66 6f 72 65 61 63 68 20 7b 6b 20 76 7d }..foreach {k v} 2460: 20 24 64 69 63 74 20 7b 20 6c 61 70 70 65 6e 64 $dict { lappend 2470: 20 72 65 73 20 24 76 20 7d 0a 09 72 65 74 75 72 res $v }..retur 2480: 6e 20 24 72 65 73 0a 20 20 20 20 7d 0a 0a 20 20 n $res. }.. 2490: 20 20 70 72 6f 63 20 4d 69 6e 53 75 63 63 65 73 proc MinSucces 24a0: 73 6f 72 50 6f 73 69 74 69 6f 6e 20 7b 69 74 65 sorPosition {ite 24b0: 6d 7d 20 7b 20 6c 69 6e 64 65 78 20 24 69 74 65 m} { lindex $ite 24c0: 6d 20 31 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 m 1 }.. proc 24d0: 53 70 6c 69 74 49 74 65 6d 73 20 7b 6c 69 6d 69 SplitItems {limi 24e0: 74 73 20 62 6f 72 64 65 72 20 6e 76 20 62 76 7d ts border nv bv} 24f0: 20 7b 0a 09 75 70 76 61 72 20 31 20 24 6e 76 20 {..upvar 1 $nv 2500: 6e 6f 72 6d 61 6c 69 74 65 6d 73 20 24 62 76 20 normalitems $bv 2510: 62 61 63 6b 77 61 72 64 69 74 65 6d 73 0a 0a 09 backwarditems... 2520: 73 65 74 20 6e 6f 72 6d 61 6c 69 74 65 6d 73 20 set normalitems 2530: 20 20 7b 7d 0a 09 73 65 74 20 62 61 63 6b 77 61 {}..set backwa 2540: 72 64 69 74 65 6d 73 20 7b 7d 0a 0a 09 66 6f 72 rditems {}...for 2550: 65 61 63 68 20 7b 72 65 76 20 76 7d 20 24 6c 69 each {rev v} $li 2560: 6d 69 74 73 20 7b 0a 09 20 20 20 20 73 74 72 75 mits {.. stru 2570: 63 74 3a 3a 6c 69 73 74 20 61 73 73 69 67 6e 20 ct::list assign 2580: 24 76 20 6d 61 78 70 20 6d 69 6e 73 0a 09 20 20 $v maxp mins.. 2590: 20 20 69 66 20 7b 24 6d 61 78 70 20 3e 3d 20 24 if {$maxp >= $ 25a0: 62 6f 72 64 65 72 7d 20 7b 0a 09 09 6c 61 70 70 border} {...lapp 25b0: 65 6e 64 20 62 61 63 6b 77 61 72 64 69 74 65 6d end backwarditem 25c0: 73 20 20 24 72 65 76 0a 09 20 20 20 20 7d 20 65 s $rev.. } e 25d0: 6c 73 65 20 7b 0a 09 09 6c 61 70 70 65 6e 64 20 lse {...lappend 25e0: 6e 6f 72 6d 61 6c 69 74 65 6d 73 20 24 72 65 76 normalitems $rev 25f0: 0a 09 20 20 20 20 7d 0a 09 7d 0a 0a 09 69 6e 74 .. }..}...int 2600: 65 67 72 69 74 79 20 61 73 73 65 72 74 20 7b 5b egrity assert {[ 2610: 6c 6c 65 6e 67 74 68 20 24 6e 6f 72 6d 61 6c 69 llength $normali 2620: 74 65 6d 73 5d 7d 20 20 20 7b 53 65 74 20 6f 66 tems]} {Set of 2630: 20 6e 6f 72 6d 61 6c 20 69 74 65 6d 73 20 69 73 normal items is 2640: 20 65 6d 70 74 79 7d 0a 09 69 6e 74 65 67 72 69 empty}..integri 2650: 74 79 20 61 73 73 65 72 74 20 7b 5b 6c 6c 65 6e ty assert {[llen 2660: 67 74 68 20 24 62 61 63 6b 77 61 72 64 69 74 65 gth $backwardite 2670: 6d 73 5d 7d 20 7b 53 65 74 20 6f 66 20 62 61 63 ms]} {Set of bac 2680: 6b 77 61 72 64 20 69 74 65 6d 73 20 69 73 20 65 kward items is e 2690: 6d 70 74 79 7d 0a 09 72 65 74 75 72 6e 0a 20 20 mpty}..return. 26a0: 20 20 7d 0a 0a 0a 20 20 20 20 23 20 23 20 23 23 }... # # ## 26b0: 20 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23 ### ##### ##### 26c0: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 ### ############ 26d0: 23 0a 0a 20 20 20 20 70 72 6f 63 20 4b 65 65 70 #.. proc Keep 26e0: 4f 72 64 65 72 20 7b 67 72 61 70 68 20 61 74 20 Order {graph at 26f0: 63 73 65 74 7d 20 7b 0a 09 3a 3a 76 61 72 69 61 cset} {..::varia 2700: 62 6c 65 20 6d 79 61 74 66 6d 74 0a 09 3a 3a 76 ble myatfmt..::v 2710: 61 72 69 61 62 6c 65 20 6d 79 63 73 66 6d 74 0a ariable mycsfmt. 2720: 0a 09 73 65 74 20 63 69 64 20 5b 24 63 73 65 74 ..set cid [$cset 2730: 20 69 64 5d 0a 0a 09 6c 6f 67 20 77 72 69 74 65 id]...log write 2740: 20 38 20 62 72 65 61 6b 61 63 79 63 6c 65 20 22 8 breakacycle " 2750: 43 68 61 6e 67 65 73 65 74 20 40 20 5b 66 6f 72 Changeset @ [for 2760: 6d 61 74 20 24 6d 79 61 74 66 6d 74 20 24 61 74 mat $myatfmt $at 2770: 5d 3a 20 5b 66 6f 72 6d 61 74 20 24 6d 79 63 73 ]: [format $mycs 2780: 66 6d 74 20 5b 24 63 73 65 74 20 73 74 72 5d 5d fmt [$cset str]] 2790: 20 3c 3c 5b 46 6f 72 6d 61 74 54 52 20 24 67 72 <<[FormatTR $gr 27a0: 61 70 68 20 24 63 73 65 74 5d 3e 3e 22 0a 0a 09 aph $cset]>>"... 27b0: 23 20 57 65 20 73 65 65 20 68 65 72 65 20 61 20 # We see here a 27c0: 6d 69 78 74 75 72 65 20 6f 66 20 73 79 6d 62 6f mixture of symbo 27d0: 6c 20 61 6e 64 20 72 65 76 69 73 69 6f 6e 20 63 l and revision c 27e0: 68 61 6e 67 65 73 65 74 73 2e 0a 09 23 20 54 68 hangesets...# Th 27f0: 65 20 73 79 6d 62 6f 6c 20 63 68 61 6e 67 65 73 e symbol changes 2800: 65 74 73 20 61 72 65 20 69 67 6e 6f 72 65 64 20 ets are ignored 2810: 61 73 20 69 72 72 65 6c 65 76 61 6e 74 2e 0a 0a as irrelevant... 2820: 09 69 66 20 7b 5b 24 63 73 65 74 20 70 6f 73 5d .if {[$cset pos] 2830: 20 65 71 20 22 22 7d 20 72 65 74 75 72 6e 0a 0a eq ""} return.. 2840: 09 23 20 46 6f 72 20 74 68 65 20 72 65 76 69 73 .# For the revis 2850: 69 6f 6e 20 63 68 61 6e 67 65 73 65 74 73 20 77 ion changesets w 2860: 65 20 61 72 65 20 73 75 72 65 20 74 68 61 74 20 e are sure that 2870: 74 68 65 79 20 61 72 65 0a 09 23 20 63 6f 6e 73 they are..# cons 2880: 75 6d 65 64 20 69 6e 20 74 68 65 20 73 61 6d 65 umed in the same 2890: 20 6f 72 64 65 72 20 61 73 20 67 65 6e 65 72 61 order as genera 28a0: 74 65 64 20 62 79 20 70 61 73 73 20 37 0a 09 23 ted by pass 7..# 28b0: 20 28 52 65 76 54 6f 70 6f 6c 6f 67 69 63 61 6c (RevTopological 28c0: 53 6f 72 74 29 2e 20 50 65 72 20 74 68 65 20 63 Sort). Per the c 28d0: 6f 64 65 20 69 6e 20 63 76 73 32 73 76 6e 2e 0a ode in cvs2svn.. 28e0: 0a 09 23 20 54 68 69 73 20 77 6f 72 6b 73 20 69 ..# This works i 28f0: 66 20 61 6e 64 20 6f 6e 6c 79 20 69 66 20 6e 6f f and only if no 2900: 6e 65 20 6f 66 20 74 68 65 20 73 79 6d 62 6f 6c ne of the symbol 2910: 20 63 68 61 6e 67 65 73 65 74 73 20 61 72 65 0a changesets are. 2920: 09 23 20 22 62 61 63 6b 77 61 72 64 73 22 2c 20 .# "backwards", 2930: 68 65 6e 63 65 20 6f 75 72 20 62 72 65 61 6b 69 hence our breaki 2940: 6e 67 20 6f 66 20 74 68 65 20 62 61 63 6b 77 61 ng of the backwa 2950: 72 64 20 63 68 61 6e 67 65 73 65 74 73 0a 09 23 rd changesets..# 2960: 20 66 69 72 73 74 2c 20 69 6e 20 74 68 65 20 70 first, in the p 2970: 72 65 2d 68 6f 6f 6b 2e 0a 0a 09 23 20 4e 6f 74 re-hook....# Not 2980: 65 20 74 68 61 74 20 74 61 68 20 63 68 61 6e 67 e that tah chang 2990: 65 73 65 74 73 20 63 61 6e 6e 6f 74 20 62 65 20 esets cannot be 29a0: 62 61 63 6b 77 61 72 64 20 61 73 20 74 68 65 79 backward as they 29b0: 20 64 6f 6e 27 74 0a 09 23 20 68 61 76 65 20 73 don't..# have s 29c0: 75 63 63 65 73 73 6f 72 73 20 61 74 20 61 6c 6c uccessors at all 29d0: 2e 0a 0a 09 23 20 41 6e 20 69 6e 74 65 72 65 73 ....# An interes 29e0: 74 69 6e 67 20 74 68 69 6e 67 20 49 4d 48 4f 2c ting thing IMHO, 29f0: 20 69 73 20 74 68 61 74 20 61 66 74 65 72 20 62 is that after b 2a00: 72 65 61 6b 69 6e 67 20 74 68 65 0a 09 23 20 62 reaking the..# b 2a10: 61 63 6b 77 61 72 64 20 73 79 6d 62 6f 6c 20 63 ackward symbol c 2a20: 68 61 6e 67 65 73 65 74 73 20 77 65 20 73 68 6f hangesets we sho 2a30: 75 6c 64 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 uld not have any 2a40: 20 63 69 72 63 6c 65 73 0a 09 23 20 61 6e 79 20 circles..# any 2a50: 6c 6f 6e 67 65 72 2e 20 45 61 63 68 20 63 69 72 longer. Each cir 2a60: 63 6c 65 20 77 68 69 63 68 20 77 6f 75 6c 64 20 cle which would 2a70: 73 74 69 6c 6c 20 62 65 20 70 72 65 73 65 6e 74 still be present 2a80: 20 68 61 73 20 74 6f 0a 09 23 20 69 6e 76 6f 6c has to..# invol 2a90: 76 65 20 61 20 62 61 63 6b 77 61 72 64 20 73 79 ve a backward sy 2aa0: 6d 62 6f 6c 2c 20 61 6e 64 20 77 65 20 73 70 6c mbol, and we spl 2ab0: 69 74 20 74 68 65 6d 20 61 6c 6c 2c 20 73 6f 20 it them all, so 2ac0: 74 68 65 72 65 0a 09 23 20 63 61 6e 27 74 20 62 there..# can't b 2ad0: 65 20 61 20 63 69 72 63 6c 65 2e 2e 0a 0a 09 23 e a circle.....# 2ae0: 20 50 72 6f 6f 66 3a 0a 09 23 20 4c 65 74 20 75 Proof:..# Let u 2af0: 73 20 61 73 73 75 6d 65 20 77 65 20 74 68 61 74 s assume we that 2b00: 20 68 61 76 65 20 61 20 63 69 72 63 6c 65 0a 09 have a circle.. 2b10: 23 20 09 43 3a 20 52 31 20 2d 3e 20 2e 2e 2e 20 # .C: R1 -> ... 2b20: 2d 3e 20 52 78 20 2d 3e 20 53 20 2d 3e 20 52 79 -> Rx -> S -> Ry 2b30: 20 2d 3e 20 2e 2e 2e 20 2d 3e 20 52 6e 20 2d 3e -> ... -> Rn -> 2b40: 20 52 31 0a 09 23 20 4c 65 74 20 75 73 20 66 75 R1..# Let us fu 2b50: 72 74 68 65 72 20 61 73 73 75 6d 65 20 74 68 61 rther assume tha 2b60: 74 20 74 68 65 20 73 79 6d 62 6f 6c 20 63 68 61 t the symbol cha 2b70: 6e 67 65 73 65 74 20 53 20 69 6e 20 74 68 61 74 ngeset S in that 2b80: 0a 09 23 20 63 69 72 63 6c 65 20 69 73 20 6e 6f ..# circle is no 2b90: 74 20 62 61 63 6b 77 61 72 64 2e 20 54 68 61 74 t backward. That 2ba0: 20 6d 65 61 6e 73 20 4f 52 44 28 52 78 29 20 3c means ORD(Rx) < 2bb0: 20 4f 52 44 28 52 79 29 2e 20 20 54 68 65 0a 09 ORD(Ry). The.. 2bc0: 23 20 65 61 72 6c 69 65 72 20 74 6f 70 6f 6c 6f # earlier topolo 2bd0: 67 69 63 61 6c 20 73 6f 72 74 69 6e 67 20 77 69 gical sorting wi 2be0: 74 68 6f 75 74 20 73 79 6d 62 6f 6c 73 20 6e 6f thout symbols no 2bf0: 77 20 66 6f 72 63 65 73 20 74 68 69 73 0a 09 23 w forces this..# 2c00: 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 20 74 68 relationship th 2c10: 72 6f 75 67 68 20 74 6f 20 62 65 20 4f 52 44 28 rough to be ORD( 2c20: 52 78 29 20 3c 20 4f 52 44 28 52 31 29 20 3c 20 Rx) < ORD(R1) < 2c30: 4f 52 44 28 52 78 29 2e 20 20 57 65 0a 09 23 20 ORD(Rx). We..# 2c40: 68 61 76 65 20 72 65 61 63 68 65 64 20 61 6e 20 have reached an 2c50: 69 6d 70 6f 73 73 69 62 69 6c 69 74 79 2c 20 61 impossibility, a 2c60: 20 70 61 72 61 64 6f 78 2e 20 4f 75 72 20 69 6e paradox. Our in 2c70: 69 74 69 61 6c 0a 09 23 20 61 73 73 75 6d 70 74 itial..# assumpt 2c80: 69 6f 6e 20 6f 66 20 53 20 6e 6f 74 20 62 65 69 ion of S not bei 2c90: 6e 67 20 62 61 63 6b 77 61 72 64 20 63 61 6e 6e ng backward cann 2ca0: 6f 74 20 68 6f 6c 64 2e 0a 09 23 0a 09 23 20 41 ot hold...#..# A 2cb0: 6c 74 65 72 6e 61 74 65 2c 20 64 69 72 65 63 74 lternate, direct 2cc0: 2c 20 72 65 61 73 6f 6e 69 6e 67 3a 20 57 69 74 , reasoning: Wit 2cd0: 68 6f 75 74 20 53 20 74 68 65 20 63 68 61 69 6e hout S the chain 2ce0: 20 6f 66 0a 09 23 20 64 65 70 65 6e 64 65 6e 63 of..# dependenc 2cf0: 69 65 73 20 69 73 20 52 79 20 2d 3e 20 2e 2e 20 ies is Ry -> .. 2d00: 2d 3e 20 52 31 20 2d 3e 20 2e 2e 20 2d 3e 20 52 -> R1 -> .. -> R 2d10: 78 2c 20 74 68 65 72 65 66 6f 72 65 0a 09 23 20 x, therefore..# 2d20: 4f 52 44 28 52 79 29 20 3c 20 4f 52 44 28 52 78 ORD(Ry) < ORD(Rx 2d30: 29 20 68 6f 6c 64 73 2c 20 61 6e 64 20 74 68 69 ) holds, and thi 2d40: 73 20 6d 65 61 6e 73 20 53 20 69 73 20 62 61 63 s means S is bac 2d50: 6b 77 61 72 64 2e 0a 0a 09 73 74 72 75 63 74 3a kward....struct: 2d60: 3a 73 65 74 20 65 78 63 6c 75 64 65 20 6d 79 72 :set exclude myr 2d70: 65 76 69 73 69 6f 6e 63 68 61 6e 67 65 73 65 74 evisionchangeset 2d80: 73 20 24 63 73 65 74 0a 0a 09 3a 3a 76 61 72 69 s $cset...::vari 2d90: 61 62 6c 65 20 6d 79 6c 61 73 74 70 6f 73 0a 09 able mylastpos.. 2da0: 73 65 74 20 6e 65 77 20 5b 24 63 73 65 74 20 70 set new [$cset p 2db0: 6f 73 5d 0a 0a 09 69 66 20 7b 24 6e 65 77 20 21 os]...if {$new ! 2dc0: 3d 20 28 24 6d 79 6c 61 73 74 70 6f 73 20 2b 20 = ($mylastpos + 2dd0: 31 29 7d 20 7b 0a 09 20 20 20 20 69 66 20 7b 24 1)} {.. if {$ 2de0: 6d 79 6c 61 73 74 70 6f 73 20 3c 20 30 7d 20 7b mylastpos < 0} { 2df0: 0a 09 09 73 65 74 20 6f 6c 64 20 22 3c 4e 4f 4e ...set old "<NON 2e00: 45 3e 22 0a 09 20 20 20 20 7d 20 65 6c 73 65 20 E>".. } else 2e10: 7b 0a 09 09 3a 3a 76 61 72 69 61 62 6c 65 20 6d {...::variable m 2e20: 79 63 73 65 74 0a 09 09 73 65 74 20 6f 6c 64 20 ycset...set old 2e30: 5b 24 6d 79 63 73 65 74 28 24 6d 79 6c 61 73 74 [$mycset($mylast 2e40: 70 6f 73 29 20 73 74 72 5d 40 24 6d 79 6c 61 73 pos) str]@$mylas 2e50: 74 70 6f 73 0a 09 20 20 20 20 7d 0a 0a 09 20 20 tpos.. }... 2e60: 20 20 69 6e 74 65 67 72 69 74 79 20 61 73 73 65 integrity asse 2e70: 72 74 20 30 20 7b 4f 72 64 65 72 69 6e 67 20 6f rt 0 {Ordering o 2e80: 66 20 72 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 f revision chang 2e90: 65 73 65 74 73 20 76 69 6f 6c 61 74 65 64 2c 20 esets violated, 2ea0: 5b 24 63 73 65 74 20 73 74 72 5d 40 24 6e 65 77 [$cset str]@$new 2eb0: 20 69 73 20 6e 6f 74 20 69 6d 6d 65 64 69 61 74 is not immediat 2ec0: 65 6c 79 20 61 66 74 65 72 20 24 6f 6c 64 7d 0a ely after $old}. 2ed0: 09 7d 0a 0a 09 73 65 74 20 6d 79 6c 61 73 74 70 .}...set mylastp 2ee0: 6f 73 20 24 6e 65 77 0a 09 72 65 74 75 72 6e 0a os $new..return. 2ef0: 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 }.. proc 2f00: 46 6f 72 6d 61 74 54 52 20 7b 67 72 61 70 68 20 FormatTR {graph 2f10: 63 73 65 74 7d 20 7b 0a 09 72 65 74 75 72 6e 20 cset} {..return 2f20: 5b 6a 6f 69 6e 20 5b 73 74 72 75 63 74 3a 3a 6c [join [struct::l 2f30: 69 73 74 20 6d 61 70 20 5b 24 67 72 61 70 68 20 ist map [$graph 2f40: 6e 6f 64 65 20 73 65 74 20 24 63 73 65 74 20 74 node set $cset t 2f50: 69 6d 65 72 61 6e 67 65 5d 20 7b 63 6c 6f 63 6b imerange] {clock 2f60: 20 66 6f 72 6d 61 74 7d 5d 20 7b 20 2d 2d 20 7d format}] { -- } 2f70: 5d 0a 20 20 20 20 7d 0a 0a 20 20 20 20 74 79 70 ]. }.. typ 2f80: 65 76 61 72 69 61 62 6c 65 20 6d 79 6c 61 73 74 evariable mylast 2f90: 70 6f 73 20 20 20 20 20 20 20 20 20 20 20 20 2d pos - 2fa0: 31 20 3b 20 23 20 50 6f 73 69 74 69 6f 6e 20 6f 1 ; # Position o 2fb0: 66 20 6c 61 73 74 20 72 65 76 69 73 69 6f 6e 20 f last revision 2fc0: 63 68 61 6e 67 65 73 65 74 20 73 61 76 65 64 2e changeset saved. 2fd0: 0a 20 20 20 20 74 79 70 65 76 61 72 69 61 62 6c . typevariabl 2fe0: 65 20 6d 79 72 65 76 69 73 69 6f 6e 63 68 61 6e e myrevisionchan 2ff0: 67 65 73 65 74 73 20 7b 7d 20 3b 20 23 20 53 65 gesets {} ; # Se 3000: 74 20 6f 66 20 72 65 76 69 73 69 6f 6e 20 63 68 t of revision ch 3010: 61 6e 67 65 73 65 74 73 0a 0a 20 20 20 20 74 79 angesets.. ty 3020: 70 65 76 61 72 69 61 62 6c 65 20 6d 79 61 74 66 pevariable myatf 3030: 6d 74 20 3b 20 23 20 46 6f 72 6d 61 74 20 66 6f mt ; # Format fo 3040: 72 20 6c 6f 67 20 6f 75 74 70 75 74 20 74 6f 20 r log output to 3050: 67 61 69 6e 20 62 65 74 74 65 72 20 61 6c 69 67 gain better alig 3060: 6e 6d 65 6e 74 20 6f 66 20 74 68 65 20 76 61 72 nment of the var 3070: 69 6f 75 73 20 63 6f 6c 75 6d 6e 73 2e 0a 20 20 ious columns.. 3080: 20 20 74 79 70 65 76 61 72 69 61 62 6c 65 20 6d typevariable m 3090: 79 63 73 66 6d 74 20 3b 20 23 20 44 69 74 74 6f ycsfmt ; # Ditto 30a0: 20 66 6f 72 20 74 68 65 20 63 68 61 6e 67 65 73 for the changes 30b0: 65 74 73 2e 0a 0a 20 20 20 20 23 20 23 20 23 23 ets... # # ## 30c0: 20 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23 ### ##### ##### 30d0: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 ### ############ 30e0: 23 0a 0a 20 20 20 20 74 79 70 65 76 61 72 69 61 #.. typevaria 30f0: 62 6c 65 20 6d 79 63 73 65 74 20 2d 61 72 72 61 ble mycset -arra 3100: 79 20 7b 7d 20 3b 20 23 20 4d 61 70 20 66 72 6f y {} ; # Map fro 3110: 6d 20 63 6f 6d 6d 69 74 20 70 6f 73 69 74 69 6f m commit positio 3120: 6e 73 20 74 6f 20 74 68 65 0a 09 09 09 09 20 20 ns to the..... 3130: 20 20 23 20 63 68 61 6e 67 65 73 65 74 20 28 6f # changeset (o 3140: 62 6a 65 63 74 20 72 65 66 29 20 61 74 20 74 68 bject ref) at th 3150: 61 74 0a 09 09 09 09 20 20 20 20 23 20 70 6f 73 at..... # pos 3160: 69 74 69 6f 6e 2e 0a 0a 20 20 20 20 23 20 23 20 ition... # # 3170: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 ## ### ##### ### 3180: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ########## 3190: 23 23 23 0a 20 20 20 20 23 23 20 43 6f 6e 66 69 ###. ## Confi 31a0: 67 75 72 61 74 69 6f 6e 0a 0a 20 20 20 20 70 72 guration.. pr 31b0: 61 67 6d 61 20 2d 68 61 73 69 6e 73 74 61 6e 63 agma -hasinstanc 31c0: 65 73 20 20 20 6e 6f 20 3b 20 23 20 73 69 6e 67 es no ; # sing 31d0: 6c 65 74 6f 6e 0a 20 20 20 20 70 72 61 67 6d 61 leton. pragma 31e0: 20 2d 68 61 73 74 79 70 65 69 6e 66 6f 20 20 20 -hastypeinfo 31f0: 20 6e 6f 20 3b 20 23 20 6e 6f 20 69 6e 74 72 6f no ; # no intro 3200: 73 70 65 63 74 69 6f 6e 0a 20 20 20 20 70 72 61 spection. pra 3210: 67 6d 61 20 2d 68 61 73 74 79 70 65 64 65 73 74 gma -hastypedest 3220: 72 6f 79 20 6e 6f 20 3b 20 23 20 69 6d 6d 6f 72 roy no ; # immor 3230: 74 61 6c 0a 0a 20 20 20 20 23 20 23 20 23 23 20 tal.. # # ## 3240: 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23 23 ### ##### ###### 3250: 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23 ## ############# 3260: 0a 7d 0a 0a 6e 61 6d 65 73 70 61 63 65 20 65 76 .}..namespace ev 3270: 61 6c 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a al ::vc::fossil: 3280: 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 :import::cvs::pa 3290: 73 73 20 7b 0a 20 20 20 20 6e 61 6d 65 73 70 61 ss {. namespa 32a0: 63 65 20 65 78 70 6f 72 74 20 62 72 65 61 6b 61 ce export breaka 32b0: 63 79 63 6c 65 0a 20 20 20 20 6e 61 6d 65 73 70 cycle. namesp 32c0: 61 63 65 20 65 76 61 6c 20 62 72 65 61 6b 61 63 ace eval breakac 32d0: 79 63 6c 65 20 7b 0a 09 6e 61 6d 65 73 70 61 63 ycle {..namespac 32e0: 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 e import ::vc::f 32f0: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c 3300: 76 73 3a 3a 63 79 63 6c 65 62 72 65 61 6b 65 72 vs::cyclebreaker 3310: 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f ..namespace impo 3320: 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a rt ::vc::fossil: 3330: 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 72 65 :import::cvs::re 3340: 70 6f 73 69 74 6f 72 79 0a 09 6e 61 6d 65 73 70 pository..namesp 3350: 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a ace import ::vc: 3360: 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a :fossil::import: 3370: 3a 63 76 73 3a 3a 73 74 61 74 65 0a 09 6e 61 6d :cvs::state..nam 3380: 65 73 70 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a espace import :: 3390: 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f vc::fossil::impo 33a0: 72 74 3a 3a 63 76 73 3a 3a 69 6e 74 65 67 72 69 rt::cvs::integri 33b0: 74 79 0a 09 6e 61 6d 65 73 70 61 63 65 20 65 76 ty..namespace ev 33c0: 61 6c 20 70 72 6f 6a 65 63 74 20 7b 0a 09 20 20 al project {.. 33d0: 20 20 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f namespace impo 33e0: 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a rt ::vc::fossil: 33f0: 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 72 :import::cvs::pr 3400: 6f 6a 65 63 74 3a 3a 72 65 76 0a 09 7d 0a 09 6e oject::rev..}..n 3410: 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74 20 amespace import 3420: 3a 3a 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6d 69 73 ::vc::tools::mis 3430: 63 3a 3a 2a 0a 09 6e 61 6d 65 73 70 61 63 65 20 c::*..namespace 3440: 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 74 6f 6f import ::vc::too 3450: 6c 73 3a 3a 74 72 6f 75 62 6c 65 0a 09 6e 61 6d ls::trouble..nam 3460: 65 73 70 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a espace import :: 3470: 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6c 6f 67 0a 09 vc::tools::log.. 3480: 6c 6f 67 20 72 65 67 69 73 74 65 72 20 62 72 65 log register bre 3490: 61 6b 61 63 79 63 6c 65 0a 20 20 20 20 7d 0a 7d akacycle. }.} 34a0: 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 23 ..# # ## ### ### 34b0: 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 ## ######## #### 34c0: 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 ######### ###### 34d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a ###############. 34e0: 23 23 20 52 65 61 64 79 0a 0a 70 61 63 6b 61 67 ## Ready..packag 34f0: 65 20 70 72 6f 76 69 64 65 20 76 63 3a 3a 66 6f e provide vc::fo 3500: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 ssil::import::cv 3510: 73 3a 3a 70 61 73 73 3a 3a 62 72 65 61 6b 61 63 s::pass::breakac 3520: 79 63 6c 65 20 31 2e 30 0a 72 65 74 75 72 6e 0a ycle 1.0.return.