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 56 2e 20 54 68 69 73 20 70 61 73 73 20 63 s V. This pass c
0210: 72 65 61 74 65 73 20 74 68 65 20 69 6e 69 74 69 reates the initi
0220: 61 6c 20 73 65 74 20 6f 66 20 70 72 6f 6a 65 63 al set of projec
0230: 74 20 6c 65 76 65 6c 0a 23 23 20 72 65 76 69 73 t level.## revis
0240: 69 6f 6e 73 2c 20 61 6b 61 20 63 68 61 6e 67 65 ions, aka change
0250: 73 65 74 73 2e 20 4c 61 74 65 72 20 70 61 73 73 sets. Later pass
0260: 65 73 20 77 69 6c 6c 20 72 65 66 69 6e 65 20 74 es will refine t
0270: 68 65 6d 2c 20 70 75 74 73 20 74 68 65 6d 0a 23 hem, puts them.#
0280: 23 20 69 6e 74 6f 20 70 72 6f 70 65 72 20 6f 72 # into proper or
0290: 64 65 72 2c 20 73 65 74 20 74 68 65 69 72 20 64 der, set their d
02a0: 65 70 65 6e 64 65 6e 63 69 65 73 2c 20 65 74 63 ependencies, etc
02b0: 2e 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 ...# # ## ### ##
02c0: 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 ### ######## ###
02d0: 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23 ########## #####
02e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
02f0: 0a 23 23 20 52 65 71 75 69 72 65 6d 65 6e 74 73 .## Requirements
0300: 0a 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 ..package requir
0310: 65 20 54 63 6c 20 38 2e 34 20 20 20 20 20 20 20 e Tcl 8.4
0320: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0330: 20 20 20 20 20 20 20 20 3b 20 23 20 52 65 71 75 ; # Requ
0340: 69 72 65 64 20 72 75 6e 74 69 6d 65 2e 0a 70 61 ired runtime..pa
0350: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 73 6e ckage require sn
0360: 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 it
0370: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0380: 20 20 20 20 3b 20 23 20 4f 4f 20 73 79 73 74 65 ; # OO syste
0390: 6d 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 m..package requi
03a0: 72 65 20 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6d 69 re vc::tools::mi
03b0: 73 63 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sc
03c0: 20 20 20 20 20 20 20 20 20 3b 20 23 20 54 65 78 ; # Tex
03d0: 74 20 66 6f 72 6d 61 74 74 69 6e 67 2e 0a 70 61 t formatting..pa
03e0: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 76 63 ckage require vc
03f0: 3a 3a 74 6f 6f 6c 73 3a 3a 6c 6f 67 20 20 20 20 ::tools::log
0400: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0410: 20 20 20 20 3b 20 23 20 55 73 65 72 20 66 65 65 ; # User fee
0420: 64 62 61 63 6b 2e 0a 70 61 63 6b 61 67 65 20 72 dback..package r
0430: 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 69 equire vc::fossi
0440: 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a l::import::cvs::
0450: 72 65 70 6f 73 69 74 6f 72 79 20 20 20 3b 20 23 repository ; #
0460: 20 52 65 70 6f 73 69 74 6f 72 79 20 6d 61 6e 61 Repository mana
0470: 67 65 6d 65 6e 74 2e 0a 70 61 63 6b 61 67 65 20 gement..package
0480: 72 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 require vc::foss
0490: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a il::import::cvs:
04a0: 3a 73 74 61 74 65 20 20 20 20 20 20 20 20 3b 20 :state ;
04b0: 23 20 53 74 61 74 65 20 73 74 6f 72 61 67 65 2e # State storage.
04c0: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 .package require
04d0: 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 vc::fossil::imp
04e0: 6f 72 74 3a 3a 63 76 73 3a 3a 69 6e 74 65 67 72 ort::cvs::integr
04f0: 69 74 79 20 20 20 20 3b 20 23 20 53 74 61 74 65 ity ; # State
0500: 20 69 6e 74 65 67 72 69 74 79 20 63 68 65 63 6b integrity check
0510: 73 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 s..package requi
0520: 72 65 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 re vc::fossil::i
0530: 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 72 6f 6a mport::cvs::proj
0540: 65 63 74 3a 3a 72 65 76 20 3b 20 23 20 50 72 6f ect::rev ; # Pro
0550: 6a 65 63 74 20 6c 65 76 65 6c 20 63 68 61 6e 67 ject level chang
0560: 65 73 65 74 73 0a 0a 23 20 23 20 23 23 20 23 23 esets..# # ## ##
0570: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 # ##### ########
0580: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 20 23 ############# #
0590: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
05a0: 23 23 23 23 0a 23 23 20 52 65 67 69 73 74 65 72 ####.## Register
05b0: 20 74 68 65 20 70 61 73 73 20 77 69 74 68 20 74 the pass with t
05c0: 68 65 20 6d 61 6e 61 67 65 6d 65 6e 74 0a 0a 76 he management..v
05d0: 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 c::fossil::impor
05e0: 74 3a 3a 63 76 73 3a 3a 70 61 73 73 20 64 65 66 t::cvs::pass def
05f0: 69 6e 65 20 5c 0a 20 20 20 20 49 6e 69 74 43 73 ine \. InitCs
0600: 65 74 73 20 5c 0a 20 20 20 20 7b 49 6e 69 74 69 ets \. {Initi
0610: 61 6c 69 7a 65 20 43 68 61 6e 67 65 53 65 74 73 alize ChangeSets
0620: 7d 20 5c 0a 20 20 20 20 3a 3a 76 63 3a 3a 66 6f } \. ::vc::fo
0630: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 ssil::import::cv
0640: 73 3a 3a 70 61 73 73 3a 3a 69 6e 69 74 63 73 65 s::pass::initcse
0650: 74 73 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 ts..# # ## ### #
0660: 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 #### ######## ##
0670: 23 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 ########### ####
0680: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0690: 23 0a 23 23 0a 0a 73 6e 69 74 3a 3a 74 79 70 65 #.##..snit::type
06a0: 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 ::vc::fossil::i
06b0: 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 mport::cvs::pass
06c0: 3a 3a 69 6e 69 74 63 73 65 74 73 20 7b 0a 20 20 ::initcsets {.
06d0: 20 20 23 20 23 20 23 23 20 23 23 23 20 23 23 23 # # ## ### ###
06e0: 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 ## ######## ####
06f0: 23 23 23 23 23 23 23 23 23 0a 20 20 20 20 23 23 #########. ##
0700: 20 50 75 62 6c 69 63 20 41 50 49 0a 0a 20 20 20 Public API..
0710: 20 74 79 70 65 6d 65 74 68 6f 64 20 73 65 74 75 typemethod setu
0720: 70 20 7b 7d 20 7b 0a 09 23 20 44 65 66 69 6e 65 p {} {..# Define
0730: 20 74 68 65 20 6e 61 6d 65 73 20 61 6e 64 20 73 the names and s
0740: 74 72 75 63 74 75 72 65 20 6f 66 20 74 68 65 20 tructure of the
0750: 70 65 72 73 69 73 74 65 6e 74 20 73 74 61 74 65 persistent state
0760: 20 6f 66 0a 09 23 20 74 68 69 73 20 70 61 73 73 of..# this pass
0770: 2e 0a 0a 09 73 74 61 74 65 20 75 73 65 20 70 72 ....state use pr
0780: 6f 6a 65 63 74 0a 09 73 74 61 74 65 20 75 73 65 oject..state use
0790: 20 66 69 6c 65 0a 09 73 74 61 74 65 20 75 73 65 file..state use
07a0: 20 72 65 76 69 73 69 6f 6e 0a 09 73 74 61 74 65 revision..state
07b0: 20 75 73 65 20 72 65 76 69 73 69 6f 6e 62 72 61 use revisionbra
07c0: 6e 63 68 63 68 69 6c 64 72 65 6e 0a 09 73 74 61 nchchildren..sta
07d0: 74 65 20 75 73 65 20 62 72 61 6e 63 68 0a 09 73 te use branch..s
07e0: 74 61 74 65 20 75 73 65 20 74 61 67 0a 09 73 74 tate use tag..st
07f0: 61 74 65 20 75 73 65 20 73 79 6d 62 6f 6c 0a 09 ate use symbol..
0800: 73 74 61 74 65 20 75 73 65 20 6d 65 74 61 0a 0a state use meta..
0810: 09 23 20 44 61 74 61 20 70 65 72 20 63 68 61 6e .# Data per chan
0820: 67 65 73 65 74 2c 20 6e 61 6d 65 6c 79 20 74 68 geset, namely th
0830: 65 20 70 72 6f 6a 65 63 74 20 69 74 20 62 65 6c e project it bel
0840: 6f 6e 67 73 20 74 6f 2c 20 68 6f 77 20 69 74 0a ongs to, how it.
0850: 09 23 20 77 61 73 20 69 6e 64 75 63 65 64 20 28 .# was induced (
0860: 72 65 76 69 73 69 6f 6e 20 6f 72 20 73 79 6d 62 revision or symb
0870: 6f 6c 29 2c 20 70 6c 75 73 20 72 65 66 65 72 65 ol), plus refere
0880: 6e 63 65 20 74 6f 20 74 68 65 0a 09 23 20 70 72 nce to the..# pr
0890: 69 6d 61 72 79 20 65 6e 74 72 79 20 63 61 75 73 imary entry caus
08a0: 69 6e 67 20 69 74 20 28 6d 65 74 61 20 65 6e 74 ing it (meta ent
08b0: 72 79 20 6f 72 20 73 79 6d 62 6f 6c 29 2e 20 41 ry or symbol). A
08c0: 6e 20 61 64 6a 75 6e 63 74 0a 09 23 20 74 61 62 n adjunct..# tab
08d0: 6c 65 20 74 72 61 6e 73 6c 61 74 65 73 20 74 68 le translates th
08e0: 65 20 74 79 70 65 20 69 64 27 73 20 69 6e 74 6f e type id's into
08f0: 20 68 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 20 human readable
0900: 6c 61 62 65 6c 73 2e 0a 0a 09 73 74 61 74 65 20 labels....state
0910: 65 78 74 65 6e 64 20 63 68 61 6e 67 65 73 65 74 extend changeset
0920: 20 7b 0a 09 20 20 20 20 63 69 64 20 20 20 49 4e {.. cid IN
0930: 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 TEGER NOT NULL
0940: 20 50 52 49 4d 41 52 59 20 4b 45 59 20 20 41 55 PRIMARY KEY AU
0950: 54 4f 49 4e 43 52 45 4d 45 4e 54 2c 0a 09 20 20 TOINCREMENT,..
0960: 20 20 70 69 64 20 20 20 49 4e 54 45 47 45 52 20 pid INTEGER
0970: 20 4e 4f 54 20 4e 55 4c 4c 20 20 52 45 46 45 52 NOT NULL REFER
0980: 45 4e 43 45 53 20 70 72 6f 6a 65 63 74 2c 0a 09 ENCES project,..
0990: 20 20 20 20 74 79 70 65 20 20 49 4e 54 45 47 45 type INTEGE
09a0: 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 52 45 46 R NOT NULL REF
09b0: 45 52 45 4e 43 45 53 20 63 73 74 79 70 65 2c 0a ERENCES cstype,.
09c0: 09 20 20 20 20 73 72 63 20 20 20 49 4e 54 45 47 . src INTEG
09d0: 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 2d 2d 20 ER NOT NULL --
09e0: 52 45 46 45 52 45 4e 43 45 53 20 6d 65 74 61 7c REFERENCES meta|
09f0: 73 79 6d 62 6f 6c 20 28 74 79 70 65 20 64 65 70 symbol (type dep
0a00: 65 6e 64 65 6e 74 29 0a 09 7d 0a 09 73 74 61 74 endent)..}..stat
0a10: 65 20 65 78 74 65 6e 64 20 63 73 74 79 70 65 20 e extend cstype
0a20: 7b 0a 09 20 20 20 20 74 69 64 20 20 20 49 4e 54 {.. tid INT
0a30: 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 EGER NOT NULL
0a40: 50 52 49 4d 41 52 59 20 4b 45 59 20 20 41 55 54 PRIMARY KEY AUT
0a50: 4f 49 4e 43 52 45 4d 45 4e 54 2c 0a 09 20 20 20 OINCREMENT,..
0a60: 20 6e 61 6d 65 20 20 54 45 58 54 20 20 20 20 20 name TEXT
0a70: 4e 4f 54 20 4e 55 4c 4c 2c 0a 09 20 20 20 20 55 NOT NULL,.. U
0a80: 4e 49 51 55 45 20 28 6e 61 6d 65 29 0a 09 7d 0a NIQUE (name)..}.
0a90: 09 23 20 4e 6f 74 65 3a 20 4b 65 65 70 20 74 68 .# Note: Keep th
0aa0: 65 20 6c 61 62 65 6c 73 20 75 73 65 64 20 68 65 e labels used he
0ab0: 72 65 20 69 6e 20 73 79 6e 63 20 77 69 74 68 20 re in sync with
0ac0: 74 68 65 20 6e 61 6d 65 73 20 66 6f 72 0a 09 23 the names for..#
0ad0: 20 20 20 20 20 20 20 73 69 6e 67 6c 65 74 6f 6e singleton
0ae0: 20 68 65 6c 70 65 72 20 63 6c 61 73 73 65 73 20 helper classes
0af0: 66 6f 72 20 27 70 72 6f 6a 65 63 74 3a 3a 72 65 for 'project::re
0b00: 76 27 2e 20 54 68 65 79 20 61 72 65 0a 09 23 20 v'. They are..#
0b10: 20 20 20 20 20 20 74 68 65 20 76 61 6c 69 64 20 the valid
0b20: 74 79 70 65 20 6e 61 6d 65 73 20 66 6f 72 20 63 type names for c
0b30: 68 61 6e 67 65 73 65 74 73 20 61 6e 64 20 61 6c hangesets and al
0b40: 73 6f 20 68 61 72 64 77 69 72 65 64 0a 09 23 20 so hardwired..#
0b50: 20 20 20 20 20 20 69 6e 20 73 6f 6d 65 20 63 6f in some co
0b60: 64 65 2e 0a 09 73 74 61 74 65 20 72 75 6e 20 7b de...state run {
0b70: 0a 09 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 .. INSERT INT
0b80: 4f 20 63 73 74 79 70 65 20 56 41 4c 55 45 53 20 O cstype VALUES
0b90: 28 30 2c 27 72 65 76 27 29 3b 0a 09 20 20 20 20 (0,'rev');..
0ba0: 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 73 74 79 INSERT INTO csty
0bb0: 70 65 20 56 41 4c 55 45 53 20 28 31 2c 27 73 79 pe VALUES (1,'sy
0bc0: 6d 3a 3a 74 61 67 27 29 3b 0a 09 20 20 20 20 49 m::tag');.. I
0bd0: 4e 53 45 52 54 20 49 4e 54 4f 20 63 73 74 79 70 NSERT INTO cstyp
0be0: 65 20 56 41 4c 55 45 53 20 28 32 2c 27 73 79 6d e VALUES (2,'sym
0bf0: 3a 3a 62 72 61 6e 63 68 27 29 3b 0a 09 7d 0a 0a ::branch');..}..
0c00: 09 23 20 4d 61 70 20 66 72 6f 6d 20 63 68 61 6e .# Map from chan
0c10: 67 65 73 65 74 73 20 74 6f 20 74 68 65 20 28 66 gesets to the (f
0c20: 69 6c 65 20 6c 65 76 65 6c 29 20 72 65 76 69 73 ile level) revis
0c30: 69 6f 6e 73 2c 20 74 61 67 73 2c 20 6f 72 0a 09 ions, tags, or..
0c40: 23 20 62 72 61 6e 63 68 65 73 20 74 68 65 79 20 # branches they
0c50: 63 6f 6e 74 61 69 6e 2e 20 54 68 65 20 70 6f 73 contain. The pos
0c60: 27 69 74 69 6f 6e 20 70 72 6f 76 69 64 65 73 20 'ition provides
0c70: 61 6e 20 6f 72 64 65 72 20 6f 66 0a 09 23 20 74 an order of..# t
0c80: 68 65 20 69 74 65 6d 73 20 77 69 74 68 69 6e 20 he items within
0c90: 61 20 63 68 61 6e 67 65 73 65 74 2e 20 54 68 65 a changeset. The
0ca0: 79 20 61 72 65 20 75 6e 69 71 75 65 20 77 69 74 y are unique wit
0cb0: 68 69 6e 20 74 68 65 0a 09 23 20 63 68 61 6e 67 hin the..# chang
0cc0: 65 73 65 74 2e 20 20 54 68 65 20 69 74 65 6d 73 eset. The items
0cd0: 20 61 72 65 20 69 6e 20 70 72 69 6e 63 69 70 6c are in principl
0ce0: 65 20 75 6e 69 71 75 65 2c 20 69 66 20 77 65 20 e unique, if we
0cf0: 77 65 72 65 0a 09 23 20 6c 6f 6f 6b 69 6e 67 20 were..# looking
0d00: 6f 6e 6c 79 20 61 74 20 72 65 6c 65 76 61 6e 74 only at relevant
0d10: 20 63 68 61 6e 67 65 73 65 74 73 2e 20 48 6f 77 changesets. How
0d20: 65 76 65 72 20 61 73 20 74 68 65 79 20 63 6f 6d ever as they com
0d30: 65 0a 09 23 20 66 72 6f 6d 20 64 69 73 70 61 72 e..# from dispar
0d40: 61 74 65 20 73 6f 75 72 63 65 73 20 74 68 65 20 ate sources the
0d50: 73 61 6d 65 20 69 64 20 6d 61 79 20 68 61 76 65 same id may have
0d60: 20 64 69 66 66 65 72 65 6e 74 0a 09 23 20 6d 65 different..# me
0d70: 61 6e 69 6e 67 2c 20 62 65 20 69 6e 20 64 69 66 aning, be in dif
0d80: 66 65 72 65 6e 74 20 63 68 61 6e 67 65 73 65 74 ferent changeset
0d90: 73 20 61 6e 64 20 73 6f 20 69 73 20 66 6f 72 6d s and so is form
0da0: 61 6c 6c 79 20 6e 6f 74 0a 09 23 20 75 6e 69 71 ally not..# uniq
0db0: 75 65 2e 20 53 6f 20 77 65 20 63 61 6e 20 6f 6e ue. So we can on
0dc0: 6c 79 20 73 61 79 20 74 68 61 74 20 69 74 20 69 ly say that it i
0dd0: 73 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 s unique within
0de0: 74 68 65 0a 09 23 20 63 68 61 6e 67 65 73 65 74 the..# changeset
0df0: 2e 20 54 68 65 20 69 6e 74 65 67 72 69 74 79 20 . The integrity
0e00: 6d 6f 64 75 6c 65 20 68 61 73 20 73 74 72 6f 6e module has stron
0e10: 67 65 72 20 63 68 65 63 6b 73 2e 0a 0a 09 73 74 ger checks....st
0e20: 61 74 65 20 65 78 74 65 6e 64 20 63 73 69 74 65 ate extend csite
0e30: 6d 20 7b 0a 09 20 20 20 20 63 69 64 20 20 49 4e m {.. cid IN
0e40: 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 TEGER NOT NULL
0e50: 20 52 45 46 45 52 45 4e 43 45 53 20 63 68 61 6e REFERENCES chan
0e60: 67 65 73 65 74 2c 0a 09 20 20 20 20 70 6f 73 20 geset,.. pos
0e70: 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 INTEGER NOT NU
0e80: 4c 4c 2c 0a 09 20 20 20 20 69 69 64 20 20 49 4e LL,.. iid IN
0e90: 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 2c TEGER NOT NULL,
0ea0: 20 2d 2d 20 52 45 46 45 52 45 4e 43 45 53 20 72 -- REFERENCES r
0eb0: 65 76 69 73 69 6f 6e 7c 74 61 67 7c 62 72 61 6e evision|tag|bran
0ec0: 63 68 0a 09 20 20 20 20 55 4e 49 51 55 45 20 28 ch.. UNIQUE (
0ed0: 63 69 64 2c 20 70 6f 73 29 2c 0a 09 20 20 20 20 cid, pos),..
0ee0: 55 4e 49 51 55 45 20 28 63 69 64 2c 20 69 69 64 UNIQUE (cid, iid
0ef0: 29 0a 09 7d 20 7b 20 69 69 64 20 7d 0a 09 23 20 )..} { iid }..#
0f00: 49 6e 64 65 78 20 6f 6e 3a 20 69 69 64 20 28 73 Index on: iid (s
0f10: 75 63 63 65 73 73 6f 72 2f 70 72 65 64 65 63 65 uccessor/predece
0f20: 73 73 6f 72 20 72 65 74 72 69 65 76 61 6c 29 0a ssor retrieval).
0f30: 0a 09 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 67 ..project::rev g
0f40: 65 74 63 73 74 79 70 65 73 0a 09 72 65 74 75 72 etcstypes..retur
0f50: 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 74 79 70 n. }.. typ
0f60: 65 6d 65 74 68 6f 64 20 6c 6f 61 64 20 7b 7d 20 emethod load {}
0f70: 7b 0a 09 23 20 50 61 73 73 20 6d 61 6e 61 67 65 {..# Pass manage
0f80: 72 20 69 6e 74 65 72 66 61 63 65 2e 20 45 78 65 r interface. Exe
0f90: 63 75 74 65 64 20 74 6f 20 6c 6f 61 64 20 64 61 cuted to load da
0fa0: 74 61 20 63 6f 6d 70 75 74 65 64 20 62 79 0a 09 ta computed by..
0fb0: 23 20 74 68 69 73 20 70 61 73 73 20 69 6e 74 6f # this pass into
0fc0: 20 6d 65 6d 6f 72 79 20 77 68 65 6e 20 74 68 69 memory when thi
0fd0: 73 20 70 61 73 73 20 69 73 20 73 6b 69 70 70 65 s pass is skippe
0fe0: 64 20 69 6e 73 74 65 61 64 20 6f 66 0a 09 23 20 d instead of..#
0ff0: 65 78 65 63 75 74 65 64 2e 0a 0a 09 73 74 61 74 executed....stat
1000: 65 20 75 73 65 20 63 68 61 6e 67 65 73 65 74 0a e use changeset.
1010: 09 73 74 61 74 65 20 75 73 65 20 63 73 69 74 65 .state use csite
1020: 6d 0a 09 73 74 61 74 65 20 75 73 65 20 63 73 74 m..state use cst
1030: 79 70 65 0a 0a 09 23 20 4e 65 65 64 20 74 68 65 ype...# Need the
1040: 20 74 79 70 65 73 20 66 69 72 73 74 2c 20 74 68 types first, th
1050: 65 20 63 6f 6e 73 74 72 75 63 74 6f 72 20 69 6e e constructor in
1060: 20 74 68 65 20 6c 6f 6f 70 20 62 65 6c 6f 77 20 the loop below
1070: 75 73 65 73 0a 09 23 20 74 68 65 6d 20 74 6f 20 uses..# them to
1080: 61 73 73 65 72 74 20 74 68 65 20 63 6f 72 72 65 assert the corre
1090: 63 74 6e 65 73 73 20 6f 66 20 74 79 70 65 20 6e ctness of type n
10a0: 61 6d 65 73 2e 0a 09 70 72 6f 6a 65 63 74 3a 3a ames...project::
10b0: 72 65 76 20 67 65 74 63 73 74 79 70 65 73 0a 0a rev getcstypes..
10c0: 09 23 20 54 4f 44 4f 3a 20 4d 6f 76 65 20 74 6f .# TODO: Move to
10d0: 20 70 72 6f 6a 65 63 74 3a 3a 72 65 76 0a 09 73 project::rev..s
10e0: 65 74 20 6e 20 30 0a 09 6c 6f 67 20 77 72 69 74 et n 0..log writ
10f0: 65 20 32 20 69 6e 69 74 63 73 65 74 73 20 7b 4c e 2 initcsets {L
1100: 6f 61 64 69 6e 67 20 74 68 65 20 63 68 61 6e 67 oading the chang
1110: 65 73 65 74 73 7d 0a 09 66 6f 72 65 61 63 68 20 esets}..foreach
1120: 7b 69 64 20 70 69 64 20 63 73 74 79 70 65 20 73 {id pid cstype s
1130: 72 63 69 64 7d 20 5b 73 74 61 74 65 20 72 75 6e rcid} [state run
1140: 20 7b 0a 09 20 20 20 20 53 45 4c 45 43 54 20 43 {.. SELECT C
1150: 2e 63 69 64 2c 20 43 2e 70 69 64 2c 20 43 53 2e .cid, C.pid, CS.
1160: 6e 61 6d 65 2c 20 43 2e 73 72 63 0a 09 20 20 20 name, C.src..
1170: 20 46 52 4f 4d 20 20 20 63 68 61 6e 67 65 73 65 FROM changese
1180: 74 20 43 2c 20 63 73 74 79 70 65 20 43 53 0a 09 t C, cstype CS..
1190: 20 20 20 20 57 48 45 52 45 20 20 43 2e 74 79 70 WHERE C.typ
11a0: 65 20 3d 20 43 53 2e 74 69 64 0a 09 20 20 20 20 e = CS.tid..
11b0: 4f 52 44 45 52 20 42 59 20 43 2e 63 69 64 0a 09 ORDER BY C.cid..
11c0: 7d 5d 20 7b 0a 09 20 20 20 20 6c 6f 67 20 70 72 }] {.. log pr
11d0: 6f 67 72 65 73 73 20 32 20 69 6e 69 74 63 73 65 ogress 2 initcse
11e0: 74 73 20 24 6e 20 7b 7d 0a 09 20 20 20 20 73 65 ts $n {}.. se
11f0: 74 20 72 20 5b 70 72 6f 6a 65 63 74 3a 3a 72 65 t r [project::re
1200: 76 20 25 41 55 54 4f 25 20 5b 72 65 70 6f 73 69 v %AUTO% [reposi
1210: 74 6f 72 79 20 70 72 6f 6a 65 63 74 6f 66 20 24 tory projectof $
1220: 70 69 64 5d 20 24 63 73 74 79 70 65 20 24 73 72 pid] $cstype $sr
1230: 63 69 64 20 5b 73 74 61 74 65 20 72 75 6e 20 7b cid [state run {
1240: 0a 09 09 53 45 4c 45 43 54 20 43 2e 69 69 64 0a ...SELECT C.iid.
1250: 09 09 46 52 4f 4d 20 20 20 63 73 69 74 65 6d 20 ..FROM csitem
1260: 43 0a 09 09 57 48 45 52 45 20 20 43 2e 63 69 64 C...WHERE C.cid
1270: 20 3d 20 24 69 64 0a 09 09 4f 52 44 45 52 20 42 = $id...ORDER B
1280: 59 20 43 2e 70 6f 73 0a 09 20 20 20 20 7d 5d 20 Y C.pos.. }]
1290: 24 69 64 5d 0a 09 20 20 20 20 69 6e 63 72 20 6e $id].. incr n
12a0: 0a 09 7d 0a 0a 09 70 72 6f 6a 65 63 74 3a 3a 72 ..}...project::r
12b0: 65 76 20 6c 6f 61 64 63 6f 75 6e 74 65 72 0a 09 ev loadcounter..
12c0: 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 return. }..
12d0: 20 20 74 79 70 65 6d 65 74 68 6f 64 20 72 75 6e typemethod run
12e0: 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d 61 {} {..# Pass ma
12f0: 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 65 2e nager interface.
1300: 20 45 78 65 63 75 74 65 64 20 74 6f 20 70 65 72 Executed to per
1310: 66 6f 72 6d 20 74 68 65 0a 09 23 20 66 75 6e 63 form the..# func
1320: 74 69 6f 6e 61 6c 69 74 79 20 6f 66 20 74 68 65 tionality of the
1330: 20 70 61 73 73 2e 0a 0a 09 73 74 61 74 65 20 74 pass....state t
1340: 72 61 6e 73 61 63 74 69 6f 6e 20 7b 0a 09 20 20 ransaction {..
1350: 20 20 43 72 65 61 74 65 52 65 76 69 73 69 6f 6e CreateRevision
1360: 43 68 61 6e 67 65 73 65 74 73 20 20 3b 20 23 20 Changesets ; #
1370: 47 72 6f 75 70 20 66 69 6c 65 20 72 65 76 69 73 Group file revis
1380: 69 6f 6e 73 20 69 6e 74 6f 20 63 73 65 74 73 2e ions into csets.
1390: 0a 09 20 20 20 20 42 72 65 61 6b 49 6e 74 65 72 .. BreakInter
13a0: 6e 61 6c 44 65 70 65 6e 64 65 6e 63 69 65 73 20 nalDependencies
13b0: 3b 20 23 20 53 70 6c 69 74 20 74 68 65 20 63 73 ; # Split the cs
13c0: 65 74 73 20 62 61 73 65 64 20 6f 6e 20 69 6e 74 ets based on int
13d0: 65 72 6e 61 6c 20 63 6f 6e 66 6c 69 63 74 73 2e ernal conflicts.
13e0: 0a 09 20 20 20 20 43 72 65 61 74 65 53 79 6d 62 .. CreateSymb
13f0: 6f 6c 43 68 61 6e 67 65 73 65 74 73 20 20 20 20 olChangesets
1400: 3b 20 23 20 43 72 65 61 74 65 20 63 73 65 74 73 ; # Create csets
1410: 20 66 6f 72 20 74 61 67 73 20 61 6e 64 20 62 72 for tags and br
1420: 61 6e 63 68 65 73 2e 0a 09 20 20 20 20 50 65 72 anches... Per
1430: 73 69 73 74 54 68 65 43 68 61 6e 67 65 73 65 74 sistTheChangeset
1440: 73 0a 09 7d 0a 0a 09 72 65 70 6f 73 69 74 6f 72 s..}...repositor
1450: 79 20 70 72 69 6e 74 63 73 65 74 73 74 61 74 69 y printcsetstati
1460: 73 74 69 63 73 0a 09 69 6e 74 65 67 72 69 74 79 stics..integrity
1470: 20 63 68 61 6e 67 65 73 65 74 73 0a 09 72 65 74 changesets..ret
1480: 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 74 urn. }.. t
1490: 79 70 65 6d 65 74 68 6f 64 20 64 69 73 63 61 72 ypemethod discar
14a0: 64 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d d {} {..# Pass m
14b0: 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 65 anager interface
14c0: 2e 20 45 78 65 63 75 74 65 64 20 66 6f 72 20 61 . Executed for a
14d0: 6c 6c 20 70 61 73 73 65 73 20 61 66 74 65 72 20 ll passes after
14e0: 74 68 65 0a 09 23 20 72 75 6e 20 70 61 73 73 65 the..# run passe
14f0: 73 2c 20 74 6f 20 72 65 6d 6f 76 65 20 61 6c 6c s, to remove all
1500: 20 64 61 74 61 20 6f 66 20 74 68 69 73 20 70 61 data of this pa
1510: 73 73 20 66 72 6f 6d 20 74 68 65 20 73 74 61 74 ss from the stat
1520: 65 2c 0a 09 23 20 61 73 20 62 65 69 6e 67 20 6f e,..# as being o
1530: 75 74 20 6f 66 20 64 61 74 65 2e 0a 0a 09 73 74 ut of date....st
1540: 61 74 65 20 64 69 73 63 61 72 64 20 63 68 61 6e ate discard chan
1550: 67 65 73 65 74 0a 09 73 74 61 74 65 20 64 69 73 geset..state dis
1560: 63 61 72 64 20 63 73 74 79 70 65 0a 09 73 74 61 card cstype..sta
1570: 74 65 20 64 69 73 63 61 72 64 20 63 73 69 74 65 te discard csite
1580: 6d 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a m..return. }.
1590: 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 23 20 . # # ## ###
15a0: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 ##### ######## #
15b0: 23 23 23 23 23 23 23 23 23 23 23 23 0a 20 20 20 ############.
15c0: 20 23 23 20 49 6e 74 65 72 6e 61 6c 20 6d 65 74 ## Internal met
15d0: 68 6f 64 73 0a 0a 20 20 20 20 70 72 6f 63 20 43 hods.. proc C
15e0: 72 65 61 74 65 52 65 76 69 73 69 6f 6e 43 68 61 reateRevisionCha
15f0: 6e 67 65 73 65 74 73 20 7b 7d 20 7b 0a 09 6c 6f ngesets {} {..lo
1600: 67 20 77 72 69 74 65 20 33 20 69 6e 69 74 63 73 g write 3 initcs
1610: 65 74 73 20 7b 43 72 65 61 74 65 20 63 68 61 6e ets {Create chan
1620: 67 65 73 65 74 73 20 62 61 73 65 64 20 6f 6e 20 gesets based on
1630: 72 65 76 69 73 69 6f 6e 73 7d 0a 0a 09 23 20 54 revisions}...# T
1640: 6f 20 67 65 74 20 74 68 65 20 69 6e 69 74 69 61 o get the initia
1650: 6c 20 6f 66 20 63 68 61 6e 67 65 73 65 74 73 20 l of changesets
1660: 77 65 20 66 69 72 73 74 20 67 72 6f 75 70 20 61 we first group a
1670: 6c 6c 20 66 69 6c 65 0a 09 23 20 6c 65 76 65 6c ll file..# level
1680: 20 72 65 76 69 73 69 6f 6e 73 20 75 73 69 6e 67 revisions using
1690: 20 74 68 65 20 73 61 6d 65 20 6d 65 74 61 20 64 the same meta d
16a0: 61 74 61 20 65 6e 74 72 79 20 74 6f 67 65 74 68 ata entry togeth
16b0: 65 72 2e 20 41 73 0a 09 23 20 74 68 65 20 6d 65 er. As..# the me
16c0: 74 61 20 64 61 74 61 20 65 6e 63 6f 64 65 73 20 ta data encodes
16d0: 6e 6f 74 20 6f 6e 6c 79 20 61 75 74 68 6f 72 20 not only author
16e0: 61 6e 64 20 6c 6f 67 20 6d 65 73 73 61 67 65 2c and log message,
16f0: 20 62 75 74 0a 09 23 20 61 6c 73 6f 20 6c 69 6e but..# also lin
1700: 65 20 6f 66 20 64 65 76 65 6c 6f 70 6d 65 6e 74 e of development
1710: 20 61 6e 64 20 70 72 6f 6a 65 63 74 20 77 65 20 and project we
1720: 63 61 6e 20 62 65 20 73 75 72 65 20 74 68 61 74 can be sure that
1730: 0a 09 23 20 72 65 76 69 73 69 6f 6e 73 20 69 6e ..# revisions in
1740: 20 64 69 66 66 65 72 65 6e 74 20 70 72 6f 6a 65 different proje
1750: 63 74 20 61 6e 64 20 6c 69 6e 65 73 20 6f 66 20 ct and lines of
1760: 64 65 76 65 6c 6f 70 6d 65 6e 74 20 61 72 65 0a development are.
1770: 09 23 20 6e 6f 74 20 67 72 6f 75 70 65 64 20 74 .# not grouped t
1780: 6f 67 65 74 68 65 72 2e 20 49 6e 20 63 6f 6e 74 ogether. In cont
1790: 72 61 73 74 20 74 6f 20 63 76 73 32 73 76 6e 20 rast to cvs2svn
17a0: 77 65 20 64 6f 20 5f 5f 6e 6f 74 5f 5f 0a 09 23 we do __not__..#
17b0: 20 75 73 65 20 64 69 73 74 61 6e 63 65 20 69 6e use distance in
17c0: 20 74 69 6d 65 20 62 65 74 77 65 65 6e 20 72 65 time between re
17d0: 76 69 73 69 6f 6e 73 20 74 6f 20 62 72 65 61 6b visions to break
17e0: 20 74 68 65 6d 0a 09 23 20 61 70 61 72 74 2e 20 them..# apart.
17f0: 57 65 20 68 61 76 65 20 73 65 65 6e 20 43 56 53 We have seen CVS
1800: 20 72 65 70 6f 73 69 74 6f 72 69 65 73 20 28 66 repositories (f
1810: 72 6f 6d 20 53 46 29 20 77 68 65 72 65 20 61 0a rom SF) where a.
1820: 09 23 20 73 69 6e 67 6c 65 20 63 6f 6d 6d 69 74 .# single commit
1830: 20 63 6f 6e 74 61 69 6e 65 64 20 72 65 76 69 73 contained revis
1840: 69 6f 6e 73 20 73 65 76 65 72 61 6c 20 68 6f 75 ions several hou
1850: 72 73 20 61 70 61 72 74 2c 0a 09 23 20 6c 69 6b rs apart,..# lik
1860: 65 6c 79 20 64 75 65 20 74 6f 20 74 72 6f 75 62 ely due to troub
1870: 6c 65 20 6f 6e 20 74 68 65 20 73 65 72 76 65 72 le on the server
1880: 20 68 6f 73 74 69 6e 67 20 74 68 65 20 72 65 70 hosting the rep
1890: 6f 73 69 74 6f 72 79 2e 0a 0a 09 23 20 57 65 20 ository....# We
18a0: 6f 72 64 65 72 20 74 68 65 20 72 65 76 69 73 69 order the revisi
18b0: 6f 6e 73 20 68 65 72 65 20 62 79 20 74 69 6d 65 ons here by time
18c0: 2c 20 74 68 69 73 20 77 69 6c 6c 20 68 65 6c 70 , this will help
18d0: 20 74 68 65 0a 09 23 20 6c 61 74 65 72 20 70 61 the..# later pa
18e0: 73 73 65 73 20 28 61 76 6f 69 64 73 20 6a 6f 69 sses (avoids joi
18f0: 6e 73 20 6c 61 74 65 72 20 74 6f 20 67 65 74 20 ns later to get
1900: 61 74 20 74 68 65 20 6f 72 64 65 72 69 6e 67 0a at the ordering.
1910: 09 23 20 69 6e 66 6f 29 2e 0a 0a 09 73 65 74 20 .# info)....set
1920: 6e 20 30 0a 0a 09 73 65 74 20 6c 61 73 74 6d 65 n 0...set lastme
1930: 74 61 20 20 20 20 7b 7d 0a 09 73 65 74 20 6c 61 ta {}..set la
1940: 73 74 70 72 6f 6a 65 63 74 20 7b 7d 0a 09 73 65 stproject {}..se
1950: 74 20 72 65 76 69 73 69 6f 6e 73 20 20 20 7b 7d t revisions {}
1960: 0a 0a 09 23 20 4e 6f 74 65 3a 20 57 65 20 63 6f ...# Note: We co
1970: 75 6c 64 20 68 61 76 65 20 77 72 69 74 74 65 6e uld have written
1980: 20 74 68 69 73 20 6c 6f 6f 70 20 74 6f 20 63 72 this loop to cr
1990: 65 61 74 65 20 74 68 65 20 63 73 65 74 73 0a 09 eate the csets..
19a0: 23 20 20 20 20 20 20 20 65 61 72 6c 79 2c 20 65 # early, e
19b0: 78 74 65 6e 64 69 6e 67 20 74 68 65 6d 20 77 69 xtending them wi
19c0: 74 68 20 61 6c 6c 20 74 68 65 69 72 20 72 65 76 th all their rev
19d0: 69 73 69 6f 6e 73 2e 20 54 68 69 73 0a 09 23 20 isions. This..#
19e0: 20 20 20 20 20 20 68 6f 77 65 76 65 72 20 77 6f however wo
19f0: 75 6c 64 20 6d 65 61 6e 20 6c 6f 74 73 20 6f 66 uld mean lots of
1a00: 20 28 73 6c 6f 77 29 20 6d 65 74 68 6f 64 20 69 (slow) method i
1a10: 6e 76 6f 6b 61 74 69 6f 6e 73 0a 09 23 20 20 20 nvokations..#
1a20: 20 20 20 20 6f 6e 20 74 68 65 20 63 73 65 74 73 on the csets
1a30: 2e 20 44 6f 69 6e 67 20 69 74 20 6c 69 6b 65 20 . Doing it like
1a40: 74 68 69 73 2c 20 6c 61 74 65 20 63 72 65 61 74 this, late creat
1a50: 69 6f 6e 2c 20 6d 65 61 6e 73 0a 09 23 20 20 20 ion, means..#
1a60: 20 20 20 20 6c 65 73 73 20 73 75 63 68 20 63 61 less such ca
1a70: 6c 6c 73 2e 20 4e 6f 6e 65 2c 20 62 75 74 20 74 lls. None, but t
1a80: 68 65 20 63 72 65 61 74 69 6f 6e 20 69 74 73 65 he creation itse
1a90: 6c 66 2e 0a 0a 09 66 6f 72 65 61 63 68 20 7b 6d lf....foreach {m
1aa0: 69 64 20 72 69 64 20 70 69 64 7d 20 5b 73 74 61 id rid pid} [sta
1ab0: 74 65 20 72 75 6e 20 7b 0a 09 20 20 20 20 53 45 te run {.. SE
1ac0: 4c 45 43 54 20 4d 2e 6d 69 64 2c 20 52 2e 72 69 LECT M.mid, R.ri
1ad0: 64 2c 20 4d 2e 70 69 64 0a 09 20 20 20 20 46 52 d, M.pid.. FR
1ae0: 4f 4d 20 20 20 72 65 76 69 73 69 6f 6e 20 52 2c OM revision R,
1af0: 20 6d 65 74 61 20 4d 20 20 20 2d 2d 20 52 20 3d meta M -- R =
1b00: 3d 3e 20 4d 2c 20 75 73 69 6e 67 20 50 4b 20 69 => M, using PK i
1b10: 6e 64 65 78 20 6f 66 20 4d 2e 0a 09 20 20 20 20 ndex of M...
1b20: 57 48 45 52 45 20 20 52 2e 6d 69 64 20 3d 20 4d WHERE R.mid = M
1b30: 2e 6d 69 64 0a 09 20 20 20 20 4f 52 44 45 52 20 .mid.. ORDER
1b40: 20 42 59 20 4d 2e 6d 69 64 2c 20 52 2e 64 61 74 BY M.mid, R.dat
1b50: 65 0a 09 7d 5d 20 7b 0a 09 20 20 20 20 69 66 20 e..}] {.. if
1b60: 7b 24 6c 61 73 74 6d 65 74 61 20 21 3d 20 24 6d {$lastmeta != $m
1b70: 69 64 7d 20 7b 0a 09 09 69 66 20 7b 5b 6c 6c 65 id} {...if {[lle
1b80: 6e 67 74 68 20 24 72 65 76 69 73 69 6f 6e 73 5d ngth $revisions]
1b90: 7d 20 7b 0a 09 09 20 20 20 20 69 6e 63 72 20 6e } {... incr n
1ba0: 0a 09 09 20 20 20 20 73 65 74 20 20 70 20 5b 72 ... set p [r
1bb0: 65 70 6f 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 epository projec
1bc0: 74 6f 66 20 24 6c 61 73 74 70 72 6f 6a 65 63 74 tof $lastproject
1bd0: 5d 0a 09 09 20 20 20 20 70 72 6f 6a 65 63 74 3a ]... project:
1be0: 3a 72 65 76 20 25 41 55 54 4f 25 20 24 70 20 72 :rev %AUTO% $p r
1bf0: 65 76 20 24 6c 61 73 74 6d 65 74 61 20 24 72 65 ev $lastmeta $re
1c00: 76 69 73 69 6f 6e 73 0a 09 09 20 20 20 20 73 65 visions... se
1c10: 74 20 72 65 76 69 73 69 6f 6e 73 20 7b 7d 0a 09 t revisions {}..
1c20: 09 7d 0a 09 09 73 65 74 20 6c 61 73 74 6d 65 74 .}...set lastmet
1c30: 61 20 20 20 20 24 6d 69 64 0a 09 09 73 65 74 20 a $mid...set
1c40: 6c 61 73 74 70 72 6f 6a 65 63 74 20 24 70 69 64 lastproject $pid
1c50: 0a 09 20 20 20 20 7d 0a 09 20 20 20 20 6c 61 70 .. }.. lap
1c60: 70 65 6e 64 20 72 65 76 69 73 69 6f 6e 73 20 24 pend revisions $
1c70: 72 69 64 0a 09 7d 0a 0a 09 69 66 20 7b 5b 6c 6c rid..}...if {[ll
1c80: 65 6e 67 74 68 20 24 72 65 76 69 73 69 6f 6e 73 ength $revisions
1c90: 5d 7d 20 7b 0a 09 20 20 20 20 69 6e 63 72 20 6e ]} {.. incr n
1ca0: 0a 09 20 20 20 20 73 65 74 20 20 70 20 5b 72 65 .. set p [re
1cb0: 70 6f 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 pository project
1cc0: 6f 66 20 24 6c 61 73 74 70 72 6f 6a 65 63 74 5d of $lastproject]
1cd0: 0a 09 20 20 20 20 70 72 6f 6a 65 63 74 3a 3a 72 .. project::r
1ce0: 65 76 20 25 41 55 54 4f 25 20 24 70 20 72 65 76 ev %AUTO% $p rev
1cf0: 20 24 6c 61 73 74 6d 65 74 61 20 24 72 65 76 69 $lastmeta $revi
1d00: 73 69 6f 6e 73 0a 09 7d 0a 0a 09 6c 6f 67 20 77 sions..}...log w
1d10: 72 69 74 65 20 34 20 69 6e 69 74 63 73 65 74 73 rite 4 initcsets
1d20: 20 22 43 72 65 61 74 65 64 20 5b 6e 73 70 20 24 "Created [nsp $
1d30: 6e 20 7b 72 65 76 69 73 69 6f 6e 20 63 68 61 6e n {revision chan
1d40: 67 65 73 65 74 7d 5d 22 0a 09 72 65 74 75 72 6e geset}]"..return
1d50: 0a 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 . }.. proc
1d60: 20 43 72 65 61 74 65 53 79 6d 62 6f 6c 43 68 61 CreateSymbolCha
1d70: 6e 67 65 73 65 74 73 20 7b 7d 20 7b 0a 09 6c 6f ngesets {} {..lo
1d80: 67 20 77 72 69 74 65 20 33 20 69 6e 69 74 63 73 g write 3 initcs
1d90: 65 74 73 20 7b 43 72 65 61 74 65 20 63 68 61 6e ets {Create chan
1da0: 67 65 73 65 74 73 20 62 61 73 65 64 20 6f 6e 20 gesets based on
1db0: 73 79 6d 62 6f 6c 73 7d 0a 0a 09 23 20 54 61 67 symbols}...# Tag
1dc0: 73 20 61 6e 64 20 62 72 61 6e 63 68 65 73 20 69 s and branches i
1dd0: 6e 64 75 63 65 20 63 68 61 6e 67 65 73 65 74 73 nduce changesets
1de0: 20 61 73 20 77 65 6c 6c 2c 20 63 6f 6e 74 61 69 as well, contai
1df0: 6e 69 6e 67 20 74 68 65 0a 09 23 20 72 65 76 69 ning the..# revi
1e00: 73 69 6f 6e 73 20 74 68 65 79 20 61 72 65 20 61 sions they are a
1e10: 74 74 61 63 68 65 64 20 74 6f 20 28 74 61 67 73 ttached to (tags
1e20: 29 2c 20 6f 72 20 73 70 61 77 6e 65 64 20 66 72 ), or spawned fr
1e30: 6f 6d 0a 09 23 20 28 62 72 61 6e 63 68 65 73 29 om..# (branches)
1e40: 2e 0a 0a 09 73 65 74 20 6e 20 30 0a 0a 09 23 20 ....set n 0...#
1e50: 46 69 72 73 74 20 70 72 6f 63 65 73 73 20 74 68 First process th
1e60: 65 20 74 61 67 73 2c 20 74 68 65 6e 20 74 68 65 e tags, then the
1e70: 20 62 72 61 6e 63 68 65 73 2e 20 57 65 20 6b 6e branches. We kn
1e80: 6f 77 20 74 68 61 74 0a 09 23 20 74 68 65 69 72 ow that..# their
1e90: 20 69 64 73 20 64 6f 20 6e 6f 74 20 6f 76 65 72 ids do not over
1ea0: 6c 61 70 20 77 69 74 68 20 65 61 63 68 20 6f 74 lap with each ot
1eb0: 68 65 72 2e 0a 0a 09 73 65 74 20 6c 61 73 74 73 her....set lasts
1ec0: 79 6d 62 6f 6c 20 20 7b 7d 0a 09 73 65 74 20 6c ymbol {}..set l
1ed0: 61 73 74 70 72 6f 6a 65 63 74 20 7b 7d 0a 09 73 astproject {}..s
1ee0: 65 74 20 74 61 67 73 20 20 20 20 20 20 20 20 7b et tags {
1ef0: 7d 0a 0a 09 66 6f 72 65 61 63 68 20 7b 73 69 64 }...foreach {sid
1f00: 20 74 69 64 20 70 69 64 7d 20 5b 73 74 61 74 65 tid pid} [state
1f10: 20 72 75 6e 20 7b 0a 09 20 20 20 20 53 45 4c 45 run {.. SELE
1f20: 43 54 20 53 2e 73 69 64 2c 20 54 2e 74 69 64 2c CT S.sid, T.tid,
1f30: 20 53 2e 70 69 64 0a 09 20 20 20 20 46 52 4f 4d S.pid.. FROM
1f40: 20 20 74 61 67 20 54 2c 20 73 79 6d 62 6f 6c 20 tag T, symbol
1f50: 53 20 20 20 20 20 2d 2d 20 54 20 3d 3d 3e 20 52 S -- T ==> R
1f60: 2f 53 2c 20 75 73 69 6e 67 20 50 4b 20 69 6e 64 /S, using PK ind
1f70: 69 63 65 73 20 6f 66 20 52 2c 20 53 2e 0a 09 20 ices of R, S...
1f80: 20 20 20 57 48 45 52 45 20 54 2e 73 69 64 20 3d WHERE T.sid =
1f90: 20 53 2e 73 69 64 0a 09 20 20 20 20 4f 52 44 45 S.sid.. ORDE
1fa0: 52 20 42 59 20 53 2e 73 69 64 2c 20 54 2e 74 69 R BY S.sid, T.ti
1fb0: 64 0a 09 7d 5d 20 7b 0a 09 20 20 20 20 69 66 20 d..}] {.. if
1fc0: 7b 24 6c 61 73 74 73 79 6d 62 6f 6c 20 21 3d 20 {$lastsymbol !=
1fd0: 24 73 69 64 7d 20 7b 0a 09 09 69 66 20 7b 5b 6c $sid} {...if {[l
1fe0: 6c 65 6e 67 74 68 20 24 74 61 67 73 5d 7d 20 7b length $tags]} {
1ff0: 0a 09 09 20 20 20 20 69 6e 63 72 20 6e 0a 09 09 ... incr n...
2000: 20 20 20 20 73 65 74 20 20 70 20 5b 72 65 70 6f set p [repo
2010: 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 6f 66 sitory projectof
2020: 20 24 6c 61 73 74 70 72 6f 6a 65 63 74 5d 0a 09 $lastproject]..
2030: 09 20 20 20 20 70 72 6f 6a 65 63 74 3a 3a 72 65 . project::re
2040: 76 20 25 41 55 54 4f 25 20 24 70 20 73 79 6d 3a v %AUTO% $p sym:
2050: 3a 74 61 67 20 24 6c 61 73 74 73 79 6d 62 6f 6c :tag $lastsymbol
2060: 20 24 74 61 67 73 0a 09 09 20 20 20 20 73 65 74 $tags... set
2070: 20 74 61 67 73 20 7b 7d 0a 09 09 7d 0a 09 09 73 tags {}...}...s
2080: 65 74 20 6c 61 73 74 73 79 6d 62 6f 6c 20 20 24 et lastsymbol $
2090: 73 69 64 0a 09 09 73 65 74 20 6c 61 73 74 70 72 sid...set lastpr
20a0: 6f 6a 65 63 74 20 24 70 69 64 0a 09 20 20 20 20 oject $pid..
20b0: 7d 0a 09 20 20 20 20 6c 61 70 70 65 6e 64 20 74 }.. lappend t
20c0: 61 67 73 20 24 74 69 64 0a 09 7d 0a 0a 09 69 66 ags $tid..}...if
20d0: 20 7b 5b 6c 6c 65 6e 67 74 68 20 24 74 61 67 73 {[llength $tags
20e0: 5d 7d 20 7b 0a 09 20 20 20 20 69 6e 63 72 20 6e ]} {.. incr n
20f0: 0a 09 20 20 20 20 73 65 74 20 20 70 20 5b 72 65 .. set p [re
2100: 70 6f 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 pository project
2110: 6f 66 20 24 6c 61 73 74 70 72 6f 6a 65 63 74 5d of $lastproject]
2120: 0a 09 20 20 20 20 70 72 6f 6a 65 63 74 3a 3a 72 .. project::r
2130: 65 76 20 25 41 55 54 4f 25 20 24 70 20 73 79 6d ev %AUTO% $p sym
2140: 3a 3a 74 61 67 20 24 6c 61 73 74 73 79 6d 62 6f ::tag $lastsymbo
2150: 6c 20 24 74 61 67 73 0a 09 7d 0a 0a 09 73 65 74 l $tags..}...set
2160: 20 6c 61 73 74 73 79 6d 62 6f 6c 20 7b 7d 0a 09 lastsymbol {}..
2170: 73 65 74 20 6c 61 73 70 72 6f 6a 65 63 74 20 7b set lasproject {
2180: 7d 0a 09 73 65 74 20 62 72 61 6e 63 68 65 73 20 }..set branches
2190: 20 20 7b 7d 0a 0a 09 66 6f 72 65 61 63 68 20 7b {}...foreach {
21a0: 73 69 64 20 62 69 64 20 70 69 64 7d 20 5b 73 74 sid bid pid} [st
21b0: 61 74 65 20 72 75 6e 20 7b 0a 09 20 20 20 20 53 ate run {.. S
21c0: 45 4c 45 43 54 20 53 2e 73 69 64 2c 20 42 2e 62 ELECT S.sid, B.b
21d0: 69 64 2c 20 53 2e 70 69 64 0a 09 20 20 20 20 46 id, S.pid.. F
21e0: 52 4f 4d 20 20 62 72 61 6e 63 68 20 42 2c 20 73 ROM branch B, s
21f0: 79 6d 62 6f 6c 20 53 20 20 2d 2d 20 42 20 3d 3d ymbol S -- B ==
2200: 3e 20 52 2f 53 2c 20 75 73 69 6e 67 20 50 4b 20 > R/S, using PK
2210: 69 6e 64 69 63 65 73 20 6f 66 20 52 2c 20 53 2e indices of R, S.
2220: 0a 09 20 20 20 20 57 48 45 52 45 20 42 2e 73 69 .. WHERE B.si
2230: 64 20 20 3d 20 53 2e 73 69 64 0a 09 20 20 20 20 d = S.sid..
2240: 4f 52 44 45 52 20 42 59 20 53 2e 73 69 64 2c 20 ORDER BY S.sid,
2250: 42 2e 62 69 64 0a 09 7d 5d 20 7b 0a 09 20 20 20 B.bid..}] {..
2260: 20 69 66 20 7b 24 6c 61 73 74 73 79 6d 62 6f 6c if {$lastsymbol
2270: 20 21 3d 20 24 73 69 64 7d 20 7b 0a 09 09 69 66 != $sid} {...if
2280: 20 7b 5b 6c 6c 65 6e 67 74 68 20 24 62 72 61 6e {[llength $bran
2290: 63 68 65 73 5d 7d 20 7b 0a 09 09 20 20 20 20 69 ches]} {... i
22a0: 6e 63 72 20 6e 0a 09 09 20 20 20 20 73 65 74 20 ncr n... set
22b0: 20 70 20 5b 72 65 70 6f 73 69 74 6f 72 79 20 70 p [repository p
22c0: 72 6f 6a 65 63 74 6f 66 20 24 6c 61 73 74 70 72 rojectof $lastpr
22d0: 6f 6a 65 63 74 5d 0a 09 09 20 20 20 20 70 72 6f oject]... pro
22e0: 6a 65 63 74 3a 3a 72 65 76 20 25 41 55 54 4f 25 ject::rev %AUTO%
22f0: 20 24 70 20 73 79 6d 3a 3a 62 72 61 6e 63 68 20 $p sym::branch
2300: 24 6c 61 73 74 73 79 6d 62 6f 6c 20 24 62 72 61 $lastsymbol $bra
2310: 6e 63 68 65 73 0a 09 09 20 20 20 20 73 65 74 20 nches... set
2320: 62 72 61 6e 63 68 65 73 20 7b 7d 0a 09 09 7d 0a branches {}...}.
2330: 09 09 73 65 74 20 6c 61 73 74 73 79 6d 62 6f 6c ..set lastsymbol
2340: 20 20 24 73 69 64 0a 09 09 73 65 74 20 6c 61 73 $sid...set las
2350: 74 70 72 6f 6a 65 63 74 20 24 70 69 64 0a 09 20 tproject $pid..
2360: 20 20 20 7d 0a 09 20 20 20 20 6c 61 70 70 65 6e }.. lappen
2370: 64 20 62 72 61 6e 63 68 65 73 20 24 62 69 64 0a d branches $bid.
2380: 09 7d 0a 0a 09 69 66 20 7b 5b 6c 6c 65 6e 67 74 .}...if {[llengt
2390: 68 20 24 62 72 61 6e 63 68 65 73 5d 7d 20 7b 0a h $branches]} {.
23a0: 09 20 20 20 20 69 6e 63 72 20 6e 0a 09 20 20 20 . incr n..
23b0: 20 73 65 74 20 20 70 20 5b 72 65 70 6f 73 69 74 set p [reposit
23c0: 6f 72 79 20 70 72 6f 6a 65 63 74 6f 66 20 24 6c ory projectof $l
23d0: 61 73 74 70 72 6f 6a 65 63 74 5d 0a 09 20 20 20 astproject]..
23e0: 20 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 25 41 project::rev %A
23f0: 55 54 4f 25 20 24 70 20 73 79 6d 3a 3a 62 72 61 UTO% $p sym::bra
2400: 6e 63 68 20 24 6c 61 73 74 73 79 6d 62 6f 6c 20 nch $lastsymbol
2410: 24 62 72 61 6e 63 68 65 73 0a 09 7d 0a 0a 09 6c $branches..}...l
2420: 6f 67 20 77 72 69 74 65 20 34 20 69 6e 69 74 63 og write 4 initc
2430: 73 65 74 73 20 22 43 72 65 61 74 65 64 20 5b 6e sets "Created [n
2440: 73 70 20 24 6e 20 7b 73 79 6d 62 6f 6c 20 63 68 sp $n {symbol ch
2450: 61 6e 67 65 73 65 74 7d 5d 22 0a 09 72 65 74 75 angeset}]"..retu
2460: 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 rn. }.. pr
2470: 6f 63 20 42 72 65 61 6b 49 6e 74 65 72 6e 61 6c oc BreakInternal
2480: 44 65 70 65 6e 64 65 6e 63 69 65 73 20 7b 7d 20 Dependencies {}
2490: 7b 0a 09 23 20 54 68 69 73 20 63 6f 64 65 20 6f {..# This code o
24a0: 70 65 72 61 74 65 73 20 6f 6e 20 74 68 65 20 72 perates on the r
24b0: 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 evision changese
24c0: 74 73 20 63 72 65 61 74 65 64 20 62 79 0a 09 23 ts created by..#
24d0: 20 27 43 72 65 61 74 65 52 65 76 69 73 69 6f 6e 'CreateRevision
24e0: 43 68 61 6e 67 65 73 65 74 73 27 2e 20 41 73 20 Changesets'. As
24f0: 73 75 63 68 20 69 74 20 68 61 73 20 74 6f 20 66 such it has to f
2500: 6f 6c 6c 6f 77 20 61 66 74 65 72 0a 09 23 20 69 ollow after..# i
2510: 74 2c 20 62 65 66 6f 72 65 20 74 68 65 20 73 79 t, before the sy
2520: 6d 62 6f 6c 20 63 68 61 6e 67 65 73 65 74 73 20 mbol changesets
2530: 61 72 65 20 6d 61 64 65 2e 20 54 68 65 20 63 68 are made. The ch
2540: 61 6e 67 65 73 65 74 73 0a 09 23 20 61 72 65 20 angesets..# are
2550: 69 6e 73 70 65 63 74 65 64 20 66 6f 72 20 69 6e inspected for in
2560: 74 65 72 6e 61 6c 20 63 6f 6e 66 6c 69 63 74 73 ternal conflicts
2570: 20 61 6e 64 20 61 6e 79 20 73 75 63 68 20 61 72 and any such ar
2580: 65 20 62 72 6f 6b 65 6e 0a 09 23 20 62 79 20 73 e broken..# by s
2590: 70 6c 69 74 74 69 6e 67 20 74 68 65 20 70 72 6f plitting the pro
25a0: 62 6c 65 6d 61 74 69 63 20 63 68 61 6e 67 65 73 blematic changes
25b0: 65 74 20 69 6e 74 6f 20 6d 75 6c 74 69 70 6c 65 et into multiple
25c0: 0a 09 23 20 66 72 61 67 6d 65 6e 74 73 2e 20 54 ..# fragments. T
25d0: 68 65 20 72 65 73 75 6c 74 73 20 61 72 65 20 63 he results are c
25e0: 68 61 6e 67 65 73 65 74 73 20 77 68 69 63 68 20 hangesets which
25f0: 68 61 76 65 20 6e 6f 20 69 6e 74 65 72 6e 61 6c have no internal
2600: 0a 09 23 20 64 65 70 65 6e 64 65 6e 63 69 65 73 ..# dependencies
2610: 2c 20 6f 6e 6c 79 20 65 78 74 65 72 6e 61 6c 20 , only external
2620: 6f 6e 65 73 2e 0a 0a 09 6c 6f 67 20 77 72 69 74 ones....log writ
2630: 65 20 33 20 69 6e 69 74 63 73 65 74 73 20 7b 42 e 3 initcsets {B
2640: 72 65 61 6b 20 69 6e 74 65 72 6e 61 6c 20 64 65 reak internal de
2650: 70 65 6e 64 65 6e 63 69 65 73 7d 0a 09 73 65 74 pendencies}..set
2660: 20 6f 6c 64 20 5b 6c 6c 65 6e 67 74 68 20 5b 70 old [llength [p
2670: 72 6f 6a 65 63 74 3a 3a 72 65 76 20 61 6c 6c 5d roject::rev all]
2680: 5d 0a 0a 09 66 6f 72 65 61 63 68 20 63 73 65 74 ]...foreach cset
2690: 20 5b 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 61 [project::rev a
26a0: 6c 6c 5d 20 7b 0a 09 20 20 20 20 24 63 73 65 74 ll] {.. $cset
26b0: 20 62 72 65 61 6b 69 6e 74 65 72 6e 61 6c 64 65 breakinternalde
26c0: 70 65 6e 64 65 6e 63 69 65 73 0a 09 7d 0a 0a 09 pendencies..}...
26d0: 73 65 74 20 6e 20 5b 65 78 70 72 20 7b 5b 6c 6c set n [expr {[ll
26e0: 65 6e 67 74 68 20 5b 70 72 6f 6a 65 63 74 3a 3a ength [project::
26f0: 72 65 76 20 61 6c 6c 5d 5d 20 2d 20 24 6f 6c 64 rev all]] - $old
2700: 7d 5d 0a 09 6c 6f 67 20 77 72 69 74 65 20 34 20 }]..log write 4
2710: 69 6e 69 74 63 73 65 74 73 20 22 43 72 65 61 74 initcsets "Creat
2720: 65 64 20 5b 6e 73 70 20 24 6e 20 7b 61 64 64 69 ed [nsp $n {addi
2730: 74 69 6f 6e 61 6c 20 72 65 76 69 73 69 6f 6e 20 tional revision
2740: 63 68 61 6e 67 65 73 65 74 7d 5d 22 0a 09 6c 6f changeset}]"..lo
2750: 67 20 77 72 69 74 65 20 34 20 69 6e 69 74 63 73 g write 4 initcs
2760: 65 74 73 20 4f 6b 2e 0a 09 72 65 74 75 72 6e 0a ets Ok...return.
2770: 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 }.. proc
2780: 50 65 72 73 69 73 74 54 68 65 43 68 61 6e 67 65 PersistTheChange
2790: 73 65 74 73 20 7b 7d 20 7b 0a 09 6c 6f 67 20 77 sets {} {..log w
27a0: 72 69 74 65 20 33 20 69 6e 69 74 63 73 65 74 73 rite 3 initcsets
27b0: 20 22 53 61 76 69 6e 67 20 5b 6e 73 70 20 5b 6c "Saving [nsp [l
27c0: 6c 65 6e 67 74 68 20 5b 70 72 6f 6a 65 63 74 3a length [project:
27d0: 3a 72 65 76 20 61 6c 6c 5d 5d 20 7b 69 6e 69 74 :rev all]] {init
27e0: 69 61 6c 20 63 68 61 6e 67 65 73 65 74 7d 5d 20 ial changeset}]
27f0: 74 6f 20 74 68 65 20 70 65 72 73 69 73 74 65 6e to the persisten
2800: 74 20 73 74 61 74 65 22 0a 0a 09 66 6f 72 65 61 t state"...forea
2810: 63 68 20 63 73 65 74 20 5b 70 72 6f 6a 65 63 74 ch cset [project
2820: 3a 3a 72 65 76 20 61 6c 6c 5d 20 7b 0a 09 20 20 ::rev all] {..
2830: 20 20 24 63 73 65 74 20 70 65 72 73 69 73 74 0a $cset persist.
2840: 09 7d 0a 0a 09 6c 6f 67 20 77 72 69 74 65 20 34 .}...log write 4
2850: 20 69 6e 69 74 63 73 65 74 73 20 4f 6b 2e 0a 09 initcsets Ok...
2860: 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 return. }..
2870: 20 20 23 20 23 20 23 23 20 23 23 23 20 23 23 23 # # ## ### ###
2880: 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 ## ######## ####
2890: 23 23 23 23 23 23 23 23 23 0a 20 20 20 20 23 23 #########. ##
28a0: 20 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0a 0a Configuration..
28b0: 20 20 20 20 70 72 61 67 6d 61 20 2d 68 61 73 69 pragma -hasi
28c0: 6e 73 74 61 6e 63 65 73 20 20 20 6e 6f 20 3b 20 nstances no ;
28d0: 23 20 73 69 6e 67 6c 65 74 6f 6e 0a 20 20 20 20 # singleton.
28e0: 70 72 61 67 6d 61 20 2d 68 61 73 74 79 70 65 69 pragma -hastypei
28f0: 6e 66 6f 20 20 20 20 6e 6f 20 3b 20 23 20 6e 6f nfo no ; # no
2900: 20 69 6e 74 72 6f 73 70 65 63 74 69 6f 6e 0a 20 introspection.
2910: 20 20 20 70 72 61 67 6d 61 20 2d 68 61 73 74 79 pragma -hasty
2920: 70 65 64 65 73 74 72 6f 79 20 6e 6f 20 3b 20 23 pedestroy no ; #
2930: 20 69 6d 6d 6f 72 74 61 6c 0a 0a 20 20 20 20 23 immortal.. #
2940: 20 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 # ## ### #####
2950: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 ######## #######
2960: 23 23 23 23 23 23 0a 7d 0a 0a 6e 61 6d 65 73 70 ######.}..namesp
2970: 61 63 65 20 65 76 61 6c 20 3a 3a 76 63 3a 3a 66 ace eval ::vc::f
2980: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c
2990: 76 73 3a 3a 70 61 73 73 20 7b 0a 20 20 20 20 6e vs::pass {. n
29a0: 61 6d 65 73 70 61 63 65 20 65 78 70 6f 72 74 20 amespace export
29b0: 69 6e 69 74 63 73 65 74 73 0a 20 20 20 20 6e 61 initcsets. na
29c0: 6d 65 73 70 61 63 65 20 65 76 61 6c 20 69 6e 69 mespace eval ini
29d0: 74 63 73 65 74 73 20 7b 0a 09 6e 61 6d 65 73 70 tcsets {..namesp
29e0: 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a ace import ::vc:
29f0: 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a :fossil::import:
2a00: 3a 63 76 73 3a 3a 72 65 70 6f 73 69 74 6f 72 79 :cvs::repository
2a10: 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f ..namespace impo
2a20: 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a rt ::vc::fossil:
2a30: 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 73 74 :import::cvs::st
2a40: 61 74 65 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 ate..namespace i
2a50: 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 mport ::vc::foss
2a60: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a il::import::cvs:
2a70: 3a 69 6e 74 65 67 72 69 74 79 0a 09 6e 61 6d 65 :integrity..name
2a80: 73 70 61 63 65 20 65 76 61 6c 20 70 72 6f 6a 65 space eval proje
2a90: 63 74 20 7b 0a 09 20 20 20 20 6e 61 6d 65 73 70 ct {.. namesp
2aa0: 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a ace import ::vc:
2ab0: 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a :fossil::import:
2ac0: 3a 63 76 73 3a 3a 70 72 6f 6a 65 63 74 3a 3a 72 :cvs::project::r
2ad0: 65 76 0a 09 7d 0a 09 6e 61 6d 65 73 70 61 63 65 ev..}..namespace
2ae0: 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 74 6f import ::vc::to
2af0: 6f 6c 73 3a 3a 6d 69 73 63 3a 3a 2a 0a 09 6e 61 ols::misc::*..na
2b00: 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74 20 3a mespace import :
2b10: 3a 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6c 6f 67 0a :vc::tools::log.
2b20: 09 6c 6f 67 20 72 65 67 69 73 74 65 72 20 69 6e .log register in
2b30: 69 74 63 73 65 74 73 0a 20 20 20 20 7d 0a 7d 0a itcsets. }.}.
2b40: 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 .# # ## ### ####
2b50: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 # ######## #####
2b60: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 ######## #######
2b70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 ##############.#
2b80: 23 20 52 65 61 64 79 0a 0a 70 61 63 6b 61 67 65 # Ready..package
2b90: 20 70 72 6f 76 69 64 65 20 76 63 3a 3a 66 6f 73 provide vc::fos
2ba0: 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 sil::import::cvs
2bb0: 3a 3a 70 61 73 73 3a 3a 69 6e 69 74 63 73 65 74 ::pass::initcset
2bc0: 73 20 31 2e 30 0a 72 65 74 75 72 6e 0a s 1.0.return.