Hex Artifact Content
Not logged in

Artifact 67107f6d59dba2c74a01e1d34d5199effc4f4829:

File tools/cvs2fossil/lib/c2f_pcollsym.tcl part of check-in [479c96c0fc] - Fixed typo in a comment. by aku on 2008-03-02 01:06:32.

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 49 49 49 2e 20 54 68 69 73 20 70 61 73 73  s III. This pass
0210: 20 64 69 76 69 64 65 73 20 74 68 65 20 73 79 6d   divides the sym
0220: 62 6f 6c 73 20 63 6f 6c 6c 65 63 74 65 64 20 62  bols collected b
0230: 79 20 74 68 65 20 70 72 65 76 69 6f 75 73 0a 23  y the previous.#
0240: 23 20 70 61 73 73 20 69 6e 74 6f 20 62 72 61 6e  # pass into bran
0250: 63 68 65 73 2c 20 74 61 67 73 2c 20 61 6e 64 20  ches, tags, and 
0260: 65 78 63 6c 75 64 65 73 2e 20 54 68 65 20 6c 61  excludes. The la
0270: 74 74 65 72 20 61 72 65 20 61 6c 73 6f 0a 23 23  tter are also.##
0280: 20 70 61 72 74 69 61 6c 6c 79 20 64 65 6c 65 74   partially delet
0290: 65 64 20 62 79 20 74 68 69 73 20 70 61 73 73 2c  ed by this pass,
02a0: 20 6e 6f 74 20 6f 6e 6c 79 20 6d 61 72 6b 65 64   not only marked
02b0: 2e 20 49 74 20 69 73 20 74 68 65 20 6e 65 78 74  . It is the next
02c0: 0a 23 23 20 70 61 73 73 20 68 6f 77 65 76 65 72  .## pass however
02d0: 2c 20 27 46 69 6c 74 65 72 53 79 6d 27 2c 20 77  , 'FilterSym', w
02e0: 68 69 63 68 20 70 65 72 66 6f 72 6d 73 20 74 68  hich performs th
02f0: 65 20 66 75 6c 6c 20 64 65 6c 65 74 69 6f 6e 2e  e full deletion.
0300: 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 23  ..# # ## ### ###
0310: 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23  ## ######## ####
0320: 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23  ######### ######
0330: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a  ###############.
0340: 23 23 20 52 65 71 75 69 72 65 6d 65 6e 74 73 0a  ## Requirements.
0350: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  .package require
0360: 20 54 63 6c 20 38 2e 34 20 20 20 20 20 20 20 20   Tcl 8.4        
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 3b 20 23 20 52 65 71 75 69         ; # Requi
0390: 72 65 64 20 72 75 6e 74 69 6d 65 2e 0a 70 61 63  red runtime..pac
03a0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 73 6e 69  kage require sni
03b0: 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  t               
03c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
03d0: 20 20 20 3b 20 23 20 4f 4f 20 73 79 73 74 65 6d     ; # OO system
03e0: 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  ..package requir
03f0: 65 20 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 74 72 6f  e vc::tools::tro
0400: 75 62 6c 65 20 20 20 20 20 20 20 20 20 20 20 20  uble            
0410: 20 20 20 20 20 20 20 20 3b 20 23 20 45 72 72 6f          ; # Erro
0420: 72 20 72 65 70 6f 72 74 69 6e 67 2e 0a 70 61 63  r reporting..pac
0430: 6b 61 67 65 20 72 65 71 75 69 72 65 20 76 63 3a  kage require vc:
0440: 3a 74 6f 6f 6c 73 3a 3a 6c 6f 67 20 20 20 20 20  :tools::log     
0450: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0460: 20 20 20 3b 20 23 20 55 73 65 72 20 66 65 65 64     ; # User feed
0470: 62 61 63 6b 2e 0a 70 61 63 6b 61 67 65 20 72 65  back..package re
0480: 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 69 6c  quire vc::fossil
0490: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 72  ::import::cvs::r
04a0: 65 70 6f 73 69 74 6f 72 79 20 20 20 3b 20 23 20  epository   ; # 
04b0: 52 65 70 6f 73 69 74 6f 72 79 20 6d 61 6e 61 67  Repository manag
04c0: 65 6d 65 6e 74 2e 0a 70 61 63 6b 61 67 65 20 72  ement..package r
04d0: 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 69  equire vc::fossi
04e0: 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a  l::import::cvs::
04f0: 73 74 61 74 65 20 20 20 20 20 20 20 20 3b 20 23  state        ; #
0500: 20 53 74 61 74 65 20 73 74 6f 72 61 67 65 2e 0a   State storage..
0510: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20  package require 
0520: 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f  vc::fossil::impo
0530: 72 74 3a 3a 63 76 73 3a 3a 70 72 6f 6a 65 63 74  rt::cvs::project
0540: 3a 3a 73 79 6d 20 3b 20 23 20 50 72 6f 6a 65 63  ::sym ; # Projec
0550: 74 20 6c 65 76 65 6c 20 73 79 6d 62 6f 6c 73 0a  t level symbols.
0560: 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23  .# # ## ### ####
0570: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23  # ######## #####
0580: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23  ######## #######
0590: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23  ##############.#
05a0: 23 20 52 65 67 69 73 74 65 72 20 74 68 65 20 70  # Register the p
05b0: 61 73 73 20 77 69 74 68 20 74 68 65 20 6d 61 6e  ass with the man
05c0: 61 67 65 6d 65 6e 74 0a 0a 76 63 3a 3a 66 6f 73  agement..vc::fos
05d0: 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73  sil::import::cvs
05e0: 3a 3a 70 61 73 73 20 64 65 66 69 6e 65 20 5c 0a  ::pass define \.
05f0: 20 20 20 20 43 6f 6c 6c 61 74 65 53 79 6d 62 6f      CollateSymbo
0600: 6c 73 20 5c 0a 20 20 20 20 7b 43 6f 6c 6c 61 74  ls \.    {Collat
0610: 65 20 73 79 6d 62 6f 6c 73 7d 20 5c 0a 20 20 20  e symbols} \.   
0620: 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69   ::vc::fossil::i
0630: 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73  mport::cvs::pass
0640: 3a 3a 63 6f 6c 6c 73 79 6d 0a 0a 23 20 23 20 23  ::collsym..# # #
0650: 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 23  # ### ##### ####
0660: 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23  #### ###########
0670: 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23  ## #############
0680: 23 23 23 23 23 23 23 23 0a 23 23 0a 0a 73 6e 69  ########.##..sni
0690: 74 3a 3a 74 79 70 65 20 3a 3a 76 63 3a 3a 66 6f  t::type ::vc::fo
06a0: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76  ssil::import::cv
06b0: 73 3a 3a 70 61 73 73 3a 3a 63 6f 6c 6c 73 79 6d  s::pass::collsym
06c0: 20 7b 0a 20 20 20 20 23 20 23 20 23 23 20 23 23   {.    # # ## ##
06d0: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23  # ##### ########
06e0: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20   #############. 
06f0: 20 20 20 23 23 20 50 75 62 6c 69 63 20 41 50 49     ## Public API
0700: 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64  ..    typemethod
0710: 20 73 65 74 75 70 20 7b 7d 20 7b 0a 09 23 20 44   setup {} {..# D
0720: 65 66 69 6e 65 20 6e 61 6d 65 73 20 61 6e 64 20  efine names and 
0730: 73 74 72 75 63 74 75 72 65 20 6f 66 20 74 68 65  structure of the
0740: 20 70 65 72 73 69 73 74 65 6e 74 20 73 74 61 74   persistent stat
0750: 65 20 6f 66 20 74 68 69 73 0a 09 23 20 70 61 73  e of this..# pas
0760: 73 2e 0a 0a 09 73 74 61 74 65 20 75 73 65 20 70  s....state use p
0770: 72 6f 6a 65 63 74 0a 09 73 74 61 74 65 20 75 73  roject..state us
0780: 65 20 73 79 6d 62 6f 6c 0a 09 73 74 61 74 65 20  e symbol..state 
0790: 75 73 65 20 73 79 6d 74 79 70 65 0a 09 73 74 61  use symtype..sta
07a0: 74 65 20 75 73 65 20 62 6c 6f 63 6b 65 72 0a 09  te use blocker..
07b0: 73 74 61 74 65 20 75 73 65 20 70 61 72 65 6e 74  state use parent
07c0: 0a 0a 09 73 74 61 74 65 20 65 78 74 65 6e 64 20  ...state extend 
07d0: 70 72 65 66 65 72 65 64 70 61 72 65 6e 74 20 7b  preferedparent {
07e0: 0a 09 20 20 20 20 2d 2d 20 46 6f 72 20 65 61 63  ..    -- For eac
07f0: 68 20 73 79 6d 62 6f 6c 20 74 68 65 20 70 72 65  h symbol the pre
0800: 66 65 72 65 64 20 70 61 72 65 6e 74 2e 20 54 68  fered parent. Th
0810: 69 73 20 64 65 73 63 72 69 62 65 73 20 74 68 65  is describes the
0820: 0a 09 20 20 20 20 2d 2d 20 74 72 65 65 20 6f 66  ..    -- tree of
0830: 20 74 68 65 20 66 6f 75 6e 64 20 6c 69 6e 65 73   the found lines
0840: 20 6f 66 20 64 65 76 65 6c 6f 70 6d 65 6e 74 2e   of development.
0850: 20 41 63 74 75 61 6c 6c 79 20 61 0a 09 20 20 20   Actually a..   
0860: 20 2d 2d 20 66 6f 72 65 73 74 20 69 6e 20 63 61   -- forest in ca
0870: 73 65 20 6f 66 20 6d 75 6c 74 69 70 6c 65 20 70  se of multiple p
0880: 72 6f 6a 65 63 74 73 2c 20 77 69 74 68 20 6f 6e  rojects, with on
0890: 65 20 74 72 65 65 20 70 65 72 0a 09 20 20 20 20  e tree per..    
08a0: 2d 2d 20 70 72 6f 6a 65 63 74 2e 0a 0a 09 20 20  -- project....  
08b0: 20 20 73 69 64 20 49 4e 54 45 47 45 52 20 20 4e    sid INTEGER  N
08c0: 4f 54 20 4e 55 4c 4c 20 20 50 52 49 4d 41 52 59  OT NULL  PRIMARY
08d0: 20 4b 45 59 20 20 52 45 46 45 52 45 4e 43 45 53   KEY  REFERENCES
08e0: 20 73 79 6d 62 6f 6c 2c 0a 09 20 20 20 20 70 69   symbol,..    pi
08f0: 64 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e  d INTEGER  NOT N
0900: 55 4c 4c 20 20 20 20 20 20 20 20 20 20 20 20 20  ULL             
0910: 20 20 52 45 46 45 52 45 4e 43 45 53 20 73 79 6d    REFERENCES sym
0920: 62 6f 6c 0a 09 7d 20 7b 20 70 69 64 20 7d 0a 09  bol..} { pid }..
0930: 23 20 49 6e 64 65 78 20 6f 6e 3a 20 70 69 64 20  # Index on: pid 
0940: 28 62 72 61 6e 63 68 20 73 75 63 63 65 73 73 6f  (branch successo
0950: 72 73 29 0a 09 72 65 74 75 72 6e 0a 20 20 20 20  rs)..return.    
0960: 7d 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f  }..    typemetho
0970: 64 20 6c 6f 61 64 20 7b 7d 20 7b 0a 09 23 20 50  d load {} {..# P
0980: 61 73 73 20 6d 61 6e 61 67 65 72 20 69 6e 74 65  ass manager inte
0990: 72 66 61 63 65 2e 20 45 78 65 63 75 74 65 64 20  rface. Executed 
09a0: 74 6f 20 6c 6f 61 64 20 64 61 74 61 20 63 6f 6d  to load data com
09b0: 70 75 74 65 64 20 62 79 0a 09 23 20 74 68 69 73  puted by..# this
09c0: 20 70 61 73 73 20 69 6e 74 6f 20 6d 65 6d 6f 72   pass into memor
09d0: 79 20 77 68 65 6e 20 74 68 69 73 20 70 61 73 73  y when this pass
09e0: 20 69 73 20 73 6b 69 70 70 65 64 20 69 6e 73 74   is skipped inst
09f0: 65 61 64 20 6f 66 0a 09 23 20 65 78 65 63 75 74  ead of..# execut
0a00: 65 64 2e 0a 0a 09 23 20 54 68 65 20 72 65 73 75  ed....# The resu
0a10: 6c 74 73 20 6f 66 20 74 68 69 73 20 70 61 73 73  lts of this pass
0a20: 20 61 72 65 20 66 75 6c 6c 79 20 69 6e 20 74 68   are fully in th
0a30: 65 20 70 65 72 73 69 73 74 65 6e 74 20 73 74 61  e persistent sta
0a40: 74 65 2c 0a 09 23 20 74 68 65 72 65 20 69 73 20  te,..# there is 
0a50: 6e 6f 74 68 69 6e 67 20 74 6f 20 6c 6f 61 64 20  nothing to load 
0a60: 66 6f 72 20 74 68 65 20 6e 65 78 74 20 6f 6e 65  for the next one
0a70: 2e 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a  ...return.    }.
0a80: 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 20  .    typemethod 
0a90: 72 75 6e 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73  run {} {..# Pass
0aa0: 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61   manager interfa
0ab0: 63 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f 20  ce. Executed to 
0ac0: 70 65 72 66 6f 72 6d 20 74 68 65 0a 09 23 20 66  perform the..# f
0ad0: 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 6f 66 20  unctionality of 
0ae0: 74 68 65 20 70 61 73 73 2e 0a 0a 09 73 74 61 74  the pass....stat
0af0: 65 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 7b 0a  e transaction {.
0b00: 09 20 20 20 20 72 65 70 6f 73 69 74 6f 72 79 20  .    repository 
0b10: 20 20 64 65 74 65 72 6d 69 6e 65 73 79 6d 62 6f    determinesymbo
0b20: 6c 74 79 70 65 73 0a 0a 09 20 20 20 20 70 72 6f  ltypes...    pro
0b30: 6a 65 63 74 3a 3a 73 79 6d 20 70 72 69 6e 74 72  ject::sym printr
0b40: 75 6c 65 73 74 61 74 69 73 74 69 63 73 0a 09 20  ulestatistics.. 
0b50: 20 20 20 70 72 6f 6a 65 63 74 3a 3a 73 79 6d 20     project::sym 
0b60: 70 72 69 6e 74 74 79 70 65 73 74 61 74 69 73 74  printtypestatist
0b70: 69 63 73 0a 09 7d 0a 0a 09 69 66 20 7b 21 5b 74  ics..}...if {![t
0b80: 72 6f 75 62 6c 65 20 3f 5d 7d 20 7b 0a 09 20 20  rouble ?]} {..  
0b90: 20 20 55 6e 63 6f 6e 76 65 72 74 65 64 53 79 6d    UnconvertedSym
0ba0: 62 6f 6c 73 0a 09 20 20 20 20 42 61 64 53 79 6d  bols..    BadSym
0bb0: 62 6f 6c 54 79 70 65 73 0a 09 20 20 20 20 42 6c  bolTypes..    Bl
0bc0: 6f 63 6b 65 64 45 78 63 6c 75 64 65 73 0a 09 20  ockedExcludes.. 
0bd0: 20 20 20 49 6e 76 61 6c 69 64 54 61 67 73 0a 09     InvalidTags..
0be0: 7d 0a 0a 09 69 66 20 7b 21 5b 74 72 6f 75 62 6c  }...if {![troubl
0bf0: 65 20 3f 5d 7d 20 7b 0a 09 20 20 20 20 44 72 6f  e ?]} {..    Dro
0c00: 70 45 78 63 6c 75 64 65 64 53 79 6d 62 6f 6c 73  pExcludedSymbols
0c10: 46 72 6f 6d 52 65 66 65 72 65 6e 63 65 73 0a 09  FromReferences..
0c20: 20 20 20 20 44 65 74 65 72 6d 69 6e 65 50 72 65      DeterminePre
0c30: 66 65 72 65 64 50 61 72 65 6e 74 73 0a 09 7d 0a  feredParents..}.
0c40: 0a 09 6c 6f 67 20 77 72 69 74 65 20 31 20 63 6f  ..log write 1 co
0c50: 6c 6c 73 79 6d 20 22 43 6f 6c 6c 61 74 69 6f 6e  llsym "Collation
0c60: 20 63 6f 6d 70 6c 65 74 65 64 22 0a 09 72 65 74   completed"..ret
0c70: 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 74  urn.    }..    t
0c80: 79 70 65 6d 65 74 68 6f 64 20 64 69 73 63 61 72  ypemethod discar
0c90: 64 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d  d {} {..# Pass m
0ca0: 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 65  anager interface
0cb0: 2e 20 45 78 65 63 75 74 65 64 20 66 6f 72 20 61  . Executed for a
0cc0: 6c 6c 20 70 61 73 73 65 73 20 61 66 74 65 72 20  ll passes after 
0cd0: 74 68 65 0a 09 23 20 72 75 6e 20 70 61 73 73 65  the..# run passe
0ce0: 73 2c 20 74 6f 20 72 65 6d 6f 76 65 20 61 6c 6c  s, to remove all
0cf0: 20 64 61 74 61 20 6f 66 20 74 68 69 73 20 70 61   data of this pa
0d00: 73 73 20 66 72 6f 6d 20 74 68 65 20 73 74 61 74  ss from the stat
0d10: 65 2c 0a 09 23 20 61 73 20 62 65 69 6e 67 20 6f  e,..# as being o
0d20: 75 74 20 6f 66 20 64 61 74 65 2e 0a 0a 09 73 74  ut of date....st
0d30: 61 74 65 20 64 69 73 63 61 72 64 20 70 72 65 66  ate discard pref
0d40: 65 72 65 64 70 61 72 65 6e 74 0a 09 72 65 74 75  eredparent..retu
0d50: 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 23 20  rn.    }..    # 
0d60: 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23  # ## ### ##### #
0d70: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23  ####### ########
0d80: 23 23 23 23 23 0a 20 20 20 20 23 23 20 49 6e 74  #####.    ## Int
0d90: 65 72 6e 61 6c 20 6d 65 74 68 6f 64 73 0a 0a 20  ernal methods.. 
0da0: 20 20 20 23 23 20 54 4f 44 4f 3a 20 4d 6f 76 65     ## TODO: Move
0db0: 20 55 6e 63 6f 6e 76 65 72 74 65 64 53 79 6d 62   UnconvertedSymb
0dc0: 6f 6c 73 2c 20 42 61 64 53 79 6d 62 6f 6c 54 79  ols, BadSymbolTy
0dd0: 70 65 73 2c 20 42 6c 6f 63 6b 65 64 49 6e 63 6c  pes, BlockedIncl
0de0: 75 64 65 73 2c 0a 20 20 20 20 23 23 20 54 4f 44  udes,.    ## TOD
0df0: 4f 3a 20 49 6e 76 61 6c 69 64 54 61 67 73 20 74  O: InvalidTags t
0e00: 6f 20 74 68 65 20 69 6e 74 65 67 72 69 74 79 20  o the integrity 
0e10: 6d 6f 64 75 6c 65 3f 0a 0a 20 20 20 20 70 72 6f  module?..    pro
0e20: 63 20 55 6e 63 6f 6e 76 65 72 74 65 64 53 79 6d  c UnconvertedSym
0e30: 62 6f 6c 73 20 7b 7d 20 7b 0a 09 23 20 50 61 72  bols {} {..# Par
0e40: 61 6e 6f 69 61 20 2d 20 48 61 76 65 20 77 65 20  anoia - Have we 
0e50: 6c 65 66 74 20 73 79 6d 62 6f 6c 73 20 77 69 74  left symbols wit
0e60: 68 6f 75 74 20 63 6f 6e 76 65 72 73 69 6f 6e 0a  hout conversion.
0e70: 09 23 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 28  .# information (
0e80: 69 2e 65 2e 20 77 69 74 68 20 74 79 70 65 20 27  i.e. with type '
0e90: 75 6e 64 65 66 69 6e 65 64 27 29 20 3f 0a 0a 09  undefined') ?...
0ea0: 73 65 74 20 75 6e 64 65 66 20 5b 70 72 6f 6a 65  set undef [proje
0eb0: 63 74 3a 3a 73 79 6d 20 75 6e 64 65 66 5d 0a 0a  ct::sym undef]..
0ec0: 09 73 74 61 74 65 20 66 6f 72 65 61 63 68 72 6f  .state foreachro
0ed0: 77 20 7b 0a 09 20 20 20 20 53 45 4c 45 43 54 20  w {..    SELECT 
0ee0: 50 2e 6e 61 6d 65 20 41 53 20 70 6e 61 6d 65 2c  P.name AS pname,
0ef0: 20 53 2e 6e 61 6d 65 20 41 53 20 73 6e 61 6d 65   S.name AS sname
0f00: 0a 09 20 20 20 20 46 52 4f 4d 20 20 20 73 79 6d  ..    FROM   sym
0f10: 62 6f 6c 20 53 2c 20 70 72 6f 6a 65 63 74 20 50  bol S, project P
0f20: 0a 09 20 20 20 20 57 48 45 52 45 20 20 53 2e 74  ..    WHERE  S.t
0f30: 79 70 65 20 3d 20 24 75 6e 64 65 66 20 20 2d 2d  ype = $undef  --
0f40: 20 52 65 73 74 72 69 63 74 20 74 6f 20 75 6e 64   Restrict to und
0f50: 65 66 69 6e 65 64 20 73 79 6d 62 6f 6c 73 0a 09  efined symbols..
0f60: 20 20 20 20 41 4e 44 20 20 20 20 50 2e 70 69 64      AND    P.pid
0f70: 20 3d 20 53 2e 70 69 64 20 20 20 20 2d 2d 20 47   = S.pid    -- G
0f80: 65 74 20 70 72 6f 6a 65 63 74 20 66 6f 72 20 73  et project for s
0f90: 79 6d 62 6f 6c 0a 09 7d 20 7b 0a 09 20 20 20 20  ymbol..} {..    
0fa0: 74 72 6f 75 62 6c 65 20 66 61 74 61 6c 20 22 24  trouble fatal "$
0fb0: 70 6e 61 6d 65 20 3a 20 54 68 65 20 73 79 6d 62  pname : The symb
0fc0: 6f 6c 20 27 24 73 6e 61 6d 65 27 20 77 61 73 20  ol '$sname' was 
0fd0: 6c 65 66 74 20 75 6e 64 65 66 69 6e 65 64 22 0a  left undefined".
0fe0: 09 7d 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d  .}..return.    }
0ff0: 0a 0a 20 20 20 20 70 72 6f 63 20 42 61 64 53 79  ..    proc BadSy
1000: 6d 62 6f 6c 54 79 70 65 73 20 7b 7d 20 7b 0a 09  mbolTypes {} {..
1010: 23 20 50 61 72 61 6e 6f 69 61 20 2d 20 48 61 76  # Paranoia - Hav
1020: 65 20 77 65 20 6c 65 66 74 20 73 79 6d 62 6f 6c  e we left symbol
1030: 73 20 77 69 74 68 20 62 6f 67 75 73 20 63 6f 6e  s with bogus con
1040: 76 65 72 73 69 6f 6e 0a 09 23 20 69 6e 66 6f 72  version..# infor
1050: 6d 61 74 69 6f 6e 20 28 74 79 70 65 20 6f 75 74  mation (type out
1060: 20 6f 66 20 74 68 65 20 76 61 6c 69 64 20 72 61   of the valid ra
1070: 6e 67 65 20 28 65 78 63 6c 75 64 65 64 2c 20 62  nge (excluded, b
1080: 72 61 6e 63 68 2c 0a 09 23 20 74 61 67 29 29 20  ranch,..# tag)) 
1090: 3f 0a 0a 09 73 74 61 74 65 20 66 6f 72 65 61 63  ?...state foreac
10a0: 68 72 6f 77 20 7b 0a 09 20 20 20 20 53 45 4c 45  hrow {..    SELE
10b0: 43 54 20 50 2e 6e 61 6d 65 20 41 53 20 70 6e 61  CT P.name AS pna
10c0: 6d 65 2c 20 53 2e 6e 61 6d 65 20 41 53 20 73 6e  me, S.name AS sn
10d0: 61 6d 65 0a 09 20 20 20 20 46 52 4f 4d 20 20 20  ame..    FROM   
10e0: 73 79 6d 62 6f 6c 20 53 2c 20 70 72 6f 6a 65 63  symbol S, projec
10f0: 74 20 50 0a 09 20 20 20 20 57 48 45 52 45 20 20  t P..    WHERE  
1100: 53 2e 74 79 70 65 20 4e 4f 54 20 49 4e 20 28 30  S.type NOT IN (0
1110: 2c 31 2c 32 29 20 2d 2d 20 52 65 73 74 72 69 63  ,1,2) -- Restric
1120: 74 20 74 6f 20 73 79 6d 62 6f 6c 73 20 77 69 74  t to symbols wit
1130: 68 20 62 6f 67 75 73 20 74 79 70 65 20 63 6f 64  h bogus type cod
1140: 65 73 0a 09 20 20 20 20 41 4e 44 20 20 20 20 50  es..    AND    P
1150: 2e 70 69 64 20 3d 20 53 2e 70 69 64 20 20 20 20  .pid = S.pid    
1160: 20 20 20 20 20 2d 2d 20 47 65 74 20 70 72 6f 6a       -- Get proj
1170: 65 63 74 20 6f 66 20 73 79 6d 62 6f 6c 0a 09 7d  ect of symbol..}
1180: 20 7b 0a 09 20 20 20 20 74 72 6f 75 62 6c 65 20   {..    trouble 
1190: 66 61 74 61 6c 20 22 24 70 6e 61 6d 65 20 3a 20  fatal "$pname : 
11a0: 54 68 65 20 73 79 6d 62 6f 6c 20 27 24 73 6e 61  The symbol '$sna
11b0: 6d 65 27 20 68 61 73 20 6e 6f 20 70 72 6f 70 65  me' has no prope
11c0: 72 20 63 6f 6e 76 65 72 73 69 6f 6e 20 74 79 70  r conversion typ
11d0: 65 22 0a 09 7d 0a 09 72 65 74 75 72 6e 0a 20 20  e"..}..return.  
11e0: 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 42 6c    }..    proc Bl
11f0: 6f 63 6b 65 64 45 78 63 6c 75 64 65 73 20 7b 7d  ockedExcludes {}
1200: 20 7b 0a 09 23 20 50 61 72 61 6e 6f 69 61 20 2d   {..# Paranoia -
1210: 20 48 61 76 65 20 77 65 20 73 63 68 65 64 75 6c   Have we schedul
1220: 65 64 20 73 79 6d 62 6f 6c 73 20 66 6f 72 20 65  ed symbols for e
1230: 78 63 6c 75 73 69 6f 6e 20 77 69 74 68 6f 75 74  xclusion without
1240: 0a 09 23 20 61 6c 73 6f 20 65 78 63 6c 75 64 69  ..# also excludi
1250: 6e 67 20 74 68 65 69 72 20 64 65 70 65 6e 64 65  ng their depende
1260: 6e 74 20 73 79 6d 62 6f 6c 73 20 3f 0a 0a 09 73  nt symbols ?...s
1270: 65 74 20 65 78 63 6c 20 5b 70 72 6f 6a 65 63 74  et excl [project
1280: 3a 3a 73 79 6d 20 65 78 63 6c 75 64 65 64 5d 0a  ::sym excluded].
1290: 0a 09 73 74 61 74 65 20 66 6f 72 65 61 63 68 72  ..state foreachr
12a0: 6f 77 20 7b 0a 09 20 20 20 20 53 45 4c 45 43 54  ow {..    SELECT
12b0: 20 50 2e 6e 61 6d 65 20 41 53 20 70 6e 61 6d 65   P.name AS pname
12c0: 2c 20 53 2e 6e 61 6d 65 20 41 53 20 73 6e 61 6d  , S.name AS snam
12d0: 65 2c 20 53 42 2e 6e 61 6d 65 20 41 53 20 62 6e  e, SB.name AS bn
12e0: 61 6d 65 0a 09 20 20 20 20 46 52 4f 4d 20 20 20  ame..    FROM   
12f0: 73 79 6d 62 6f 6c 20 53 2c 20 62 6c 6f 63 6b 65  symbol S, blocke
1300: 72 20 42 2c 20 73 79 6d 62 6f 6c 20 53 42 2c 20  r B, symbol SB, 
1310: 70 72 6f 6a 65 63 74 20 50 0a 09 20 20 20 20 57  project P..    W
1320: 48 45 52 45 20 20 53 2e 74 79 70 65 20 3d 20 24  HERE  S.type = $
1330: 65 78 63 6c 20 20 20 2d 2d 20 52 65 73 74 72 69  excl   -- Restri
1340: 63 74 20 74 6f 20 65 78 63 6c 75 64 65 64 20 73  ct to excluded s
1350: 79 6d 62 6f 6c 73 0a 09 20 20 20 20 41 4e 44 20  ymbols..    AND 
1360: 20 20 20 53 2e 73 69 64 20 3d 20 42 2e 73 69 64     S.sid = B.sid
1370: 20 20 20 20 2d 2d 20 47 65 74 20 73 79 6d 62 6f      -- Get symbo
1380: 6c 73 20 62 6c 6f 63 6b 69 6e 67 20 74 68 65 6d  ls blocking them
1390: 0a 09 20 20 20 20 41 4e 44 20 20 20 20 42 2e 62  ..    AND    B.b
13a0: 69 64 20 3d 20 53 42 2e 73 69 64 20 20 20 2d 2d  id = SB.sid   --
13b0: 20 61 6e 64 0a 09 20 20 20 20 41 4e 44 20 20 20   and..    AND   
13c0: 20 53 42 2e 74 79 70 65 20 21 3d 20 24 65 78 63   SB.type != $exc
13d0: 6c 20 2d 2d 20 77 68 69 63 68 20 61 72 65 20 6e  l -- which are n
13e0: 6f 74 20 65 78 63 6c 75 64 65 64 20 74 68 65 6d  ot excluded them
13f0: 73 65 6c 76 65 73 0a 09 20 20 20 20 41 4e 44 20  selves..    AND 
1400: 20 20 20 50 2e 70 69 64 20 3d 20 53 2e 70 69 64     P.pid = S.pid
1410: 20 20 20 20 2d 2d 20 47 65 74 20 70 72 6f 6a 65      -- Get proje
1420: 63 74 20 6f 66 20 73 79 6d 62 6f 6c 0a 09 7d 20  ct of symbol..} 
1430: 7b 0a 09 20 20 20 20 74 72 6f 75 62 6c 65 20 66  {..    trouble f
1440: 61 74 61 6c 20 22 24 70 6e 61 6d 65 20 3a 20 54  atal "$pname : T
1450: 68 65 20 73 79 6d 62 6f 6c 20 27 24 73 6e 61 6d  he symbol '$snam
1460: 65 27 20 63 61 6e 6e 6f 74 20 62 65 20 65 78 63  e' cannot be exc
1470: 6c 75 64 65 64 20 61 73 20 74 68 65 20 75 6e 65  luded as the une
1480: 78 63 6c 75 64 65 64 20 73 79 6d 62 6f 6c 20 27  xcluded symbol '
1490: 24 62 6e 61 6d 65 27 20 64 65 70 65 6e 64 73 20  $bname' depends 
14a0: 6f 6e 20 69 74 2e 22 0a 09 7d 0a 09 72 65 74 75  on it."..}..retu
14b0: 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 70 72  rn.    }..    pr
14c0: 6f 63 20 49 6e 76 61 6c 69 64 54 61 67 73 20 7b  oc InvalidTags {
14d0: 7d 20 7b 0a 09 23 20 50 61 72 61 6e 6f 69 61 20  } {..# Paranoia 
14e0: 2d 20 48 61 76 65 20 77 65 20 73 63 68 65 64 75  - Have we schedu
14f0: 6c 65 64 20 73 79 6d 62 6f 6c 73 20 66 6f 72 20  led symbols for 
1500: 63 6f 6e 76 65 72 73 69 6f 6e 20 61 73 20 74 61  conversion as ta
1510: 67 73 0a 09 23 20 77 68 69 63 68 20 61 62 73 6f  gs..# which abso
1520: 6c 75 74 65 6c 79 20 63 61 6e 6e 6f 74 20 62 65  lutely cannot be
1530: 20 63 6f 6e 76 65 72 74 65 64 20 61 73 20 74 61   converted as ta
1540: 67 73 20 64 75 65 20 74 6f 20 63 6f 6d 6d 69 74  gs due to commit
1550: 73 0a 09 23 20 6d 61 64 65 20 6f 6e 20 74 68 65  s..# made on the
1560: 6d 20 3f 0a 0a 09 23 20 49 6e 20 6f 74 68 65 72  m ?...# In other
1570: 20 77 6f 72 64 73 2c 20 74 68 69 73 20 63 68 65   words, this che
1580: 63 6b 73 20 66 69 6e 64 73 20 6f 75 74 20 69 66  cks finds out if
1590: 20 74 68 65 20 75 73 65 72 20 68 61 73 20 61 73   the user has as
15a0: 6b 65 64 0a 09 23 20 6e 6f 6e 73 65 6e 73 69 63  ked..# nonsensic
15b0: 61 6c 20 63 6f 6e 76 65 72 73 69 6f 6e 73 20 6f  al conversions o
15c0: 66 20 73 79 6d 62 6f 6c 73 2c 20 77 68 69 63 68  f symbols, which
15d0: 20 73 68 6f 75 6c 64 20 68 61 76 65 20 62 65 65   should have bee
15e0: 6e 0a 09 23 20 6c 65 66 74 20 74 6f 20 74 68 65  n..# left to the
15f0: 20 68 65 75 72 69 73 74 69 63 73 2c 20 6d 6f 73   heuristics, mos
1600: 74 20 73 70 65 63 69 66 69 63 61 6c 6c 79 0a 09  t specifically..
1610: 23 20 27 70 72 6f 6a 65 63 74 3a 3a 73 79 6d 2e  # 'project::sym.
1620: 48 61 73 43 6f 6d 6d 69 74 73 28 29 27 2e 0a 0a  HasCommits()'...
1630: 09 73 65 74 20 74 61 67 20 5b 70 72 6f 6a 65 63  .set tag [projec
1640: 74 3a 3a 73 79 6d 20 74 61 67 5d 0a 0a 09 73 74  t::sym tag]...st
1650: 61 74 65 20 66 6f 72 65 61 63 68 72 6f 77 20 7b  ate foreachrow {
1660: 0a 09 20 20 20 20 53 45 4c 45 43 54 20 50 2e 6e  ..    SELECT P.n
1670: 61 6d 65 20 41 53 20 70 6e 61 6d 65 2c 20 53 2e  ame AS pname, S.
1680: 6e 61 6d 65 20 41 53 20 73 6e 61 6d 65 0a 09 20  name AS sname.. 
1690: 20 20 20 46 52 4f 4d 20 20 20 70 72 6f 6a 65 63     FROM   projec
16a0: 74 20 50 2c 20 73 79 6d 62 6f 6c 20 53 0a 09 20  t P, symbol S.. 
16b0: 20 20 20 57 48 45 52 45 20 20 53 2e 74 79 70 65     WHERE  S.type
16c0: 20 3d 20 24 74 61 67 20 20 20 20 20 20 20 20 2d   = $tag        -
16d0: 2d 20 52 65 73 74 72 69 63 74 20 74 6f 20 74 61  - Restrict to ta
16e0: 67 20 73 79 6d 62 6f 6c 73 0a 09 20 20 20 20 41  g symbols..    A
16f0: 4e 44 20 20 20 20 53 2e 63 6f 6d 6d 69 74 5f 63  ND    S.commit_c
1700: 6f 75 6e 74 20 3e 20 30 20 20 20 2d 2d 20 77 68  ount > 0   -- wh
1710: 69 63 68 20 68 61 76 65 20 72 65 76 69 73 69 6f  ich have revisio
1720: 6e 73 20 63 6f 6d 6d 69 74 74 65 64 20 74 6f 20  ns committed to 
1730: 74 68 65 6d 0a 09 20 20 20 20 41 4e 44 20 20 20  them..    AND   
1740: 20 50 2e 70 69 64 20 3d 20 53 2e 70 69 64 20 20   P.pid = S.pid  
1750: 20 20 20 20 20 20 2d 2d 20 47 65 74 20 70 72 6f        -- Get pro
1760: 6a 65 63 74 20 6f 66 20 73 79 6d 62 6f 6c 0a 09  ject of symbol..
1770: 7d 20 7b 0a 09 20 20 20 20 74 72 6f 75 62 6c 65  } {..    trouble
1780: 20 66 61 74 61 6c 20 22 24 70 6e 61 6d 65 20 3a   fatal "$pname :
1790: 20 54 68 65 20 73 79 6d 62 6f 6c 20 27 24 73 6e   The symbol '$sn
17a0: 61 6d 65 27 20 63 61 6e 6e 6f 74 20 62 65 20 66  ame' cannot be f
17b0: 6f 72 63 65 64 20 74 6f 20 62 65 20 63 6f 6e 76  orced to be conv
17c0: 65 72 74 65 64 20 61 73 20 74 61 67 20 62 65 63  erted as tag bec
17d0: 61 75 73 65 20 69 74 20 68 61 73 20 63 6f 6d 6d  ause it has comm
17e0: 69 74 73 2e 22 0a 09 7d 0a 09 72 65 74 75 72 6e  its."..}..return
17f0: 0a 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63  .    }..    proc
1800: 20 44 72 6f 70 45 78 63 6c 75 64 65 64 53 79 6d   DropExcludedSym
1810: 62 6f 6c 73 46 72 6f 6d 52 65 66 65 72 65 6e 63  bolsFromReferenc
1820: 65 73 20 7b 7d 20 7b 0a 09 23 20 54 68 65 20 65  es {} {..# The e
1830: 78 63 6c 75 64 65 64 20 73 79 6d 62 6f 6c 73 20  xcluded symbols 
1840: 63 61 6e 6e 20 62 65 20 75 73 65 64 20 61 73 20  cann be used as 
1850: 62 6c 6f 63 6b 65 72 73 20 6e 6f 72 20 61 73 0a  blockers nor as.
1860: 09 23 20 70 6f 73 73 69 62 6c 65 20 70 61 72 65  .# possible pare
1870: 6e 74 20 66 6f 72 20 6f 74 68 65 72 20 73 79 6d  nt for other sym
1880: 62 6f 6c 73 2e 20 57 65 20 6e 6f 77 20 64 72 6f  bols. We now dro
1890: 70 20 74 68 65 20 72 65 6c 65 76 61 6e 74 0a 09  p the relevant..
18a0: 23 20 65 6e 74 72 69 65 73 20 74 6f 20 70 72 65  # entries to pre
18b0: 76 65 6e 74 20 74 68 65 6d 20 66 72 6f 6d 20 63  vent them from c
18c0: 61 75 73 69 6e 67 20 63 6f 6e 66 75 73 69 6f 6e  ausing confusion
18d0: 20 6c 61 74 65 72 20 6f 6e 2e 0a 0a 09 73 65 74   later on....set
18e0: 20 65 78 63 6c 20 5b 70 72 6f 6a 65 63 74 3a 3a   excl [project::
18f0: 73 79 6d 20 65 78 63 6c 75 64 65 64 5d 0a 0a 09  sym excluded]...
1900: 73 74 61 74 65 20 72 75 6e 20 7b 0a 09 20 20 20  state run {..   
1910: 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 62 6c 6f   DELETE FROM blo
1920: 63 6b 65 72 0a 09 20 20 20 20 57 48 45 52 45 20  cker..    WHERE 
1930: 62 69 64 20 49 4e 20 28 53 45 4c 45 43 54 20 73  bid IN (SELECT s
1940: 69 64 0a 09 09 09 20 20 46 52 4f 4d 20 20 20 73  id....  FROM   s
1950: 79 6d 62 6f 6c 0a 09 09 09 20 20 57 68 45 52 45  ymbol....  WhERE
1960: 20 20 74 79 70 65 20 3d 20 24 65 78 63 6c 29 3b    type = $excl);
1970: 20 2d 2d 20 47 65 74 20 65 78 63 6c 75 64 65 64   -- Get excluded
1980: 20 73 79 6d 62 6f 6c 73 0a 09 20 20 20 20 44 45   symbols..    DE
1990: 4c 45 54 45 20 46 52 4f 4d 20 70 61 72 65 6e 74  LETE FROM parent
19a0: 0a 09 20 20 20 20 57 48 45 52 45 20 70 69 64 20  ..    WHERE pid 
19b0: 49 4e 20 28 53 45 4c 45 43 54 20 73 69 64 0a 09  IN (SELECT sid..
19c0: 09 09 20 20 46 52 4f 4d 20 20 20 73 79 6d 62 6f  ..  FROM   symbo
19d0: 6c 0a 09 09 09 20 20 57 68 45 52 45 20 20 74 79  l....  WhERE  ty
19e0: 70 65 20 3d 20 24 65 78 63 6c 29 3b 20 2d 2d 20  pe = $excl); -- 
19f0: 47 65 74 20 65 78 63 6c 75 64 65 64 20 73 79 6d  Get excluded sym
1a00: 62 6f 6c 73 0a 09 7d 0a 09 72 65 74 75 72 6e 0a  bols..}..return.
1a10: 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20      }..    proc 
1a20: 44 65 74 65 72 6d 69 6e 65 50 72 65 66 65 72 65  DeterminePrefere
1a30: 64 50 61 72 65 6e 74 73 20 7b 7d 20 7b 0a 09 61  dParents {} {..a
1a40: 72 72 61 79 20 73 65 74 20 70 72 65 66 65 72 65  rray set prefere
1a50: 64 20 7b 7d 0a 0a 09 73 65 74 20 65 78 63 6c 20  d {}...set excl 
1a60: 5b 70 72 6f 6a 65 63 74 3a 3a 73 79 6d 20 65 78  [project::sym ex
1a70: 63 6c 75 64 65 64 5d 0a 0a 09 23 20 50 68 61 73  cluded]...# Phas
1a80: 65 20 49 3a 20 50 75 6c 6c 20 74 68 65 20 70 6f  e I: Pull the po
1a90: 73 73 69 62 6c 65 20 70 61 72 65 6e 74 73 2c 20  ssible parents, 
1aa0: 75 73 69 6e 67 20 73 6f 72 74 69 6e 67 20 74 6f  using sorting to
1ab0: 20 70 75 74 20 74 68 65 0a 09 23 20 20 20 20 20   put the..#     
1ac0: 20 20 20 20 20 70 72 65 66 65 72 65 64 20 70 61       prefered pa
1ad0: 72 65 6e 74 20 6f 66 20 65 61 63 68 20 73 79 6d  rent of each sym
1ae0: 62 6f 6c 20 6c 61 73 74 20 61 6d 6f 6e 67 20 61  bol last among a
1af0: 6c 6c 0a 09 23 20 20 20 20 20 20 20 20 20 20 63  ll..#          c
1b00: 61 6e 64 69 64 61 74 65 73 2c 20 61 6c 6c 6f 77  andidates, allow
1b10: 69 6e 67 20 75 73 20 67 65 74 20 74 68 65 20 70  ing us get the p
1b20: 72 65 66 65 72 65 64 20 6f 6e 65 20 62 79 0a 09  refered one by..
1b30: 23 20 20 20 20 20 20 20 20 20 20 65 61 63 68 20  #          each 
1b40: 63 61 6e 64 69 64 61 74 65 20 6f 76 65 72 77 72  candidate overwr
1b50: 69 74 69 6e 67 20 61 6c 6c 20 70 72 65 76 69 6f  iting all previo
1b60: 75 73 0a 09 23 20 20 20 20 20 20 20 20 20 20 73  us..#          s
1b70: 65 6c 65 63 74 69 6f 6e 73 2e 20 4e 6f 74 65 20  elections. Note 
1b80: 74 68 61 74 20 77 65 20 69 67 6e 6f 72 65 20 65  that we ignore e
1b90: 78 63 6c 75 64 65 64 20 73 79 6d 62 6f 6c 73 2c  xcluded symbols,
1ba0: 0a 09 23 20 20 20 20 20 20 20 20 20 20 77 65 20  ..#          we 
1bb0: 64 6f 20 6e 6f 74 20 63 61 72 65 20 61 62 6f 75  do not care abou
1bc0: 74 20 74 68 65 69 72 20 70 72 65 66 65 72 65 64  t their prefered
1bd0: 20 70 61 72 65 6e 74 73 20 61 6e 64 20 64 6f 0a   parents and do.
1be0: 09 23 20 20 20 20 20 20 20 20 20 20 6e 6f 74 20  .#          not 
1bf0: 61 74 74 65 6d 70 74 20 74 6f 20 63 6f 6d 70 75  attempt to compu
1c00: 74 65 20 74 68 65 6d 2e 0a 0a 09 73 74 61 74 65  te them....state
1c10: 20 66 6f 72 65 61 63 68 72 6f 77 20 7b 0a 09 20   foreachrow {.. 
1c20: 20 20 20 53 45 4c 45 43 54 20 20 20 53 2e 73 69     SELECT   S.si
1c30: 64 20 20 20 41 53 20 78 73 2c 0a 09 20 20 20 20  d   AS xs,..    
1c40: 20 20 20 20 20 20 20 20 20 50 2e 70 69 64 20 20           P.pid  
1c50: 20 41 53 20 78 70 2c 0a 09 20 20 20 20 20 20 20   AS xp,..       
1c60: 20 20 20 20 20 20 53 2e 6e 61 6d 65 20 20 41 53        S.name  AS
1c70: 20 73 6e 61 6d 65 2c 0a 09 20 20 20 20 20 20 20   sname,..       
1c80: 20 20 20 20 20 20 53 42 2e 6e 61 6d 65 20 41 53        SB.name AS
1c90: 20 70 6e 61 6d 65 2c 0a 09 20 20 20 20 20 20 20   pname,..       
1ca0: 20 20 20 20 20 20 50 52 2e 6e 61 6d 65 20 41 53        PR.name AS
1cb0: 20 70 72 6e 61 6d 65 2c 0a 09 20 20 20 20 20 20   prname,..      
1cc0: 20 20 20 20 20 20 20 50 2e 6e 20 20 20 20 20 41         P.n     A
1cd0: 53 20 76 6f 74 65 73 0a 09 20 20 20 20 46 52 4f  S votes..    FRO
1ce0: 4d 20 20 20 20 20 73 79 6d 62 6f 6c 20 53 2c 20  M     symbol S, 
1cf0: 70 61 72 65 6e 74 20 50 2c 20 73 79 6d 62 6f 6c  parent P, symbol
1d00: 20 53 42 2c 20 70 72 6f 6a 65 63 74 20 50 52 0a   SB, project PR.
1d10: 09 20 20 20 20 57 48 45 52 45 20 20 20 20 53 2e  .    WHERE    S.
1d20: 74 79 70 65 20 21 3d 20 24 65 78 63 6c 20 20 20  type != $excl   
1d30: 20 20 20 2d 2d 20 52 65 73 74 72 69 63 74 20 74     -- Restrict t
1d40: 6f 20 77 61 6e 74 65 64 20 73 79 6d 62 6f 6c 73  o wanted symbols
1d50: 0a 09 20 20 20 20 41 4e 44 20 20 20 20 20 20 53  ..    AND      S
1d60: 2e 73 69 64 20 3d 20 50 2e 73 69 64 20 20 20 20  .sid = P.sid    
1d70: 20 20 20 20 2d 2d 20 47 65 74 20 70 6f 73 73 69      -- Get possi
1d80: 62 6c 65 20 70 61 72 65 6e 74 73 20 6f 66 20 73  ble parents of s
1d90: 79 6d 62 6f 6c 0a 09 20 20 20 20 41 4e 44 20 20  ymbol..    AND  
1da0: 20 20 20 20 50 2e 70 69 64 20 3d 20 53 42 2e 73      P.pid = SB.s
1db0: 69 64 20 20 20 20 20 20 20 2d 2d 20 61 6e 64 0a  id       -- and.
1dc0: 09 20 20 20 20 41 4e 44 20 20 20 20 20 20 53 2e  .    AND      S.
1dd0: 70 69 64 20 3d 20 50 52 2e 70 69 64 20 20 20 20  pid = PR.pid    
1de0: 20 20 20 2d 2d 20 74 68 65 20 70 72 6f 6a 65 63     -- the projec
1df0: 74 20 6f 66 20 74 68 65 20 73 79 6d 62 6f 6c 0a  t of the symbol.
1e00: 09 20 20 20 20 4f 52 44 45 52 20 42 59 20 50 2e  .    ORDER BY P.
1e10: 6e 20 41 53 43 2c 20 50 2e 70 69 64 20 44 45 53  n ASC, P.pid DES
1e20: 43 20 20 2d 2d 20 53 6f 72 74 69 6e 67 2c 20 73  C  -- Sorting, s
1e30: 65 65 20 62 65 6c 6f 77 0a 09 20 20 20 20 2d 2d  ee below..    --
1e40: 0a 09 20 20 20 20 2d 2d 20 48 69 67 68 65 72 20  ..    -- Higher 
1e50: 76 6f 74 65 73 20 61 6e 64 20 73 6d 61 6c 6c 65  votes and smalle
1e60: 72 20 69 64 73 20 28 3d 20 65 61 72 6c 69 65 72  r ids (= earlier
1e70: 20 62 72 61 6e 63 68 65 73 29 20 6c 61 73 74 0a   branches) last.
1e80: 09 20 20 20 20 2d 2d 20 57 65 20 73 69 6d 70 6c  .    -- We simpl
1e90: 79 20 6b 65 65 70 20 74 68 65 20 6c 61 73 74 20  y keep the last 
1ea0: 70 6f 73 73 69 62 6c 65 20 70 61 72 65 6e 74 20  possible parent 
1eb0: 66 6f 72 20 65 61 63 68 0a 09 20 20 20 20 2d 2d  for each..    --
1ec0: 20 73 79 6d 62 6f 6c 2e 20 20 54 68 69 73 20 70   symbol.  This p
1ed0: 61 72 65 6e 74 20 77 69 6c 6c 20 68 61 76 65 20  arent will have 
1ee0: 74 68 65 20 6d 61 78 20 6e 75 6d 62 65 72 20 6f  the max number o
1ef0: 66 20 76 6f 74 65 73 0a 09 20 20 20 20 2d 2d 20  f votes..    -- 
1f00: 66 6f 72 20 69 74 73 20 73 79 6d 62 6f 6c 20 61  for its symbol a
1f10: 6e 64 20 77 69 6c 6c 20 62 65 20 74 68 65 20 65  nd will be the e
1f20: 61 72 6c 69 65 73 74 20 63 72 65 61 74 65 64 20  arliest created 
1f30: 62 72 61 6e 63 68 0a 09 20 20 20 20 2d 2d 20 70  branch..    -- p
1f40: 6f 73 73 69 62 6c 65 20 61 6d 6f 6e 67 20 61 6c  ossible among al
1f50: 6c 20 77 69 74 68 20 6d 61 6e 79 20 76 6f 74 65  l with many vote
1f60: 73 2e 0a 09 7d 20 7b 0a 09 20 20 20 20 6c 6f 67  s...} {..    log
1f70: 20 77 72 69 74 65 20 39 20 70 63 6f 6c 6c 73 79   write 9 pcollsy
1f80: 6d 20 22 56 6f 74 69 6e 67 20 24 76 6f 74 65 73  m "Voting $votes
1f90: 20 66 6f 72 20 50 61 72 65 6e 74 28 24 73 6e 61   for Parent($sna
1fa0: 6d 65 29 20 3d 20 24 70 6e 61 6d 65 22 0a 0a 09  me) = $pname"...
1fb0: 20 20 20 20 73 65 74 20 70 72 65 66 65 72 65 64      set prefered
1fc0: 28 24 78 73 29 20 5b 6c 69 73 74 20 24 78 70 20  ($xs) [list $xp 
1fd0: 24 73 6e 61 6d 65 20 24 70 6e 61 6d 65 20 24 70  $sname $pname $p
1fe0: 72 6e 61 6d 65 5d 0a 09 7d 0a 0a 09 23 20 50 68  rname]..}...# Ph
1ff0: 61 73 65 20 49 49 3a 20 57 72 69 74 65 20 74 68  ase II: Write th
2000: 65 20 66 6f 75 6e 64 20 70 72 65 66 65 72 65 6e  e found preferen
2010: 63 65 73 20 62 61 63 6b 20 69 6e 74 6f 20 74 68  ces back into th
2020: 65 20 74 61 62 6c 65 0a 09 23 20 20 20 20 20 20  e table..#      
2030: 20 20 20 20 20 74 68 69 73 20 70 61 73 73 20 64       this pass d
2040: 65 66 69 6e 65 64 20 66 6f 72 20 69 74 2e 0a 0a  efined for it...
2050: 09 66 6f 72 65 61 63 68 20 7b 73 20 78 7d 20 5b  .foreach {s x} [
2060: 61 72 72 61 79 20 67 65 74 20 70 72 65 66 65 72  array get prefer
2070: 65 64 5d 20 7b 0a 09 20 20 20 20 73 74 72 75 63  ed] {..    struc
2080: 74 3a 3a 6c 69 73 74 20 61 73 73 69 67 6e 20 24  t::list assign $
2090: 78 20 70 20 73 6e 61 6d 65 20 70 6e 61 6d 65 20  x p sname pname 
20a0: 70 72 6e 61 6d 65 0a 09 20 20 20 20 73 74 61 74  prname..    stat
20b0: 65 20 72 75 6e 20 7b 0a 09 09 49 4e 53 45 52 54  e run {...INSERT
20c0: 20 49 4e 54 4f 20 70 72 65 66 65 72 65 64 70 61   INTO preferedpa
20d0: 72 65 6e 74 20 28 73 69 64 2c 20 70 69 64 29 0a  rent (sid, pid).
20e0: 09 09 56 41 4c 55 45 53 20 20 20 20 20 20 20 20  ..VALUES        
20f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 28 24 73               ($s
2100: 2c 20 20 24 70 29 3b 0a 09 20 20 20 20 7d 0a 0a  ,  $p);..    }..
2110: 09 20 20 20 20 6c 6f 67 20 77 72 69 74 65 20 33  .    log write 3
2120: 20 70 63 6f 6c 6c 73 79 6d 20 22 24 70 72 6e 61   pcollsym "$prna
2130: 6d 65 20 3a 20 27 24 73 6e 61 6d 65 27 73 20 70  me : '$sname's p
2140: 72 65 66 65 72 65 64 20 70 61 72 65 6e 74 20 69  refered parent i
2150: 73 20 27 24 70 6e 61 6d 65 27 22 0a 09 7d 0a 0a  s '$pname'"..}..
2160: 09 23 20 50 68 61 73 65 20 49 49 49 3a 20 43 68  .# Phase III: Ch
2170: 65 63 6b 20 74 68 65 20 72 65 73 75 6c 74 20 74  eck the result t
2180: 68 61 74 20 61 6c 6c 20 73 79 6d 62 6f 6c 73 20  hat all symbols 
2190: 65 78 63 65 70 74 20 66 6f 72 0a 09 23 20 20 20  except for..#   
21a0: 20 20 20 20 20 20 20 20 20 74 72 75 6e 6b 73 20           trunks 
21b0: 68 61 76 65 20 61 20 70 72 65 66 65 72 65 64 20  have a prefered 
21c0: 70 61 72 65 6e 74 2e 20 57 65 20 61 6c 73 6f 20  parent. We also 
21d0: 69 67 6e 6f 72 65 0a 09 23 20 20 20 20 20 20 20  ignore..#       
21e0: 20 20 20 20 20 65 78 63 6c 75 64 65 64 20 73 79       excluded sy
21f0: 6d 62 6f 6c 73 2c 20 61 73 20 77 65 20 69 6e 74  mbols, as we int
2200: 65 6e 74 69 6f 6e 61 6c 6c 79 20 64 69 64 20 6e  entionally did n
2210: 6f 74 0a 09 23 20 20 20 20 20 20 20 20 20 20 20  ot..#           
2220: 20 63 6f 6d 70 75 74 65 20 61 20 70 72 65 66 65   compute a prefe
2230: 72 65 64 20 70 61 72 65 6e 74 20 66 6f 72 20 74  red parent for t
2240: 68 65 6d 2c 20 73 65 65 20 70 68 61 73 65 20 49  hem, see phase I
2250: 2e 0a 0a 09 73 74 61 74 65 20 66 6f 72 65 61 63  ....state foreac
2260: 68 72 6f 77 20 7b 0a 09 20 20 20 20 53 45 4c 45  hrow {..    SELE
2270: 43 54 20 50 52 2e 6e 61 6d 65 20 41 53 20 70 6e  CT PR.name AS pn
2280: 61 6d 65 2c 20 53 2e 6e 61 6d 65 20 41 53 20 73  ame, S.name AS s
2290: 6e 61 6d 65 0a 09 20 20 20 20 46 52 4f 4d 20 20  name..    FROM  
22a0: 20 73 79 6d 62 6f 6c 20 53 20 4c 45 46 54 20 4f   symbol S LEFT O
22b0: 55 54 45 52 20 4a 4f 49 4e 20 70 72 65 66 65 72  UTER JOIN prefer
22c0: 65 64 70 61 72 65 6e 74 20 50 0a 09 20 20 20 20  edparent P..    
22d0: 4f 4e 20 20 20 20 20 53 2e 73 69 64 20 3d 20 50  ON     S.sid = P
22e0: 2e 73 69 64 2c 20 20 20 20 20 20 20 2d 2d 20 46  .sid,       -- F
22f0: 72 6f 6d 20 73 79 6d 62 6f 6c 20 74 6f 20 70 72  rom symbol to pr
2300: 65 66 65 72 65 64 20 70 61 72 65 6e 74 0a 09 20  efered parent.. 
2310: 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63            projec
2320: 74 20 50 52 0a 09 20 20 20 20 57 48 45 52 45 20  t PR..    WHERE 
2330: 20 50 2e 70 69 64 20 49 53 20 4e 55 4c 4c 20 20   P.pid IS NULL  
2340: 20 20 20 20 20 20 2d 2d 20 72 65 73 74 72 69 63        -- restric
2350: 74 20 74 6f 20 73 79 6d 62 6f 6c 73 20 77 69 74  t to symbols wit
2360: 68 6f 75 74 20 61 20 70 72 65 66 65 72 65 6e 63  hout a preferenc
2370: 65 0a 09 20 20 20 20 41 4e 44 20 20 20 20 53 2e  e..    AND    S.
2380: 74 79 70 65 20 21 3d 20 24 65 78 63 6c 20 20 20  type != $excl   
2390: 20 20 20 2d 2d 20 77 68 69 63 68 20 61 72 65 20     -- which are 
23a0: 6e 6f 74 20 65 78 63 6c 75 64 65 64 0a 09 20 20  not excluded..  
23b0: 20 20 41 4e 44 20 20 20 20 53 2e 6e 61 6d 65 20    AND    S.name 
23c0: 21 3d 20 27 3a 74 72 75 6e 6b 3a 27 20 20 2d 2d  != ':trunk:'  --
23d0: 20 61 6e 64 20 61 72 65 20 6e 6f 74 20 61 20 74   and are not a t
23e0: 72 75 6e 6b 0a 09 20 20 20 20 41 4e 44 20 20 20  runk..    AND   
23f0: 20 53 2e 70 69 64 20 3d 20 50 52 2e 70 69 64 20   S.pid = PR.pid 
2400: 20 20 20 20 20 20 2d 2d 20 67 65 74 20 70 72 6f        -- get pro
2410: 6a 65 63 74 20 6f 66 20 73 79 6d 62 6f 6c 0a 09  ject of symbol..
2420: 7d 20 7b 0a 09 20 20 20 20 74 72 6f 75 62 6c 65  } {..    trouble
2430: 20 66 61 74 61 6c 20 22 24 70 6e 61 6d 65 20 3a   fatal "$pname :
2440: 20 27 24 73 6e 61 6d 65 27 20 68 61 73 20 6e 6f   '$sname' has no
2450: 20 70 72 65 66 65 72 65 64 20 70 61 72 65 6e 74   prefered parent
2460: 2e 22 0a 09 7d 0a 0a 09 23 20 54 68 65 20 72 65  ."..}...# The re
2470: 76 65 72 73 65 2c 20 68 61 76 69 6e 67 20 70 72  verse, having pr
2480: 65 66 65 72 65 64 20 70 61 72 65 6e 74 73 20 66  efered parents f
2490: 6f 72 20 75 6e 6b 6e 6f 77 6e 20 73 79 6d 62 6f  or unknown symbo
24a0: 6c 73 0a 09 23 20 63 61 6e 6e 6f 74 20 6f 63 63  ls..# cannot occ
24b0: 75 72 2e 0a 09 72 65 74 75 72 6e 0a 20 20 20 20  ur...return.    
24c0: 7d 0a 0a 20 20 20 20 23 20 23 20 23 23 20 23 23  }..    # # ## ##
24d0: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23  # ##### ########
24e0: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20   #############. 
24f0: 20 20 20 23 23 20 43 6f 6e 66 69 67 75 72 61 74     ## Configurat
2500: 69 6f 6e 0a 0a 20 20 20 20 70 72 61 67 6d 61 20  ion..    pragma 
2510: 2d 68 61 73 69 6e 73 74 61 6e 63 65 73 20 20 20  -hasinstances   
2520: 6e 6f 20 3b 20 23 20 73 69 6e 67 6c 65 74 6f 6e  no ; # singleton
2530: 0a 20 20 20 20 70 72 61 67 6d 61 20 2d 68 61 73  .    pragma -has
2540: 74 79 70 65 69 6e 66 6f 20 20 20 20 6e 6f 20 3b  typeinfo    no ;
2550: 20 23 20 6e 6f 20 69 6e 74 72 6f 73 70 65 63 74   # no introspect
2560: 69 6f 6e 0a 20 20 20 20 70 72 61 67 6d 61 20 2d  ion.    pragma -
2570: 68 61 73 74 79 70 65 64 65 73 74 72 6f 79 20 6e  hastypedestroy n
2580: 6f 20 3b 20 23 20 69 6d 6d 6f 72 74 61 6c 0a 0a  o ; # immortal..
2590: 20 20 20 20 23 20 23 20 23 23 20 23 23 23 20 23      # # ## ### #
25a0: 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23  #### ######## ##
25b0: 23 23 23 23 23 23 23 23 23 23 23 0a 7d 0a 0a 6e  ###########.}..n
25c0: 61 6d 65 73 70 61 63 65 20 65 76 61 6c 20 3a 3a  amespace eval ::
25d0: 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f  vc::fossil::impo
25e0: 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 20 7b 0a  rt::cvs::pass {.
25f0: 20 20 20 20 6e 61 6d 65 73 70 61 63 65 20 65 78      namespace ex
2600: 70 6f 72 74 20 63 6f 6c 6c 73 79 6d 0a 20 20 20  port collsym.   
2610: 20 6e 61 6d 65 73 70 61 63 65 20 65 76 61 6c 20   namespace eval 
2620: 63 6f 6c 6c 73 79 6d 20 7b 0a 09 6e 61 6d 65 73  collsym {..names
2630: 70 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63  pace import ::vc
2640: 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74  ::fossil::import
2650: 3a 3a 63 76 73 3a 3a 72 65 70 6f 73 69 74 6f 72  ::cvs::repositor
2660: 79 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70  y..namespace imp
2670: 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c  ort ::vc::fossil
2680: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 73  ::import::cvs::s
2690: 74 61 74 65 0a 09 6e 61 6d 65 73 70 61 63 65 20  tate..namespace 
26a0: 65 76 61 6c 20 70 72 6f 6a 65 63 74 20 7b 0a 09  eval project {..
26b0: 20 20 20 20 6e 61 6d 65 73 70 61 63 65 20 69 6d      namespace im
26c0: 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69  port ::vc::fossi
26d0: 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a  l::import::cvs::
26e0: 70 72 6f 6a 65 63 74 3a 3a 73 79 6d 0a 09 7d 0a  project::sym..}.
26f0: 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72  .namespace impor
2700: 74 20 3a 3a 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 74  t ::vc::tools::t
2710: 72 6f 75 62 6c 65 0a 09 6e 61 6d 65 73 70 61 63  rouble..namespac
2720: 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 74  e import ::vc::t
2730: 6f 6f 6c 73 3a 3a 6c 6f 67 0a 09 6c 6f 67 20 72  ools::log..log r
2740: 65 67 69 73 74 65 72 20 63 6f 6c 6c 73 79 6d 0a  egister collsym.
2750: 20 20 20 20 7d 0a 7d 0a 0a 23 20 23 20 23 23 20      }.}..# # ## 
2760: 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23 23  ### ##### ######
2770: 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23  ## #############
2780: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23   ###############
2790: 23 23 23 23 23 23 0a 23 23 20 52 65 61 64 79 0a  ######.## Ready.
27a0: 0a 70 61 63 6b 61 67 65 20 70 72 6f 76 69 64 65  .package provide
27b0: 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70   vc::fossil::imp
27c0: 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a 3a  ort::cvs::pass::
27d0: 63 6f 6c 6c 73 79 6d 20 31 2e 30 0a 72 65 74 75  collsym 1.0.retu
27e0: 72 6e 0a                                         rn.