Hex Artifact Content
Not logged in

Artifact eda30d7ee343bec1d93c8259cebb4e1b71e49ccf:

File tools/cvs2fossil/lib/c2f_pinitcsets.tcl part of check-in [66235f2430] - Updated the copyright information of all files touched in the new year. by aku on 2008-02-06 05:04:12. Also file tools/cvs2fossil/lib/c2f_pinitcsets.tcl part of check-in [6b78df3861] - Merge in changes from Andreas's branch. by drh on 2008-02-08 21:52:21.

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 2d 32 30 30 38 20 41 6e 64 72 65 61 73 20  07-2008 Andreas 
0070: 4b 75 70 72 69 65 73 2e 0a 23 0a 23 20 54 68 69  Kupries..#.# Thi
0080: 73 20 73 6f 66 74 77 61 72 65 20 69 73 20 6c 69  s software is li
0090: 63 65 6e 73 65 64 20 61 73 20 64 65 73 63 72 69  censed as descri
00a0: 62 65 64 20 69 6e 20 74 68 65 20 66 69 6c 65 20  bed in the file 
00b0: 4c 49 43 45 4e 53 45 2c 20 77 68 69 63 68 0a 23  LICENSE, which.#
00c0: 20 79 6f 75 20 73 68 6f 75 6c 64 20 68 61 76 65   you should have
00d0: 20 72 65 63 65 69 76 65 64 20 61 73 20 70 61 72   received as par
00e0: 74 20 6f 66 20 74 68 69 73 20 64 69 73 74 72 69  t of this distri
00f0: 62 75 74 69 6f 6e 2e 0a 23 0a 23 20 54 68 69 73  bution..#.# This
0100: 20 73 6f 66 74 77 61 72 65 20 63 6f 6e 73 69 73   software consis
0110: 74 73 20 6f 66 20 76 6f 6c 75 6e 74 61 72 79 20  ts of voluntary 
0120: 63 6f 6e 74 72 69 62 75 74 69 6f 6e 73 20 6d 61  contributions ma
0130: 64 65 20 62 79 20 6d 61 6e 79 0a 23 20 69 6e 64  de by many.# ind
0140: 69 76 69 64 75 61 6c 73 2e 20 20 46 6f 72 20 65  ividuals.  For e
0150: 78 61 63 74 20 63 6f 6e 74 72 69 62 75 74 69 6f  xact contributio
0160: 6e 20 68 69 73 74 6f 72 79 2c 20 73 65 65 20 74  n history, see t
0170: 68 65 20 72 65 76 69 73 69 6f 6e 0a 23 20 68 69  he revision.# hi
0180: 73 74 6f 72 79 20 61 6e 64 20 6c 6f 67 73 2c 20  story and logs, 
0190: 61 76 61 69 6c 61 62 6c 65 20 61 74 20 68 74 74  available at htt
01a0: 70 3a 2f 2f 66 6f 73 73 69 6c 2d 73 63 6d 2e 68  p://fossil-scm.h
01b0: 77 61 63 69 2e 63 6f 6d 2f 66 6f 73 73 69 6c 0a  waci.com/fossil.
01c0: 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 23  # # ## ### #####
01d0: 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23   ######## ######
01e0: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23  ####### ########
01f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 0a 23  #############..#
0200: 23 20 50 61 73 73 20 56 2e 20 54 68 69 73 20 70  # Pass V. This p
0210: 61 73 73 20 63 72 65 61 74 65 73 20 74 68 65 20  ass creates the 
0220: 69 6e 69 74 69 61 6c 20 73 65 74 20 6f 66 20 70  initial set of p
0230: 72 6f 6a 65 63 74 20 6c 65 76 65 6c 0a 23 23 20  roject level.## 
0240: 72 65 76 69 73 69 6f 6e 73 2c 20 61 6b 61 20 63  revisions, aka c
0250: 68 61 6e 67 65 73 65 74 73 2e 20 4c 61 74 65 72  hangesets. Later
0260: 20 70 61 73 73 65 73 20 77 69 6c 6c 20 72 65 66   passes will ref
0270: 69 6e 65 20 74 68 65 6d 2c 20 70 75 74 73 20 74  ine them, puts t
0280: 68 65 6d 0a 23 23 20 69 6e 74 6f 20 70 72 6f 70  hem.## into prop
0290: 65 72 20 6f 72 64 65 72 2c 20 73 65 74 20 74 68  er order, set th
02a0: 65 69 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73  eir dependencies
02b0: 2c 20 65 74 63 2e 0a 0a 23 20 23 20 23 23 20 23  , etc...# # ## #
02c0: 23 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23  ## ##### #######
02d0: 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23 20  # ############# 
02e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
02f0: 23 23 23 23 23 0a 23 23 20 52 65 71 75 69 72 65  #####.## Require
0300: 6d 65 6e 74 73 0a 0a 70 61 63 6b 61 67 65 20 72  ments..package r
0310: 65 71 75 69 72 65 20 54 63 6c 20 38 2e 34 20 20  equire 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 20 20 20 20 20 3b 20 23               ; #
0340: 20 52 65 71 75 69 72 65 64 20 72 75 6e 74 69 6d   Required runtim
0350: 65 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  e..package requi
0360: 72 65 20 73 6e 69 74 20 20 20 20 20 20 20 20 20  re snit         
0370: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0380: 20 20 20 20 20 20 20 20 20 3b 20 23 20 4f 4f 20           ; # OO 
0390: 73 79 73 74 65 6d 2e 0a 70 61 63 6b 61 67 65 20  system..package 
03a0: 72 65 71 75 69 72 65 20 76 63 3a 3a 74 6f 6f 6c  require vc::tool
03b0: 73 3a 3a 6d 69 73 63 20 20 20 20 20 20 20 20 20  s::misc         
03c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20                ; 
03d0: 23 20 54 65 78 74 20 66 6f 72 6d 61 74 74 69 6e  # Text formattin
03e0: 67 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  g..package requi
03f0: 72 65 20 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6c 6f  re vc::tools::lo
0400: 67 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  g               
0410: 20 20 20 20 20 20 20 20 20 3b 20 23 20 55 73 65           ; # Use
0420: 72 20 66 65 65 64 62 61 63 6b 2e 0a 70 61 63 6b  r feedback..pack
0430: 61 67 65 20 72 65 71 75 69 72 65 20 76 63 3a 3a  age require vc::
0440: 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a  fossil::import::
0450: 63 76 73 3a 3a 72 65 70 6f 73 69 74 6f 72 79 20  cvs::repository 
0460: 20 20 3b 20 23 20 52 65 70 6f 73 69 74 6f 72 79    ; # Repository
0470: 20 6d 61 6e 61 67 65 6d 65 6e 74 2e 0a 70 61 63   management..pac
0480: 6b 61 67 65 20 72 65 71 75 69 72 65 20 76 63 3a  kage require vc:
0490: 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a  :fossil::import:
04a0: 3a 63 76 73 3a 3a 73 74 61 74 65 20 20 20 20 20  :cvs::state     
04b0: 20 20 20 3b 20 23 20 53 74 61 74 65 20 73 74 6f     ; # State sto
04c0: 72 61 67 65 2e 0a 70 61 63 6b 61 67 65 20 72 65  rage..package re
04d0: 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 69 6c  quire vc::fossil
04e0: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 69  ::import::cvs::i
04f0: 6e 74 65 67 72 69 74 79 20 20 20 20 3b 20 23 20  ntegrity    ; # 
0500: 53 74 61 74 65 20 69 6e 74 65 67 72 69 74 79 20  State integrity 
0510: 63 68 65 63 6b 73 2e 0a 70 61 63 6b 61 67 65 20  checks..package 
0520: 72 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73  require vc::foss
0530: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a  il::import::cvs:
0540: 3a 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 3b 20  :project::rev ; 
0550: 23 20 50 72 6f 6a 65 63 74 20 6c 65 76 65 6c 20  # Project level 
0560: 63 68 61 6e 67 65 73 65 74 73 0a 0a 23 20 23 20  changesets..# # 
0570: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23  ## ### ##### ###
0580: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23  ##### ##########
0590: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23  ### ############
05a0: 23 23 23 23 23 23 23 23 23 0a 23 23 20 52 65 67  #########.## Reg
05b0: 69 73 74 65 72 20 74 68 65 20 70 61 73 73 20 77  ister the pass w
05c0: 69 74 68 20 74 68 65 20 6d 61 6e 61 67 65 6d 65  ith the manageme
05d0: 6e 74 0a 0a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a  nt..vc::fossil::
05e0: 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73  import::cvs::pas
05f0: 73 20 64 65 66 69 6e 65 20 5c 0a 20 20 20 20 49  s define \.    I
0600: 6e 69 74 43 73 65 74 73 20 5c 0a 20 20 20 20 7b  nitCsets \.    {
0610: 49 6e 69 74 69 61 6c 69 7a 65 20 43 68 61 6e 67  Initialize Chang
0620: 65 53 65 74 73 7d 20 5c 0a 20 20 20 20 3a 3a 76  eSets} \.    ::v
0630: 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72  c::fossil::impor
0640: 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a 3a 69 6e  t::cvs::pass::in
0650: 69 74 63 73 65 74 73 0a 0a 23 20 23 20 23 23 20  itcsets..# # ## 
0660: 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23 23  ### ##### ######
0670: 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23  ## #############
0680: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23   ###############
0690: 23 23 23 23 23 23 0a 23 23 0a 0a 73 6e 69 74 3a  ######.##..snit:
06a0: 3a 74 79 70 65 20 3a 3a 76 63 3a 3a 66 6f 73 73  :type ::vc::foss
06b0: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a  il::import::cvs:
06c0: 3a 70 61 73 73 3a 3a 69 6e 69 74 63 73 65 74 73  :pass::initcsets
06d0: 20 7b 0a 20 20 20 20 23 20 23 20 23 23 20 23 23   {.    # # ## ##
06e0: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23  # ##### ########
06f0: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20   #############. 
0700: 20 20 20 23 23 20 50 75 62 6c 69 63 20 41 50 49     ## Public API
0710: 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64  ..    typemethod
0720: 20 73 65 74 75 70 20 7b 7d 20 7b 0a 09 23 20 44   setup {} {..# D
0730: 65 66 69 6e 65 20 74 68 65 20 6e 61 6d 65 73 20  efine the names 
0740: 61 6e 64 20 73 74 72 75 63 74 75 72 65 20 6f 66  and structure of
0750: 20 74 68 65 20 70 65 72 73 69 73 74 65 6e 74 20   the persistent 
0760: 73 74 61 74 65 20 6f 66 0a 09 23 20 74 68 69 73  state of..# this
0770: 20 70 61 73 73 2e 0a 0a 09 73 74 61 74 65 20 75   pass....state u
0780: 73 65 20 70 72 6f 6a 65 63 74 0a 09 73 74 61 74  se project..stat
0790: 65 20 75 73 65 20 66 69 6c 65 0a 09 73 74 61 74  e use file..stat
07a0: 65 20 75 73 65 20 72 65 76 69 73 69 6f 6e 0a 09  e use revision..
07b0: 73 74 61 74 65 20 75 73 65 20 72 65 76 69 73 69  state use revisi
07c0: 6f 6e 62 72 61 6e 63 68 63 68 69 6c 64 72 65 6e  onbranchchildren
07d0: 0a 09 73 74 61 74 65 20 75 73 65 20 62 72 61 6e  ..state use bran
07e0: 63 68 0a 09 73 74 61 74 65 20 75 73 65 20 74 61  ch..state use ta
07f0: 67 0a 09 73 74 61 74 65 20 75 73 65 20 73 79 6d  g..state use sym
0800: 62 6f 6c 0a 09 73 74 61 74 65 20 75 73 65 20 6d  bol..state use m
0810: 65 74 61 0a 0a 09 23 20 44 61 74 61 20 70 65 72  eta...# Data per
0820: 20 63 68 61 6e 67 65 73 65 74 2c 20 6e 61 6d 65   changeset, name
0830: 6c 79 20 74 68 65 20 70 72 6f 6a 65 63 74 20 69  ly the project i
0840: 74 20 62 65 6c 6f 6e 67 73 20 74 6f 2c 20 68 6f  t belongs to, ho
0850: 77 20 69 74 0a 09 23 20 77 61 73 20 69 6e 64 75  w it..# was indu
0860: 63 65 64 20 28 72 65 76 69 73 69 6f 6e 20 6f 72  ced (revision or
0870: 20 73 79 6d 62 6f 6c 29 2c 20 70 6c 75 73 20 72   symbol), plus r
0880: 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 0a  eference to the.
0890: 09 23 20 70 72 69 6d 61 72 79 20 65 6e 74 72 79  .# primary entry
08a0: 20 63 61 75 73 69 6e 67 20 69 74 20 28 6d 65 74   causing it (met
08b0: 61 20 65 6e 74 72 79 20 6f 72 20 73 79 6d 62 6f  a entry or symbo
08c0: 6c 29 2e 20 41 6e 20 61 64 6a 75 6e 63 74 0a 09  l). An adjunct..
08d0: 23 20 74 61 62 6c 65 20 74 72 61 6e 73 6c 61 74  # table translat
08e0: 65 73 20 74 68 65 20 74 79 70 65 20 69 64 27 73  es the type id's
08f0: 20 69 6e 74 6f 20 68 75 6d 61 6e 20 72 65 61 64   into human read
0900: 61 62 6c 65 20 6c 61 62 65 6c 73 2e 0a 0a 09 73  able labels....s
0910: 74 61 74 65 20 65 78 74 65 6e 64 20 63 68 61 6e  tate extend chan
0920: 67 65 73 65 74 20 7b 0a 09 20 20 20 20 63 69 64  geset {..    cid
0930: 20 20 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20     INTEGER  NOT 
0940: 4e 55 4c 4c 20 20 50 52 49 4d 41 52 59 20 4b 45  NULL  PRIMARY KE
0950: 59 20 20 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54  Y  AUTOINCREMENT
0960: 2c 0a 09 20 20 20 20 70 69 64 20 20 20 49 4e 54  ,..    pid   INT
0970: 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 20  EGER  NOT NULL  
0980: 52 45 46 45 52 45 4e 43 45 53 20 70 72 6f 6a 65  REFERENCES proje
0990: 63 74 2c 0a 09 20 20 20 20 74 79 70 65 20 20 49  ct,..    type  I
09a0: 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c  NTEGER  NOT NULL
09b0: 20 20 52 45 46 45 52 45 4e 43 45 53 20 63 73 74    REFERENCES cst
09c0: 79 70 65 2c 0a 09 20 20 20 20 73 72 63 20 20 20  ype,..    src   
09d0: 49 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c  INTEGER  NOT NUL
09e0: 4c 20 2d 2d 20 52 45 46 45 52 45 4e 43 45 53 20  L -- REFERENCES 
09f0: 6d 65 74 61 7c 73 79 6d 62 6f 6c 20 28 74 79 70  meta|symbol (typ
0a00: 65 20 64 65 70 65 6e 64 65 6e 74 29 0a 09 7d 0a  e dependent)..}.
0a10: 09 73 74 61 74 65 20 65 78 74 65 6e 64 20 63 73  .state extend cs
0a20: 74 79 70 65 20 7b 0a 09 20 20 20 20 74 69 64 20  type {..    tid 
0a30: 20 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e    INTEGER  NOT N
0a40: 55 4c 4c 20 20 50 52 49 4d 41 52 59 20 4b 45 59  ULL  PRIMARY KEY
0a50: 20 20 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 2c    AUTOINCREMENT,
0a60: 0a 09 20 20 20 20 6e 61 6d 65 20 20 54 45 58 54  ..    name  TEXT
0a70: 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c 2c 0a 09       NOT NULL,..
0a80: 20 20 20 20 55 4e 49 51 55 45 20 28 6e 61 6d 65      UNIQUE (name
0a90: 29 0a 09 7d 0a 09 23 20 4e 6f 74 65 3a 20 4b 65  )..}..# Note: Ke
0aa0: 65 70 20 74 68 65 20 6c 61 62 65 6c 73 20 75 73  ep the labels us
0ab0: 65 64 20 68 65 72 65 20 69 6e 20 73 79 6e 63 20  ed here in sync 
0ac0: 77 69 74 68 20 74 68 65 20 6e 61 6d 65 73 20 66  with the names f
0ad0: 6f 72 0a 09 23 20 20 20 20 20 20 20 73 69 6e 67  or..#       sing
0ae0: 6c 65 74 6f 6e 20 68 65 6c 70 65 72 20 63 6c 61  leton helper cla
0af0: 73 73 65 73 20 66 6f 72 20 27 70 72 6f 6a 65 63  sses for 'projec
0b00: 74 3a 3a 72 65 76 27 2e 20 54 68 65 79 20 61 72  t::rev'. They ar
0b10: 65 0a 09 23 20 20 20 20 20 20 20 74 68 65 20 76  e..#       the v
0b20: 61 6c 69 64 20 74 79 70 65 20 6e 61 6d 65 73 20  alid type names 
0b30: 66 6f 72 20 63 68 61 6e 67 65 73 65 74 73 20 61  for changesets a
0b40: 6e 64 20 61 6c 73 6f 20 68 61 72 64 77 69 72 65  nd also hardwire
0b50: 64 0a 09 23 20 20 20 20 20 20 20 69 6e 20 73 6f  d..#       in so
0b60: 6d 65 20 63 6f 64 65 2e 0a 09 73 74 61 74 65 20  me code...state 
0b70: 72 75 6e 20 7b 0a 09 20 20 20 20 49 4e 53 45 52  run {..    INSER
0b80: 54 20 49 4e 54 4f 20 63 73 74 79 70 65 20 56 41  T INTO cstype VA
0b90: 4c 55 45 53 20 28 30 2c 27 72 65 76 27 29 3b 0a  LUES (0,'rev');.
0ba0: 09 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f  .    INSERT INTO
0bb0: 20 63 73 74 79 70 65 20 56 41 4c 55 45 53 20 28   cstype VALUES (
0bc0: 31 2c 27 73 79 6d 3a 3a 74 61 67 27 29 3b 0a 09  1,'sym::tag');..
0bd0: 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20      INSERT INTO 
0be0: 63 73 74 79 70 65 20 56 41 4c 55 45 53 20 28 32  cstype VALUES (2
0bf0: 2c 27 73 79 6d 3a 3a 62 72 61 6e 63 68 27 29 3b  ,'sym::branch');
0c00: 0a 09 7d 0a 0a 09 23 20 4d 61 70 20 66 72 6f 6d  ..}...# Map from
0c10: 20 63 68 61 6e 67 65 73 65 74 73 20 74 6f 20 74   changesets to t
0c20: 68 65 20 28 66 69 6c 65 20 6c 65 76 65 6c 29 20  he (file level) 
0c30: 72 65 76 69 73 69 6f 6e 73 2c 20 74 61 67 73 2c  revisions, tags,
0c40: 20 6f 72 0a 09 23 20 62 72 61 6e 63 68 65 73 20   or..# branches 
0c50: 74 68 65 79 20 63 6f 6e 74 61 69 6e 2e 20 54 68  they contain. Th
0c60: 65 20 70 6f 73 27 69 74 69 6f 6e 20 70 72 6f 76  e pos'ition prov
0c70: 69 64 65 73 20 61 6e 20 6f 72 64 65 72 20 6f 66  ides an order of
0c80: 0a 09 23 20 74 68 65 20 69 74 65 6d 73 20 77 69  ..# the items wi
0c90: 74 68 69 6e 20 61 20 63 68 61 6e 67 65 73 65 74  thin a changeset
0ca0: 2e 20 54 68 65 79 20 61 72 65 20 75 6e 69 71 75  . They are uniqu
0cb0: 65 20 77 69 74 68 69 6e 20 74 68 65 0a 09 23 20  e within the..# 
0cc0: 63 68 61 6e 67 65 73 65 74 2e 20 20 54 68 65 20  changeset.  The 
0cd0: 69 74 65 6d 73 20 61 72 65 20 69 6e 20 70 72 69  items are in pri
0ce0: 6e 63 69 70 6c 65 20 75 6e 69 71 75 65 2c 20 69  nciple unique, i
0cf0: 66 20 77 65 20 77 65 72 65 0a 09 23 20 6c 6f 6f  f we were..# loo
0d00: 6b 69 6e 67 20 6f 6e 6c 79 20 61 74 20 72 65 6c  king only at rel
0d10: 65 76 61 6e 74 20 63 68 61 6e 67 65 73 65 74 73  evant changesets
0d20: 2e 20 48 6f 77 65 76 65 72 20 61 73 20 74 68 65  . However as the
0d30: 79 20 63 6f 6d 65 0a 09 23 20 66 72 6f 6d 20 64  y come..# from d
0d40: 69 73 70 61 72 61 74 65 20 73 6f 75 72 63 65 73  isparate sources
0d50: 20 74 68 65 20 73 61 6d 65 20 69 64 20 6d 61 79   the same id may
0d60: 20 68 61 76 65 20 64 69 66 66 65 72 65 6e 74 0a   have different.
0d70: 09 23 20 6d 65 61 6e 69 6e 67 2c 20 62 65 20 69  .# meaning, be i
0d80: 6e 20 64 69 66 66 65 72 65 6e 74 20 63 68 61 6e  n different chan
0d90: 67 65 73 65 74 73 20 61 6e 64 20 73 6f 20 69 73  gesets and so is
0da0: 20 66 6f 72 6d 61 6c 6c 79 20 6e 6f 74 0a 09 23   formally not..#
0db0: 20 75 6e 69 71 75 65 2e 20 53 6f 20 77 65 20 63   unique. So we c
0dc0: 61 6e 20 6f 6e 6c 79 20 73 61 79 20 74 68 61 74  an only say that
0dd0: 20 69 74 20 69 73 20 75 6e 69 71 75 65 20 77 69   it is unique wi
0de0: 74 68 69 6e 20 74 68 65 0a 09 23 20 63 68 61 6e  thin the..# chan
0df0: 67 65 73 65 74 2e 20 54 68 65 20 69 6e 74 65 67  geset. The integ
0e00: 72 69 74 79 20 6d 6f 64 75 6c 65 20 68 61 73 20  rity module has 
0e10: 73 74 72 6f 6e 67 65 72 20 63 68 65 63 6b 73 2e  stronger checks.
0e20: 0a 0a 09 73 74 61 74 65 20 65 78 74 65 6e 64 20  ...state extend 
0e30: 63 73 69 74 65 6d 20 7b 0a 09 20 20 20 20 63 69  csitem {..    ci
0e40: 64 20 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20  d  INTEGER  NOT 
0e50: 4e 55 4c 4c 20 20 52 45 46 45 52 45 4e 43 45 53  NULL  REFERENCES
0e60: 20 63 68 61 6e 67 65 73 65 74 2c 0a 09 20 20 20   changeset,..   
0e70: 20 70 6f 73 20 20 49 4e 54 45 47 45 52 20 20 4e   pos  INTEGER  N
0e80: 4f 54 20 4e 55 4c 4c 2c 0a 09 20 20 20 20 69 69  OT NULL,..    ii
0e90: 64 20 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20  d  INTEGER  NOT 
0ea0: 4e 55 4c 4c 2c 20 2d 2d 20 52 45 46 45 52 45 4e  NULL, -- REFEREN
0eb0: 43 45 53 20 72 65 76 69 73 69 6f 6e 7c 74 61 67  CES revision|tag
0ec0: 7c 62 72 61 6e 63 68 0a 09 20 20 20 20 55 4e 49  |branch..    UNI
0ed0: 51 55 45 20 28 63 69 64 2c 20 70 6f 73 29 2c 0a  QUE (cid, pos),.
0ee0: 09 20 20 20 20 55 4e 49 51 55 45 20 28 63 69 64  .    UNIQUE (cid
0ef0: 2c 20 69 69 64 29 0a 09 7d 20 7b 20 69 69 64 20  , iid)..} { iid 
0f00: 7d 0a 09 23 20 49 6e 64 65 78 20 6f 6e 3a 20 69  }..# Index on: i
0f10: 69 64 20 28 73 75 63 63 65 73 73 6f 72 2f 70 72  id (successor/pr
0f20: 65 64 65 63 65 73 73 6f 72 20 72 65 74 72 69 65  edecessor retrie
0f30: 76 61 6c 29 0a 0a 09 70 72 6f 6a 65 63 74 3a 3a  val)...project::
0f40: 72 65 76 20 67 65 74 63 73 74 79 70 65 73 0a 09  rev getcstypes..
0f50: 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20  return.    }..  
0f60: 20 20 74 79 70 65 6d 65 74 68 6f 64 20 6c 6f 61    typemethod loa
0f70: 64 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d  d {} {..# Pass m
0f80: 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 65  anager interface
0f90: 2e 20 45 78 65 63 75 74 65 64 20 74 6f 20 6c 6f  . Executed to lo
0fa0: 61 64 20 64 61 74 61 20 63 6f 6d 70 75 74 65 64  ad data computed
0fb0: 20 62 79 0a 09 23 20 74 68 69 73 20 70 61 73 73   by..# this pass
0fc0: 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 77 68 65   into memory whe
0fd0: 6e 20 74 68 69 73 20 70 61 73 73 20 69 73 20 73  n this pass is s
0fe0: 6b 69 70 70 65 64 20 69 6e 73 74 65 61 64 20 6f  kipped instead o
0ff0: 66 0a 09 23 20 65 78 65 63 75 74 65 64 2e 0a 0a  f..# executed...
1000: 09 73 74 61 74 65 20 75 73 65 20 63 68 61 6e 67  .state use chang
1010: 65 73 65 74 0a 09 73 74 61 74 65 20 75 73 65 20  eset..state use 
1020: 63 73 69 74 65 6d 0a 09 73 74 61 74 65 20 75 73  csitem..state us
1030: 65 20 63 73 74 79 70 65 0a 0a 09 23 20 4e 65 65  e cstype...# Nee
1040: 64 20 74 68 65 20 74 79 70 65 73 20 66 69 72 73  d the types firs
1050: 74 2c 20 74 68 65 20 63 6f 6e 73 74 72 75 63 74  t, the construct
1060: 6f 72 20 75 73 65 64 20 69 6e 73 69 64 65 20 6f  or used inside o
1070: 66 20 74 68 65 0a 09 23 20 27 6c 6f 61 64 27 20  f the..# 'load' 
1080: 62 65 6c 6f 77 20 75 73 65 73 20 74 68 65 6d 20  below uses them 
1090: 74 6f 20 61 73 73 65 72 74 20 74 68 65 20 63 6f  to assert the co
10a0: 72 72 65 63 74 6e 65 73 73 20 6f 66 20 74 79 70  rrectness of typ
10b0: 65 0a 09 23 20 6e 61 6d 65 73 2e 0a 09 70 72 6f  e..# names...pro
10c0: 6a 65 63 74 3a 3a 72 65 76 20 67 65 74 63 73 74  ject::rev getcst
10d0: 79 70 65 73 0a 09 70 72 6f 6a 65 63 74 3a 3a 72  ypes..project::r
10e0: 65 76 20 6c 6f 61 64 20 3a 3a 76 63 3a 3a 66 6f  ev load ::vc::fo
10f0: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76  ssil::import::cv
1100: 73 3a 3a 72 65 70 6f 73 69 74 6f 72 79 0a 09 70  s::repository..p
1110: 72 6f 6a 65 63 74 3a 3a 72 65 76 20 6c 6f 61 64  roject::rev load
1120: 63 6f 75 6e 74 65 72 0a 09 72 65 74 75 72 6e 0a  counter..return.
1130: 20 20 20 20 7d 0a 0a 20 20 20 20 74 79 70 65 6d      }..    typem
1140: 65 74 68 6f 64 20 72 75 6e 20 7b 7d 20 7b 0a 09  ethod run {} {..
1150: 23 20 50 61 73 73 20 6d 61 6e 61 67 65 72 20 69  # Pass manager i
1160: 6e 74 65 72 66 61 63 65 2e 20 45 78 65 63 75 74  nterface. Execut
1170: 65 64 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68  ed to perform th
1180: 65 0a 09 23 20 66 75 6e 63 74 69 6f 6e 61 6c 69  e..# functionali
1190: 74 79 20 6f 66 20 74 68 65 20 70 61 73 73 2e 0a  ty of the pass..
11a0: 0a 09 73 74 61 74 65 20 74 72 61 6e 73 61 63 74  ..state transact
11b0: 69 6f 6e 20 7b 0a 09 20 20 20 20 43 72 65 61 74  ion {..    Creat
11c0: 65 52 65 76 69 73 69 6f 6e 43 68 61 6e 67 65 73  eRevisionChanges
11d0: 65 74 73 20 20 3b 20 23 20 47 72 6f 75 70 20 66  ets  ; # Group f
11e0: 69 6c 65 20 72 65 76 69 73 69 6f 6e 73 20 69 6e  ile revisions in
11f0: 74 6f 20 63 73 65 74 73 2e 0a 09 20 20 20 20 42  to csets...    B
1200: 72 65 61 6b 49 6e 74 65 72 6e 61 6c 44 65 70 65  reakInternalDepe
1210: 6e 64 65 6e 63 69 65 73 20 3b 20 23 20 53 70 6c  ndencies ; # Spl
1220: 69 74 20 74 68 65 20 63 73 65 74 73 20 62 61 73  it the csets bas
1230: 65 64 20 6f 6e 20 69 6e 74 65 72 6e 61 6c 20 63  ed on internal c
1240: 6f 6e 66 6c 69 63 74 73 2e 0a 09 20 20 20 20 43  onflicts...    C
1250: 72 65 61 74 65 53 79 6d 62 6f 6c 43 68 61 6e 67  reateSymbolChang
1260: 65 73 65 74 73 20 20 20 20 3b 20 23 20 43 72 65  esets    ; # Cre
1270: 61 74 65 20 63 73 65 74 73 20 66 6f 72 20 74 61  ate csets for ta
1280: 67 73 20 61 6e 64 20 62 72 61 6e 63 68 65 73 2e  gs and branches.
1290: 0a 09 20 20 20 20 50 65 72 73 69 73 74 54 68 65  ..    PersistThe
12a0: 43 68 61 6e 67 65 73 65 74 73 0a 09 7d 0a 0a 09  Changesets..}...
12b0: 72 65 70 6f 73 69 74 6f 72 79 20 70 72 69 6e 74  repository print
12c0: 63 73 65 74 73 74 61 74 69 73 74 69 63 73 0a 09  csetstatistics..
12d0: 69 6e 74 65 67 72 69 74 79 20 63 68 61 6e 67 65  integrity change
12e0: 73 65 74 73 0a 09 72 65 74 75 72 6e 0a 20 20 20  sets..return.   
12f0: 20 7d 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68   }..    typemeth
1300: 6f 64 20 64 69 73 63 61 72 64 20 7b 7d 20 7b 0a  od discard {} {.
1310: 09 23 20 50 61 73 73 20 6d 61 6e 61 67 65 72 20  .# Pass manager 
1320: 69 6e 74 65 72 66 61 63 65 2e 20 45 78 65 63 75  interface. Execu
1330: 74 65 64 20 66 6f 72 20 61 6c 6c 20 70 61 73 73  ted for all pass
1340: 65 73 20 61 66 74 65 72 20 74 68 65 0a 09 23 20  es after the..# 
1350: 72 75 6e 20 70 61 73 73 65 73 2c 20 74 6f 20 72  run passes, to r
1360: 65 6d 6f 76 65 20 61 6c 6c 20 64 61 74 61 20 6f  emove all data o
1370: 66 20 74 68 69 73 20 70 61 73 73 20 66 72 6f 6d  f this pass from
1380: 20 74 68 65 20 73 74 61 74 65 2c 0a 09 23 20 61   the state,..# a
1390: 73 20 62 65 69 6e 67 20 6f 75 74 20 6f 66 20 64  s being out of d
13a0: 61 74 65 2e 0a 0a 09 73 74 61 74 65 20 64 69 73  ate....state dis
13b0: 63 61 72 64 20 63 68 61 6e 67 65 73 65 74 0a 09  card changeset..
13c0: 73 74 61 74 65 20 64 69 73 63 61 72 64 20 63 73  state discard cs
13d0: 74 79 70 65 0a 09 73 74 61 74 65 20 64 69 73 63  type..state disc
13e0: 61 72 64 20 63 73 69 74 65 6d 0a 09 72 65 74 75  ard csitem..retu
13f0: 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 23 20  rn.    }..    # 
1400: 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23  # ## ### ##### #
1410: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23  ####### ########
1420: 23 23 23 23 23 0a 20 20 20 20 23 23 20 49 6e 74  #####.    ## Int
1430: 65 72 6e 61 6c 20 6d 65 74 68 6f 64 73 0a 0a 20  ernal methods.. 
1440: 20 20 20 70 72 6f 63 20 43 72 65 61 74 65 52 65     proc CreateRe
1450: 76 69 73 69 6f 6e 43 68 61 6e 67 65 73 65 74 73  visionChangesets
1460: 20 7b 7d 20 7b 0a 09 6c 6f 67 20 77 72 69 74 65   {} {..log write
1470: 20 33 20 69 6e 69 74 63 73 65 74 73 20 7b 43 72   3 initcsets {Cr
1480: 65 61 74 65 20 63 68 61 6e 67 65 73 65 74 73 20  eate changesets 
1490: 62 61 73 65 64 20 6f 6e 20 72 65 76 69 73 69 6f  based on revisio
14a0: 6e 73 7d 0a 0a 09 23 20 54 6f 20 67 65 74 20 74  ns}...# To get t
14b0: 68 65 20 69 6e 69 74 69 61 6c 20 6f 66 20 63 68  he initial of ch
14c0: 61 6e 67 65 73 65 74 73 20 77 65 20 66 69 72 73  angesets we firs
14d0: 74 20 67 72 6f 75 70 20 61 6c 6c 20 66 69 6c 65  t group all file
14e0: 0a 09 23 20 6c 65 76 65 6c 20 72 65 76 69 73 69  ..# level revisi
14f0: 6f 6e 73 20 75 73 69 6e 67 20 74 68 65 20 73 61  ons using the sa
1500: 6d 65 20 6d 65 74 61 20 64 61 74 61 20 65 6e 74  me meta data ent
1510: 72 79 20 74 6f 67 65 74 68 65 72 2e 20 41 73 0a  ry together. As.
1520: 09 23 20 74 68 65 20 6d 65 74 61 20 64 61 74 61  .# the meta data
1530: 20 65 6e 63 6f 64 65 73 20 6e 6f 74 20 6f 6e 6c   encodes not onl
1540: 79 20 61 75 74 68 6f 72 20 61 6e 64 20 6c 6f 67  y author and log
1550: 20 6d 65 73 73 61 67 65 2c 20 62 75 74 0a 09 23   message, but..#
1560: 20 61 6c 73 6f 20 6c 69 6e 65 20 6f 66 20 64 65   also line of de
1570: 76 65 6c 6f 70 6d 65 6e 74 20 61 6e 64 20 70 72  velopment and pr
1580: 6f 6a 65 63 74 20 77 65 20 63 61 6e 20 62 65 20  oject we can be 
1590: 73 75 72 65 20 74 68 61 74 0a 09 23 20 72 65 76  sure that..# rev
15a0: 69 73 69 6f 6e 73 20 69 6e 20 64 69 66 66 65 72  isions in differ
15b0: 65 6e 74 20 70 72 6f 6a 65 63 74 20 61 6e 64 20  ent project and 
15c0: 6c 69 6e 65 73 20 6f 66 20 64 65 76 65 6c 6f 70  lines of develop
15d0: 6d 65 6e 74 20 61 72 65 0a 09 23 20 6e 6f 74 20  ment are..# not 
15e0: 67 72 6f 75 70 65 64 20 74 6f 67 65 74 68 65 72  grouped together
15f0: 2e 20 49 6e 20 63 6f 6e 74 72 61 73 74 20 74 6f  . In contrast to
1600: 20 63 76 73 32 73 76 6e 20 77 65 20 64 6f 20 5f   cvs2svn we do _
1610: 5f 6e 6f 74 5f 5f 0a 09 23 20 75 73 65 20 64 69  _not__..# use di
1620: 73 74 61 6e 63 65 20 69 6e 20 74 69 6d 65 20 62  stance in time b
1630: 65 74 77 65 65 6e 20 72 65 76 69 73 69 6f 6e 73  etween revisions
1640: 20 74 6f 20 62 72 65 61 6b 20 74 68 65 6d 0a 09   to break them..
1650: 23 20 61 70 61 72 74 2e 20 57 65 20 68 61 76 65  # apart. We have
1660: 20 73 65 65 6e 20 43 56 53 20 72 65 70 6f 73 69   seen CVS reposi
1670: 74 6f 72 69 65 73 20 28 66 72 6f 6d 20 53 46 29  tories (from SF)
1680: 20 77 68 65 72 65 20 61 0a 09 23 20 73 69 6e 67   where a..# sing
1690: 6c 65 20 63 6f 6d 6d 69 74 20 63 6f 6e 74 61 69  le commit contai
16a0: 6e 65 64 20 72 65 76 69 73 69 6f 6e 73 20 73 65  ned revisions se
16b0: 76 65 72 61 6c 20 68 6f 75 72 73 20 61 70 61 72  veral hours apar
16c0: 74 2c 0a 09 23 20 6c 69 6b 65 6c 79 20 64 75 65  t,..# likely due
16d0: 20 74 6f 20 74 72 6f 75 62 6c 65 20 6f 6e 20 74   to trouble on t
16e0: 68 65 20 73 65 72 76 65 72 20 68 6f 73 74 69 6e  he server hostin
16f0: 67 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79  g the repository
1700: 2e 0a 0a 09 23 20 57 65 20 6f 72 64 65 72 20 74  ....# We order t
1710: 68 65 20 72 65 76 69 73 69 6f 6e 73 20 68 65 72  he revisions her
1720: 65 20 62 79 20 74 69 6d 65 2c 20 74 68 69 73 20  e by time, this 
1730: 77 69 6c 6c 20 68 65 6c 70 20 74 68 65 0a 09 23  will help the..#
1740: 20 6c 61 74 65 72 20 70 61 73 73 65 73 20 28 61   later passes (a
1750: 76 6f 69 64 73 20 6a 6f 69 6e 73 20 6c 61 74 65  voids joins late
1760: 72 20 74 6f 20 67 65 74 20 61 74 20 74 68 65 20  r to get at the 
1770: 6f 72 64 65 72 69 6e 67 0a 09 23 20 69 6e 66 6f  ordering..# info
1780: 29 2e 0a 0a 09 73 65 74 20 6e 20 30 0a 0a 09 73  )....set n 0...s
1790: 65 74 20 6c 61 73 74 6d 65 74 61 20 20 20 20 7b  et lastmeta    {
17a0: 7d 0a 09 73 65 74 20 6c 61 73 74 70 72 6f 6a 65  }..set lastproje
17b0: 63 74 20 7b 7d 0a 09 73 65 74 20 72 65 76 69 73  ct {}..set revis
17c0: 69 6f 6e 73 20 20 20 7b 7d 0a 0a 09 23 20 4e 6f  ions   {}...# No
17d0: 74 65 3a 20 57 65 20 63 6f 75 6c 64 20 68 61 76  te: We could hav
17e0: 65 20 77 72 69 74 74 65 6e 20 74 68 69 73 20 6c  e written this l
17f0: 6f 6f 70 20 74 6f 20 63 72 65 61 74 65 20 74 68  oop to create th
1800: 65 20 63 73 65 74 73 0a 09 23 20 20 20 20 20 20  e csets..#      
1810: 20 65 61 72 6c 79 2c 20 65 78 74 65 6e 64 69 6e   early, extendin
1820: 67 20 74 68 65 6d 20 77 69 74 68 20 61 6c 6c 20  g them with all 
1830: 74 68 65 69 72 20 72 65 76 69 73 69 6f 6e 73 2e  their revisions.
1840: 20 54 68 69 73 0a 09 23 20 20 20 20 20 20 20 68   This..#       h
1850: 6f 77 65 76 65 72 20 77 6f 75 6c 64 20 6d 65 61  owever would mea
1860: 6e 20 6c 6f 74 73 20 6f 66 20 28 73 6c 6f 77 29  n lots of (slow)
1870: 20 6d 65 74 68 6f 64 20 69 6e 76 6f 6b 61 74 69   method invokati
1880: 6f 6e 73 0a 09 23 20 20 20 20 20 20 20 6f 6e 20  ons..#       on 
1890: 74 68 65 20 63 73 65 74 73 2e 20 44 6f 69 6e 67  the csets. Doing
18a0: 20 69 74 20 6c 69 6b 65 20 74 68 69 73 2c 20 6c   it like this, l
18b0: 61 74 65 20 63 72 65 61 74 69 6f 6e 2c 20 6d 65  ate creation, me
18c0: 61 6e 73 0a 09 23 20 20 20 20 20 20 20 6c 65 73  ans..#       les
18d0: 73 20 73 75 63 68 20 63 61 6c 6c 73 2e 20 4e 6f  s such calls. No
18e0: 6e 65 2c 20 62 75 74 20 74 68 65 20 63 72 65 61  ne, but the crea
18f0: 74 69 6f 6e 20 69 74 73 65 6c 66 2e 0a 0a 09 66  tion itself....f
1900: 6f 72 65 61 63 68 20 7b 6d 69 64 20 72 69 64 20  oreach {mid rid 
1910: 70 69 64 7d 20 5b 73 74 61 74 65 20 72 75 6e 20  pid} [state run 
1920: 7b 0a 09 20 20 20 20 53 45 4c 45 43 54 20 4d 2e  {..    SELECT M.
1930: 6d 69 64 2c 20 52 2e 72 69 64 2c 20 4d 2e 70 69  mid, R.rid, M.pi
1940: 64 0a 09 20 20 20 20 46 52 4f 4d 20 20 20 72 65  d..    FROM   re
1950: 76 69 73 69 6f 6e 20 52 2c 20 6d 65 74 61 20 4d  vision R, meta M
1960: 20 20 20 2d 2d 20 52 20 3d 3d 3e 20 4d 2c 20 75     -- R ==> M, u
1970: 73 69 6e 67 20 50 4b 20 69 6e 64 65 78 20 6f 66  sing PK index of
1980: 20 4d 2e 0a 09 20 20 20 20 57 48 45 52 45 20 20   M...    WHERE  
1990: 52 2e 6d 69 64 20 3d 20 4d 2e 6d 69 64 0a 09 20  R.mid = M.mid.. 
19a0: 20 20 20 4f 52 44 45 52 20 20 42 59 20 4d 2e 6d     ORDER  BY M.m
19b0: 69 64 2c 20 52 2e 64 61 74 65 0a 09 7d 5d 20 7b  id, R.date..}] {
19c0: 0a 09 20 20 20 20 69 66 20 7b 24 6c 61 73 74 6d  ..    if {$lastm
19d0: 65 74 61 20 21 3d 20 24 6d 69 64 7d 20 7b 0a 09  eta != $mid} {..
19e0: 09 69 66 20 7b 5b 6c 6c 65 6e 67 74 68 20 24 72  .if {[llength $r
19f0: 65 76 69 73 69 6f 6e 73 5d 7d 20 7b 0a 09 09 20  evisions]} {... 
1a00: 20 20 20 69 6e 63 72 20 6e 0a 09 09 20 20 20 20     incr n...    
1a10: 73 65 74 20 20 70 20 5b 72 65 70 6f 73 69 74 6f  set  p [reposito
1a20: 72 79 20 70 72 6f 6a 65 63 74 6f 66 20 24 6c 61  ry projectof $la
1a30: 73 74 70 72 6f 6a 65 63 74 5d 0a 09 09 20 20 20  stproject]...   
1a40: 20 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 25 41   project::rev %A
1a50: 55 54 4f 25 20 24 70 20 72 65 76 20 24 6c 61 73  UTO% $p rev $las
1a60: 74 6d 65 74 61 20 24 72 65 76 69 73 69 6f 6e 73  tmeta $revisions
1a70: 0a 09 09 20 20 20 20 73 65 74 20 72 65 76 69 73  ...    set revis
1a80: 69 6f 6e 73 20 7b 7d 0a 09 09 7d 0a 09 09 73 65  ions {}...}...se
1a90: 74 20 6c 61 73 74 6d 65 74 61 20 20 20 20 24 6d  t lastmeta    $m
1aa0: 69 64 0a 09 09 73 65 74 20 6c 61 73 74 70 72 6f  id...set lastpro
1ab0: 6a 65 63 74 20 24 70 69 64 0a 09 20 20 20 20 7d  ject $pid..    }
1ac0: 0a 09 20 20 20 20 6c 61 70 70 65 6e 64 20 72 65  ..    lappend re
1ad0: 76 69 73 69 6f 6e 73 20 24 72 69 64 0a 09 7d 0a  visions $rid..}.
1ae0: 0a 09 69 66 20 7b 5b 6c 6c 65 6e 67 74 68 20 24  ..if {[llength $
1af0: 72 65 76 69 73 69 6f 6e 73 5d 7d 20 7b 0a 09 20  revisions]} {.. 
1b00: 20 20 20 69 6e 63 72 20 6e 0a 09 20 20 20 20 73     incr n..    s
1b10: 65 74 20 20 70 20 5b 72 65 70 6f 73 69 74 6f 72  et  p [repositor
1b20: 79 20 70 72 6f 6a 65 63 74 6f 66 20 24 6c 61 73  y projectof $las
1b30: 74 70 72 6f 6a 65 63 74 5d 0a 09 20 20 20 20 70  tproject]..    p
1b40: 72 6f 6a 65 63 74 3a 3a 72 65 76 20 25 41 55 54  roject::rev %AUT
1b50: 4f 25 20 24 70 20 72 65 76 20 24 6c 61 73 74 6d  O% $p rev $lastm
1b60: 65 74 61 20 24 72 65 76 69 73 69 6f 6e 73 0a 09  eta $revisions..
1b70: 7d 0a 0a 09 6c 6f 67 20 77 72 69 74 65 20 34 20  }...log write 4 
1b80: 69 6e 69 74 63 73 65 74 73 20 22 43 72 65 61 74  initcsets "Creat
1b90: 65 64 20 5b 6e 73 70 20 24 6e 20 7b 72 65 76 69  ed [nsp $n {revi
1ba0: 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 74 7d 5d  sion changeset}]
1bb0: 22 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a  "..return.    }.
1bc0: 0a 20 20 20 20 70 72 6f 63 20 43 72 65 61 74 65  .    proc Create
1bd0: 53 79 6d 62 6f 6c 43 68 61 6e 67 65 73 65 74 73  SymbolChangesets
1be0: 20 7b 7d 20 7b 0a 09 6c 6f 67 20 77 72 69 74 65   {} {..log write
1bf0: 20 33 20 69 6e 69 74 63 73 65 74 73 20 7b 43 72   3 initcsets {Cr
1c00: 65 61 74 65 20 63 68 61 6e 67 65 73 65 74 73 20  eate changesets 
1c10: 62 61 73 65 64 20 6f 6e 20 73 79 6d 62 6f 6c 73  based on symbols
1c20: 7d 0a 0a 09 23 20 54 61 67 73 20 61 6e 64 20 62  }...# Tags and b
1c30: 72 61 6e 63 68 65 73 20 69 6e 64 75 63 65 20 63  ranches induce c
1c40: 68 61 6e 67 65 73 65 74 73 20 61 73 20 77 65 6c  hangesets as wel
1c50: 6c 2c 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68  l, containing th
1c60: 65 0a 09 23 20 72 65 76 69 73 69 6f 6e 73 20 74  e..# revisions t
1c70: 68 65 79 20 61 72 65 20 61 74 74 61 63 68 65 64  hey are attached
1c80: 20 74 6f 20 28 74 61 67 73 29 2c 20 6f 72 20 73   to (tags), or s
1c90: 70 61 77 6e 65 64 20 66 72 6f 6d 0a 09 23 20 28  pawned from..# (
1ca0: 62 72 61 6e 63 68 65 73 29 2e 0a 0a 09 73 65 74  branches)....set
1cb0: 20 6e 20 30 0a 0a 09 23 20 46 69 72 73 74 20 70   n 0...# First p
1cc0: 72 6f 63 65 73 73 20 74 68 65 20 74 61 67 73 2c  rocess the tags,
1cd0: 20 74 68 65 6e 20 74 68 65 20 62 72 61 6e 63 68   then the branch
1ce0: 65 73 2e 20 57 65 20 6b 6e 6f 77 20 74 68 61 74  es. We know that
1cf0: 0a 09 23 20 74 68 65 69 72 20 69 64 73 20 64 6f  ..# their ids do
1d00: 20 6e 6f 74 20 6f 76 65 72 6c 61 70 20 77 69 74   not overlap wit
1d10: 68 20 65 61 63 68 20 6f 74 68 65 72 2e 0a 0a 09  h each other....
1d20: 73 65 74 20 6c 61 73 74 73 79 6d 62 6f 6c 20 20  set lastsymbol  
1d30: 7b 7d 0a 09 73 65 74 20 6c 61 73 74 70 72 6f 6a  {}..set lastproj
1d40: 65 63 74 20 7b 7d 0a 09 73 65 74 20 74 61 67 73  ect {}..set tags
1d50: 20 20 20 20 20 20 20 20 7b 7d 0a 0a 09 66 6f 72          {}...for
1d60: 65 61 63 68 20 7b 73 69 64 20 74 69 64 20 70 69  each {sid tid pi
1d70: 64 7d 20 5b 73 74 61 74 65 20 72 75 6e 20 7b 0a  d} [state run {.
1d80: 09 20 20 20 20 53 45 4c 45 43 54 20 53 2e 73 69  .    SELECT S.si
1d90: 64 2c 20 54 2e 74 69 64 2c 20 53 2e 70 69 64 0a  d, T.tid, S.pid.
1da0: 09 20 20 20 20 46 52 4f 4d 20 20 74 61 67 20 54  .    FROM  tag T
1db0: 2c 20 73 79 6d 62 6f 6c 20 53 20 20 20 20 20 2d  , symbol S     -
1dc0: 2d 20 54 20 3d 3d 3e 20 52 2f 53 2c 20 75 73 69  - T ==> R/S, usi
1dd0: 6e 67 20 50 4b 20 69 6e 64 69 63 65 73 20 6f 66  ng PK indices of
1de0: 20 52 2c 20 53 2e 0a 09 20 20 20 20 57 48 45 52   R, S...    WHER
1df0: 45 20 54 2e 73 69 64 20 3d 20 53 2e 73 69 64 0a  E T.sid = S.sid.
1e00: 09 20 20 20 20 4f 52 44 45 52 20 42 59 20 53 2e  .    ORDER BY S.
1e10: 73 69 64 2c 20 54 2e 74 69 64 0a 09 7d 5d 20 7b  sid, T.tid..}] {
1e20: 0a 09 20 20 20 20 69 66 20 7b 24 6c 61 73 74 73  ..    if {$lasts
1e30: 79 6d 62 6f 6c 20 21 3d 20 24 73 69 64 7d 20 7b  ymbol != $sid} {
1e40: 0a 09 09 69 66 20 7b 5b 6c 6c 65 6e 67 74 68 20  ...if {[llength 
1e50: 24 74 61 67 73 5d 7d 20 7b 0a 09 09 20 20 20 20  $tags]} {...    
1e60: 69 6e 63 72 20 6e 0a 09 09 20 20 20 20 73 65 74  incr n...    set
1e70: 20 20 70 20 5b 72 65 70 6f 73 69 74 6f 72 79 20    p [repository 
1e80: 70 72 6f 6a 65 63 74 6f 66 20 24 6c 61 73 74 70  projectof $lastp
1e90: 72 6f 6a 65 63 74 5d 0a 09 09 20 20 20 20 70 72  roject]...    pr
1ea0: 6f 6a 65 63 74 3a 3a 72 65 76 20 25 41 55 54 4f  oject::rev %AUTO
1eb0: 25 20 24 70 20 73 79 6d 3a 3a 74 61 67 20 24 6c  % $p sym::tag $l
1ec0: 61 73 74 73 79 6d 62 6f 6c 20 24 74 61 67 73 0a  astsymbol $tags.
1ed0: 09 09 20 20 20 20 73 65 74 20 74 61 67 73 20 7b  ..    set tags {
1ee0: 7d 0a 09 09 7d 0a 09 09 73 65 74 20 6c 61 73 74  }...}...set last
1ef0: 73 79 6d 62 6f 6c 20 20 24 73 69 64 0a 09 09 73  symbol  $sid...s
1f00: 65 74 20 6c 61 73 74 70 72 6f 6a 65 63 74 20 24  et lastproject $
1f10: 70 69 64 0a 09 20 20 20 20 7d 0a 09 20 20 20 20  pid..    }..    
1f20: 6c 61 70 70 65 6e 64 20 74 61 67 73 20 24 74 69  lappend tags $ti
1f30: 64 0a 09 7d 0a 0a 09 69 66 20 7b 5b 6c 6c 65 6e  d..}...if {[llen
1f40: 67 74 68 20 24 74 61 67 73 5d 7d 20 7b 0a 09 20  gth $tags]} {.. 
1f50: 20 20 20 69 6e 63 72 20 6e 0a 09 20 20 20 20 73     incr n..    s
1f60: 65 74 20 20 70 20 5b 72 65 70 6f 73 69 74 6f 72  et  p [repositor
1f70: 79 20 70 72 6f 6a 65 63 74 6f 66 20 24 6c 61 73  y projectof $las
1f80: 74 70 72 6f 6a 65 63 74 5d 0a 09 20 20 20 20 70  tproject]..    p
1f90: 72 6f 6a 65 63 74 3a 3a 72 65 76 20 25 41 55 54  roject::rev %AUT
1fa0: 4f 25 20 24 70 20 73 79 6d 3a 3a 74 61 67 20 24  O% $p sym::tag $
1fb0: 6c 61 73 74 73 79 6d 62 6f 6c 20 24 74 61 67 73  lastsymbol $tags
1fc0: 0a 09 7d 0a 0a 09 73 65 74 20 6c 61 73 74 73 79  ..}...set lastsy
1fd0: 6d 62 6f 6c 20 7b 7d 0a 09 73 65 74 20 6c 61 73  mbol {}..set las
1fe0: 70 72 6f 6a 65 63 74 20 7b 7d 0a 09 73 65 74 20  project {}..set 
1ff0: 62 72 61 6e 63 68 65 73 20 20 20 7b 7d 0a 0a 09  branches   {}...
2000: 66 6f 72 65 61 63 68 20 7b 73 69 64 20 62 69 64  foreach {sid bid
2010: 20 70 69 64 7d 20 5b 73 74 61 74 65 20 72 75 6e   pid} [state run
2020: 20 7b 0a 09 20 20 20 20 53 45 4c 45 43 54 20 53   {..    SELECT S
2030: 2e 73 69 64 2c 20 42 2e 62 69 64 2c 20 53 2e 70  .sid, B.bid, S.p
2040: 69 64 0a 09 20 20 20 20 46 52 4f 4d 20 20 62 72  id..    FROM  br
2050: 61 6e 63 68 20 42 2c 20 73 79 6d 62 6f 6c 20 53  anch B, symbol S
2060: 20 20 2d 2d 20 42 20 3d 3d 3e 20 52 2f 53 2c 20    -- B ==> R/S, 
2070: 75 73 69 6e 67 20 50 4b 20 69 6e 64 69 63 65 73  using PK indices
2080: 20 6f 66 20 52 2c 20 53 2e 0a 09 20 20 20 20 57   of R, S...    W
2090: 48 45 52 45 20 42 2e 73 69 64 20 20 3d 20 53 2e  HERE B.sid  = S.
20a0: 73 69 64 0a 09 20 20 20 20 4f 52 44 45 52 20 42  sid..    ORDER B
20b0: 59 20 53 2e 73 69 64 2c 20 42 2e 62 69 64 0a 09  Y S.sid, B.bid..
20c0: 7d 5d 20 7b 0a 09 20 20 20 20 69 66 20 7b 24 6c  }] {..    if {$l
20d0: 61 73 74 73 79 6d 62 6f 6c 20 21 3d 20 24 73 69  astsymbol != $si
20e0: 64 7d 20 7b 0a 09 09 69 66 20 7b 5b 6c 6c 65 6e  d} {...if {[llen
20f0: 67 74 68 20 24 62 72 61 6e 63 68 65 73 5d 7d 20  gth $branches]} 
2100: 7b 0a 09 09 20 20 20 20 69 6e 63 72 20 6e 0a 09  {...    incr n..
2110: 09 20 20 20 20 73 65 74 20 20 70 20 5b 72 65 70  .    set  p [rep
2120: 6f 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 6f  ository projecto
2130: 66 20 24 6c 61 73 74 70 72 6f 6a 65 63 74 5d 0a  f $lastproject].
2140: 09 09 20 20 20 20 70 72 6f 6a 65 63 74 3a 3a 72  ..    project::r
2150: 65 76 20 25 41 55 54 4f 25 20 24 70 20 73 79 6d  ev %AUTO% $p sym
2160: 3a 3a 62 72 61 6e 63 68 20 24 6c 61 73 74 73 79  ::branch $lastsy
2170: 6d 62 6f 6c 20 24 62 72 61 6e 63 68 65 73 0a 09  mbol $branches..
2180: 09 20 20 20 20 73 65 74 20 62 72 61 6e 63 68 65  .    set branche
2190: 73 20 7b 7d 0a 09 09 7d 0a 09 09 73 65 74 20 6c  s {}...}...set l
21a0: 61 73 74 73 79 6d 62 6f 6c 20 20 24 73 69 64 0a  astsymbol  $sid.
21b0: 09 09 73 65 74 20 6c 61 73 74 70 72 6f 6a 65 63  ..set lastprojec
21c0: 74 20 24 70 69 64 0a 09 20 20 20 20 7d 0a 09 20  t $pid..    }.. 
21d0: 20 20 20 6c 61 70 70 65 6e 64 20 62 72 61 6e 63     lappend branc
21e0: 68 65 73 20 24 62 69 64 0a 09 7d 0a 0a 09 69 66  hes $bid..}...if
21f0: 20 7b 5b 6c 6c 65 6e 67 74 68 20 24 62 72 61 6e   {[llength $bran
2200: 63 68 65 73 5d 7d 20 7b 0a 09 20 20 20 20 69 6e  ches]} {..    in
2210: 63 72 20 6e 0a 09 20 20 20 20 73 65 74 20 20 70  cr n..    set  p
2220: 20 5b 72 65 70 6f 73 69 74 6f 72 79 20 70 72 6f   [repository pro
2230: 6a 65 63 74 6f 66 20 24 6c 61 73 74 70 72 6f 6a  jectof $lastproj
2240: 65 63 74 5d 0a 09 20 20 20 20 70 72 6f 6a 65 63  ect]..    projec
2250: 74 3a 3a 72 65 76 20 25 41 55 54 4f 25 20 24 70  t::rev %AUTO% $p
2260: 20 73 79 6d 3a 3a 62 72 61 6e 63 68 20 24 6c 61   sym::branch $la
2270: 73 74 73 79 6d 62 6f 6c 20 24 62 72 61 6e 63 68  stsymbol $branch
2280: 65 73 0a 09 7d 0a 0a 09 6c 6f 67 20 77 72 69 74  es..}...log writ
2290: 65 20 34 20 69 6e 69 74 63 73 65 74 73 20 22 43  e 4 initcsets "C
22a0: 72 65 61 74 65 64 20 5b 6e 73 70 20 24 6e 20 7b  reated [nsp $n {
22b0: 73 79 6d 62 6f 6c 20 63 68 61 6e 67 65 73 65 74  symbol changeset
22c0: 7d 5d 22 0a 09 72 65 74 75 72 6e 0a 20 20 20 20  }]"..return.    
22d0: 7d 0a 0a 20 20 20 20 70 72 6f 63 20 42 72 65 61  }..    proc Brea
22e0: 6b 49 6e 74 65 72 6e 61 6c 44 65 70 65 6e 64 65  kInternalDepende
22f0: 6e 63 69 65 73 20 7b 7d 20 7b 0a 09 23 20 54 68  ncies {} {..# Th
2300: 69 73 20 63 6f 64 65 20 6f 70 65 72 61 74 65 73  is code operates
2310: 20 6f 6e 20 74 68 65 20 72 65 76 69 73 69 6f 6e   on the revision
2320: 20 63 68 61 6e 67 65 73 65 74 73 20 63 72 65 61   changesets crea
2330: 74 65 64 20 62 79 0a 09 23 20 27 43 72 65 61 74  ted by..# 'Creat
2340: 65 52 65 76 69 73 69 6f 6e 43 68 61 6e 67 65 73  eRevisionChanges
2350: 65 74 73 27 2e 20 41 73 20 73 75 63 68 20 69 74  ets'. As such it
2360: 20 68 61 73 20 74 6f 20 66 6f 6c 6c 6f 77 20 61   has to follow a
2370: 66 74 65 72 0a 09 23 20 69 74 2c 20 62 65 66 6f  fter..# it, befo
2380: 72 65 20 74 68 65 20 73 79 6d 62 6f 6c 20 63 68  re the symbol ch
2390: 61 6e 67 65 73 65 74 73 20 61 72 65 20 6d 61 64  angesets are mad
23a0: 65 2e 20 54 68 65 20 63 68 61 6e 67 65 73 65 74  e. The changeset
23b0: 73 0a 09 23 20 61 72 65 20 69 6e 73 70 65 63 74  s..# are inspect
23c0: 65 64 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 20  ed for internal 
23d0: 63 6f 6e 66 6c 69 63 74 73 20 61 6e 64 20 61 6e  conflicts and an
23e0: 79 20 73 75 63 68 20 61 72 65 20 62 72 6f 6b 65  y such are broke
23f0: 6e 0a 09 23 20 62 79 20 73 70 6c 69 74 74 69 6e  n..# by splittin
2400: 67 20 74 68 65 20 70 72 6f 62 6c 65 6d 61 74 69  g the problemati
2410: 63 20 63 68 61 6e 67 65 73 65 74 20 69 6e 74 6f  c changeset into
2420: 20 6d 75 6c 74 69 70 6c 65 0a 09 23 20 66 72 61   multiple..# fra
2430: 67 6d 65 6e 74 73 2e 20 54 68 65 20 72 65 73 75  gments. The resu
2440: 6c 74 73 20 61 72 65 20 63 68 61 6e 67 65 73 65  lts are changese
2450: 74 73 20 77 68 69 63 68 20 68 61 76 65 20 6e 6f  ts which have no
2460: 20 69 6e 74 65 72 6e 61 6c 0a 09 23 20 64 65 70   internal..# dep
2470: 65 6e 64 65 6e 63 69 65 73 2c 20 6f 6e 6c 79 20  endencies, only 
2480: 65 78 74 65 72 6e 61 6c 20 6f 6e 65 73 2e 0a 0a  external ones...
2490: 09 6c 6f 67 20 77 72 69 74 65 20 33 20 69 6e 69  .log write 3 ini
24a0: 74 63 73 65 74 73 20 7b 42 72 65 61 6b 20 69 6e  tcsets {Break in
24b0: 74 65 72 6e 61 6c 20 64 65 70 65 6e 64 65 6e 63  ternal dependenc
24c0: 69 65 73 7d 0a 09 73 65 74 20 6f 6c 64 20 5b 6c  ies}..set old [l
24d0: 6c 65 6e 67 74 68 20 5b 70 72 6f 6a 65 63 74 3a  length [project:
24e0: 3a 72 65 76 20 61 6c 6c 5d 5d 0a 0a 09 66 6f 72  :rev all]]...for
24f0: 65 61 63 68 20 63 73 65 74 20 5b 70 72 6f 6a 65  each cset [proje
2500: 63 74 3a 3a 72 65 76 20 61 6c 6c 5d 20 7b 0a 09  ct::rev all] {..
2510: 20 20 20 20 24 63 73 65 74 20 62 72 65 61 6b 69      $cset breaki
2520: 6e 74 65 72 6e 61 6c 64 65 70 65 6e 64 65 6e 63  nternaldependenc
2530: 69 65 73 0a 09 7d 0a 0a 09 73 65 74 20 6e 20 5b  ies..}...set n [
2540: 65 78 70 72 20 7b 5b 6c 6c 65 6e 67 74 68 20 5b  expr {[llength [
2550: 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 61 6c 6c  project::rev all
2560: 5d 5d 20 2d 20 24 6f 6c 64 7d 5d 0a 09 6c 6f 67  ]] - $old}]..log
2570: 20 77 72 69 74 65 20 34 20 69 6e 69 74 63 73 65   write 4 initcse
2580: 74 73 20 22 43 72 65 61 74 65 64 20 5b 6e 73 70  ts "Created [nsp
2590: 20 24 6e 20 7b 61 64 64 69 74 69 6f 6e 61 6c 20   $n {additional 
25a0: 72 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 73  revision changes
25b0: 65 74 7d 5d 22 0a 09 6c 6f 67 20 77 72 69 74 65  et}]"..log write
25c0: 20 34 20 69 6e 69 74 63 73 65 74 73 20 4f 6b 2e   4 initcsets Ok.
25d0: 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a  ..return.    }..
25e0: 20 20 20 20 70 72 6f 63 20 50 65 72 73 69 73 74      proc Persist
25f0: 54 68 65 43 68 61 6e 67 65 73 65 74 73 20 7b 7d  TheChangesets {}
2600: 20 7b 0a 09 6c 6f 67 20 77 72 69 74 65 20 33 20   {..log write 3 
2610: 69 6e 69 74 63 73 65 74 73 20 22 53 61 76 69 6e  initcsets "Savin
2620: 67 20 5b 6e 73 70 20 5b 6c 6c 65 6e 67 74 68 20  g [nsp [llength 
2630: 5b 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 61 6c  [project::rev al
2640: 6c 5d 5d 20 7b 69 6e 69 74 69 61 6c 20 63 68 61  l]] {initial cha
2650: 6e 67 65 73 65 74 7d 5d 20 74 6f 20 74 68 65 20  ngeset}] to the 
2660: 70 65 72 73 69 73 74 65 6e 74 20 73 74 61 74 65  persistent state
2670: 22 0a 0a 09 66 6f 72 65 61 63 68 20 63 73 65 74  "...foreach cset
2680: 20 5b 70 72 6f 6a 65 63 74 3a 3a 72 65 76 20 61   [project::rev a
2690: 6c 6c 5d 20 7b 0a 09 20 20 20 20 24 63 73 65 74  ll] {..    $cset
26a0: 20 70 65 72 73 69 73 74 0a 09 7d 0a 0a 09 6c 6f   persist..}...lo
26b0: 67 20 77 72 69 74 65 20 34 20 69 6e 69 74 63 73  g write 4 initcs
26c0: 65 74 73 20 4f 6b 2e 0a 09 72 65 74 75 72 6e 0a  ets Ok...return.
26d0: 20 20 20 20 7d 0a 0a 20 20 20 20 23 20 23 20 23      }..    # # #
26e0: 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 23  # ### ##### ####
26f0: 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23  #### ###########
2700: 23 23 0a 20 20 20 20 23 23 20 43 6f 6e 66 69 67  ##.    ## Config
2710: 75 72 61 74 69 6f 6e 0a 0a 20 20 20 20 70 72 61  uration..    pra
2720: 67 6d 61 20 2d 68 61 73 69 6e 73 74 61 6e 63 65  gma -hasinstance
2730: 73 20 20 20 6e 6f 20 3b 20 23 20 73 69 6e 67 6c  s   no ; # singl
2740: 65 74 6f 6e 0a 20 20 20 20 70 72 61 67 6d 61 20  eton.    pragma 
2750: 2d 68 61 73 74 79 70 65 69 6e 66 6f 20 20 20 20  -hastypeinfo    
2760: 6e 6f 20 3b 20 23 20 6e 6f 20 69 6e 74 72 6f 73  no ; # no intros
2770: 70 65 63 74 69 6f 6e 0a 20 20 20 20 70 72 61 67  pection.    prag
2780: 6d 61 20 2d 68 61 73 74 79 70 65 64 65 73 74 72  ma -hastypedestr
2790: 6f 79 20 6e 6f 20 3b 20 23 20 69 6d 6d 6f 72 74  oy no ; # immort
27a0: 61 6c 0a 0a 20 20 20 20 23 20 23 20 23 23 20 23  al..    # # ## #
27b0: 23 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23  ## ##### #######
27c0: 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23 0a  # #############.
27d0: 7d 0a 0a 6e 61 6d 65 73 70 61 63 65 20 65 76 61  }..namespace eva
27e0: 6c 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a  l ::vc::fossil::
27f0: 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73  import::cvs::pas
2800: 73 20 7b 0a 20 20 20 20 6e 61 6d 65 73 70 61 63  s {.    namespac
2810: 65 20 65 78 70 6f 72 74 20 69 6e 69 74 63 73 65  e export initcse
2820: 74 73 0a 20 20 20 20 6e 61 6d 65 73 70 61 63 65  ts.    namespace
2830: 20 65 76 61 6c 20 69 6e 69 74 63 73 65 74 73 20   eval initcsets 
2840: 7b 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70  {..namespace imp
2850: 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c  ort ::vc::fossil
2860: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 72  ::import::cvs::r
2870: 65 70 6f 73 69 74 6f 72 79 0a 09 6e 61 6d 65 73  epository..names
2880: 70 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63  pace import ::vc
2890: 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74  ::fossil::import
28a0: 3a 3a 63 76 73 3a 3a 73 74 61 74 65 0a 09 6e 61  ::cvs::state..na
28b0: 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74 20 3a  mespace import :
28c0: 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70  :vc::fossil::imp
28d0: 6f 72 74 3a 3a 63 76 73 3a 3a 69 6e 74 65 67 72  ort::cvs::integr
28e0: 69 74 79 0a 09 6e 61 6d 65 73 70 61 63 65 20 65  ity..namespace e
28f0: 76 61 6c 20 70 72 6f 6a 65 63 74 20 7b 0a 09 20  val project {.. 
2900: 20 20 20 6e 61 6d 65 73 70 61 63 65 20 69 6d 70     namespace imp
2910: 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c  ort ::vc::fossil
2920: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70  ::import::cvs::p
2930: 72 6f 6a 65 63 74 3a 3a 72 65 76 0a 09 7d 0a 09  roject::rev..}..
2940: 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74  namespace import
2950: 20 3a 3a 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6d 69   ::vc::tools::mi
2960: 73 63 3a 3a 2a 0a 09 6e 61 6d 65 73 70 61 63 65  sc::*..namespace
2970: 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 74 6f   import ::vc::to
2980: 6f 6c 73 3a 3a 6c 6f 67 0a 09 6c 6f 67 20 72 65  ols::log..log re
2990: 67 69 73 74 65 72 20 69 6e 69 74 63 73 65 74 73  gister initcsets
29a0: 0a 20 20 20 20 7d 0a 7d 0a 0a 23 20 23 20 23 23  .    }.}..# # ##
29b0: 20 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23   ### ##### #####
29c0: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23  ### ############
29d0: 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23 23  # ##############
29e0: 23 23 23 23 23 23 23 0a 23 23 20 52 65 61 64 79  #######.## Ready
29f0: 0a 0a 70 61 63 6b 61 67 65 20 70 72 6f 76 69 64  ..package provid
2a00: 65 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d  e vc::fossil::im
2a10: 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a  port::cvs::pass:
2a20: 3a 69 6e 69 74 63 73 65 74 73 20 31 2e 30 0a 72  :initcsets 1.0.r
2a30: 65 74 75 72 6e 0a                                eturn.