Hex Artifact Content
Not logged in

Artifact 32b24a90ebaa22467da3ef6e09ff1b358bb9d793:

File tools/cvs2fossil/lib/c2f_pcollar.tcl part of check-in [38b967dcf5] - Merge aku's CVS import changes into the main line. Fix a small bug in diff.c. by drh on 2007-11-17 00:29:42. Also file tools/cvs2fossil/lib/c2f_pcollar.tcl part of check-in [54ac684df7] - Completed loading of pass I from persistent state when skipped. by aku on 2007-10-13 23:57:15.

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 2e 20 54 68 69 73 20 70 61 73 73 20 73  s I. This pass s
0210: 63 61 6e 73 20 74 68 65 20 72 65 70 6f 73 69 74  cans the reposit
0220: 6f 72 79 20 74 6f 20 69 6d 70 6f 72 74 20 66 6f  ory to import fo
0230: 72 20 52 43 53 20 61 72 63 68 69 76 65 73 2c 0a  r RCS archives,.
0240: 23 23 20 61 6e 64 20 73 6f 72 74 73 20 61 6e 64  ## and sorts and
0250: 20 66 69 6c 74 65 72 73 20 74 68 65 6d 20 69 6e   filters them in
0260: 74 6f 20 74 68 65 20 64 65 63 6c 61 72 65 64 20  to the declared 
0270: 70 72 6f 6a 65 63 74 73 2c 20 69 66 20 61 6e 79  projects, if any
0280: 0a 23 23 20 57 69 74 68 6f 75 74 20 64 65 63 6c  .## Without decl
0290: 61 72 65 64 20 70 72 6f 6a 65 63 74 73 20 74 68  ared projects th
02a0: 65 20 77 68 6f 6c 65 20 72 65 70 6f 73 69 74 6f  e whole reposito
02b0: 72 79 20 69 73 20 74 72 65 61 74 65 64 20 61 73  ry is treated as
02c0: 20 61 0a 23 23 20 73 69 6e 67 6c 65 20 70 72 6f   a.## single pro
02d0: 6a 65 63 74 2e 0a 0a 23 20 23 20 23 23 20 23 23  ject...# # ## ##
02e0: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23  # ##### ########
02f0: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 20 23   ############# #
0300: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0310: 23 23 23 23 0a 23 23 20 52 65 71 75 69 72 65 6d  ####.## Requirem
0320: 65 6e 74 73 0a 0a 70 61 63 6b 61 67 65 20 72 65  ents..package re
0330: 71 75 69 72 65 20 54 63 6c 20 38 2e 34 20 20 20  quire Tcl 8.4   
0340: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0350: 20 20 20 20 20 20 20 20 20 20 3b 20 23 20 52 65            ; # Re
0360: 71 75 69 72 65 64 20 72 75 6e 74 69 6d 65 2e 0a  quired runtime..
0370: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20  package require 
0380: 73 6e 69 74 20 20 20 20 20 20 20 20 20 20 20 20  snit            
0390: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
03a0: 20 20 20 20 3b 20 23 20 4f 4f 20 73 79 73 74 65      ; # OO syste
03b0: 6d 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  m..package requi
03c0: 72 65 20 66 69 6c 65 75 74 69 6c 3a 3a 74 72 61  re fileutil::tra
03d0: 76 65 72 73 65 20 20 20 20 20 20 20 20 20 20 20  verse           
03e0: 20 20 20 20 20 20 20 3b 20 23 20 44 69 72 65 63         ; # Direc
03f0: 74 6f 72 79 20 74 72 61 76 65 72 73 61 6c 2e 0a  tory traversal..
0400: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20  package require 
0410: 66 69 6c 65 75 74 69 6c 20 20 20 20 20 20 20 20  fileutil        
0420: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0430: 20 20 20 20 3b 20 23 20 46 69 6c 65 20 26 20 70      ; # File & p
0440: 61 74 68 20 75 74 69 6c 69 74 69 65 73 2e 0a 70  ath utilities..p
0450: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 76  ackage require v
0460: 63 3a 3a 74 6f 6f 6c 73 3a 3a 74 72 6f 75 62 6c  c::tools::troubl
0470: 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  e               
0480: 20 20 20 3b 20 23 20 45 72 72 6f 72 20 72 65 70     ; # Error rep
0490: 6f 72 74 69 6e 67 2e 0a 70 61 63 6b 61 67 65 20  orting..package 
04a0: 72 65 71 75 69 72 65 20 76 63 3a 3a 74 6f 6f 6c  require vc::tool
04b0: 73 3a 3a 6c 6f 67 20 20 20 20 20 20 20 20 20 20  s::log          
04c0: 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 23 20              ; # 
04d0: 55 73 65 72 20 66 65 65 64 62 61 63 6b 2e 0a 70  User feedback..p
04e0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 76  ackage require v
04f0: 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72  c::fossil::impor
0500: 74 3a 3a 63 76 73 3a 3a 70 61 73 73 20 20 20 20  t::cvs::pass    
0510: 20 20 20 3b 20 23 20 50 61 73 73 20 6d 61 6e 61     ; # Pass mana
0520: 67 65 6d 65 6e 74 2e 0a 70 61 63 6b 61 67 65 20  gement..package 
0530: 72 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73  require vc::foss
0540: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a  il::import::cvs:
0550: 3a 72 65 70 6f 73 69 74 6f 72 79 20 3b 20 23 20  :repository ; # 
0560: 52 65 70 6f 73 69 74 6f 72 79 20 6d 61 6e 61 67  Repository manag
0570: 65 6d 65 6e 74 2e 0a 70 61 63 6b 61 67 65 20 72  ement..package r
0580: 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 69  equire vc::fossi
0590: 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a  l::import::cvs::
05a0: 73 74 61 74 65 20 20 20 20 20 20 3b 20 23 20 53  state      ; # S
05b0: 74 61 74 65 20 73 74 6f 72 61 67 65 0a 0a 23 20  tate storage..# 
05c0: 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23  # ## ### ##### #
05d0: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23  ####### ########
05e0: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23  ##### ##########
05f0: 23 23 23 23 23 23 23 23 23 23 23 0a 23 23 20 52  ###########.## R
0600: 65 67 69 73 74 65 72 20 74 68 65 20 70 61 73 73  egister the pass
0610: 20 77 69 74 68 20 74 68 65 20 6d 61 6e 61 67 65   with the manage
0620: 6d 65 6e 74 0a 0a 76 63 3a 3a 66 6f 73 73 69 6c  ment..vc::fossil
0630: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70  ::import::cvs::p
0640: 61 73 73 20 64 65 66 69 6e 65 20 5c 0a 20 20 20  ass define \.   
0650: 20 43 6f 6c 6c 65 63 74 41 72 20 5c 0a 20 20 20   CollectAr \.   
0660: 20 7b 43 6f 6c 6c 65 63 74 20 61 72 63 68 69 76   {Collect archiv
0670: 65 73 20 69 6e 20 72 65 70 6f 73 69 74 6f 72 79  es in repository
0680: 7d 20 5c 0a 20 20 20 20 3a 3a 76 63 3a 3a 66 6f  } \.    ::vc::fo
0690: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76  ssil::import::cv
06a0: 73 3a 3a 70 61 73 73 3a 3a 63 6f 6c 6c 61 72 0a  s::pass::collar.
06b0: 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23  .# # ## ### ####
06c0: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23  # ######## #####
06d0: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23  ######## #######
06e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23  ##############.#
06f0: 23 20 0a 0a 73 6e 69 74 3a 3a 74 79 70 65 20 3a  # ..snit::type :
0700: 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70  :vc::fossil::imp
0710: 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a 3a  ort::cvs::pass::
0720: 63 6f 6c 6c 61 72 20 7b 0a 20 20 20 20 23 20 23  collar {.    # #
0730: 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23   ## ### ##### ##
0740: 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23  ###### #########
0750: 23 23 23 23 0a 20 20 20 20 23 23 20 50 75 62 6c  ####.    ## Publ
0760: 69 63 20 41 50 49 0a 0a 20 20 20 20 74 79 70 65  ic API..    type
0770: 6d 65 74 68 6f 64 20 73 65 74 75 70 20 7b 7d 20  method setup {} 
0780: 7b 0a 09 23 20 44 65 66 69 6e 65 20 6e 61 6d 65  {..# Define name
0790: 73 20 61 6e 64 20 73 74 72 75 63 74 75 72 65 20  s and structure 
07a0: 6f 66 20 74 68 65 20 70 65 72 73 69 73 74 65 6e  of the persisten
07b0: 74 20 73 74 61 74 65 20 6f 66 20 74 68 69 73 0a  t state of this.
07c0: 09 23 20 70 61 73 73 2e 0a 0a 09 23 20 57 65 20  .# pass....# We 
07d0: 64 65 61 6c 20 77 69 74 68 20 72 65 70 6f 73 69  deal with reposi
07e0: 74 6f 72 79 20 70 72 6f 6a 65 63 74 73 2c 20 61  tory projects, a
07f0: 6e 64 20 74 68 65 20 72 63 73 20 61 72 63 68 69  nd the rcs archi
0800: 76 65 20 66 69 6c 65 73 0a 09 23 20 69 6e 20 74  ve files..# in t
0810: 68 65 20 70 72 6f 6a 65 63 74 73 2e 0a 0a 09 23  he projects....#
0820: 20 46 6f 72 20 74 68 65 20 66 69 72 73 74 2c 20   For the first, 
0830: 70 72 6f 6a 65 63 74 73 2c 20 77 65 20 6b 65 65  projects, we kee
0840: 70 20 74 68 65 69 72 20 6e 61 6d 65 73 2c 20 77  p their names, w
0850: 68 69 63 68 20 61 72 65 0a 09 23 20 74 68 65 69  hich are..# thei
0860: 72 20 70 61 74 68 73 20 72 65 6c 61 74 69 76 65  r paths relative
0870: 20 74 6f 20 74 68 65 20 62 61 73 65 20 64 69 72   to the base dir
0880: 65 63 74 6f 72 79 20 6f 66 20 74 68 65 20 77 68  ectory of the wh
0890: 6f 6c 65 0a 09 23 20 72 65 70 6f 73 69 74 6f 72  ole..# repositor
08a0: 79 2e 20 54 68 65 73 65 20 68 61 76 65 20 74 6f  y. These have to
08b0: 20 62 65 20 67 6c 6f 62 61 6c 6c 79 20 75 6e 69   be globally uni
08c0: 71 75 65 2c 20 69 2e 65 2e 20 6e 6f 20 74 77 6f  que, i.e. no two
08d0: 0a 09 23 20 70 72 6f 6a 65 63 74 73 20 63 61 6e  ..# projects can
08e0: 20 68 61 76 65 20 74 68 65 20 73 61 6d 65 20 6e   have the same n
08f0: 61 6d 65 2e 0a 0a 09 23 20 46 6f 72 20 74 68 65  ame....# For the
0900: 20 66 69 6c 65 73 20 77 65 20 6b 65 65 70 20 74   files we keep t
0910: 68 65 69 72 20 6e 61 6d 65 73 2c 20 77 68 69 63  heir names, whic
0920: 68 20 61 72 65 20 74 68 65 69 72 20 70 61 74 68  h are their path
0930: 73 0a 09 23 20 72 65 6c 61 74 69 76 65 20 74 6f  s..# relative to
0940: 20 74 68 65 20 62 61 73 65 20 64 69 72 65 63 74   the base direct
0950: 6f 72 79 20 6f 66 20 74 68 65 20 77 68 6f 6c 65  ory of the whole
0960: 20 70 72 6f 6a 65 63 74 21 20 54 68 65 73 65 0a   project! These.
0970: 09 23 20 68 61 76 65 20 74 6f 20 62 65 20 75 6e  .# have to be un
0980: 69 71 75 65 20 77 69 74 68 69 6e 20 61 20 70 72  ique within a pr
0990: 6f 6a 65 63 74 2c 20 68 6f 77 65 76 65 72 20 67  oject, however g
09a0: 6c 6f 62 61 6c 6c 79 20 74 68 69 73 0a 09 23 20  lobally this..# 
09b0: 64 6f 65 73 20 6e 6f 74 20 68 6f 6c 64 2c 20 61  does not hold, a
09c0: 20 6e 61 6d 65 20 6d 61 79 20 6f 63 63 75 72 20   name may occur 
09d0: 73 65 76 65 72 61 6c 20 74 69 6d 65 73 2c 20 69  several times, i
09e0: 6e 20 64 69 66 66 65 72 65 6e 74 0a 09 23 20 70  n different..# p
09f0: 72 6f 6a 65 63 74 73 2e 20 57 65 20 66 75 72 74  rojects. We furt
0a00: 68 65 72 20 73 74 6f 72 65 20 74 68 65 20 75 73  her store the us
0a10: 65 72 20 76 69 73 69 62 6c 65 20 66 69 6c 65 20  er visible file 
0a20: 6e 61 6d 65 0a 09 23 20 61 73 73 6f 63 69 61 74  name..# associat
0a30: 65 64 20 77 69 74 68 20 74 68 65 20 72 63 73 20  ed with the rcs 
0a40: 61 72 63 68 69 76 65 2e 0a 0a 09 23 20 42 6f 74  archive....# Bot
0a50: 68 20 70 72 6f 6a 65 63 74 73 20 61 6e 64 20 66  h projects and f
0a60: 69 6c 65 73 20 61 72 65 20 69 64 65 6e 74 69 66  iles are identif
0a70: 69 65 64 20 62 79 20 67 6c 6f 62 61 6c 6c 79 20  ied by globally 
0a80: 75 6e 69 71 75 65 0a 09 23 20 69 6e 74 65 67 65  unique..# intege
0a90: 72 20 69 64 73 2c 20 61 75 74 6f 6d 61 74 69 63  r ids, automatic
0aa0: 61 6c 6c 79 20 61 73 73 69 67 6e 65 64 20 62 79  ally assigned by
0ab0: 20 74 68 65 20 64 61 74 61 62 61 73 65 2e 0a 0a   the database...
0ac0: 09 73 74 61 74 65 20 77 72 69 74 69 6e 67 20 70  .state writing p
0ad0: 72 6f 6a 65 63 74 20 7b 0a 09 20 20 20 20 70 69  roject {..    pi
0ae0: 64 20 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20  d  INTEGER  NOT 
0af0: 4e 55 4c 4c 20 20 50 52 49 4d 41 52 59 20 4b 45  NULL  PRIMARY KE
0b00: 59 20 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 2c  Y AUTOINCREMENT,
0b10: 0a 09 20 20 20 20 6e 61 6d 65 20 54 45 58 54 20  ..    name TEXT 
0b20: 20 20 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 55 4e      NOT NULL  UN
0b30: 49 51 55 45 0a 09 7d 0a 09 73 74 61 74 65 20 77  IQUE..}..state w
0b40: 72 69 74 69 6e 67 20 66 69 6c 65 20 7b 0a 09 20  riting file {.. 
0b50: 20 20 20 66 69 64 20 20 20 20 20 49 4e 54 45 47     fid     INTEG
0b60: 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 50 52  ER  NOT NULL  PR
0b70: 49 4d 41 52 59 20 4b 45 59 20 41 55 54 4f 49 4e  IMARY KEY AUTOIN
0b80: 43 52 45 4d 45 4e 54 2c 0a 09 20 20 20 20 70 69  CREMENT,..    pi
0b90: 64 20 20 20 20 20 49 4e 54 45 47 45 52 20 20 4e  d     INTEGER  N
0ba0: 4f 54 20 4e 55 4c 4c 20 20 52 45 46 45 52 45 4e  OT NULL  REFEREN
0bb0: 43 45 53 20 70 72 6f 6a 65 63 74 2c 20 20 20 20  CES project,    
0bc0: 20 20 20 2d 2d 20 70 72 6f 6a 65 63 74 20 74 68     -- project th
0bd0: 65 20 66 69 6c 65 20 62 65 6c 6f 6e 67 73 20 74  e file belongs t
0be0: 6f 0a 09 20 20 20 20 6e 61 6d 65 20 20 20 20 54  o..    name    T
0bf0: 45 58 54 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c  EXT     NOT NULL
0c00: 2c 0a 09 20 20 20 20 76 69 73 69 62 6c 65 20 54  ,..    visible T
0c10: 45 58 54 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c  EXT     NOT NULL
0c20: 2c 0a 09 20 20 20 20 65 78 65 63 20 20 20 20 49  ,..    exec    I
0c30: 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c  NTEGER  NOT NULL
0c40: 2c 20 2d 2d 20 62 6f 6f 6c 65 61 6e 2c 20 27 66  , -- boolean, 'f
0c50: 69 6c 65 20 65 78 65 63 75 74 61 62 6c 65 27 2e  ile executable'.
0c60: 0a 09 20 20 20 20 55 4e 49 51 55 45 20 28 70 69  ..    UNIQUE (pi
0c70: 64 2c 20 6e 61 6d 65 29 20 20 20 20 20 20 20 20  d, name)        
0c80: 20 2d 2d 20 66 69 6c 65 20 6e 61 6d 65 73 20 61   -- file names a
0c90: 72 65 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e  re unique within
0ca0: 20 61 20 70 72 6f 6a 65 63 74 0a 09 7d 0a 09 72   a project..}..r
0cb0: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20  eturn.    }..   
0cc0: 20 74 79 70 65 6d 65 74 68 6f 64 20 6c 6f 61 64   typemethod load
0cd0: 20 7b 7d 20 7b 09 0a 09 23 20 50 61 73 73 20 6d   {} {...# Pass m
0ce0: 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 65  anager interface
0cf0: 2e 20 45 78 65 63 75 74 65 64 20 66 6f 72 20 61  . Executed for a
0d00: 6c 6c 20 70 61 73 73 65 73 20 62 65 66 6f 72 65  ll passes before
0d10: 20 74 68 65 0a 09 23 20 72 75 6e 20 70 61 73 73   the..# run pass
0d20: 65 73 2c 20 74 6f 20 6c 6f 61 64 20 61 6c 6c 20  es, to load all 
0d30: 64 61 74 61 20 6f 66 20 74 68 65 69 72 20 70 61  data of their pa
0d40: 73 73 20 66 72 6f 6d 20 74 68 65 20 73 74 61 74  ss from the stat
0d50: 65 2c 0a 09 23 20 61 73 20 69 66 20 69 74 20 68  e,..# as if it h
0d60: 61 64 20 62 65 65 6e 20 63 6f 6d 70 75 74 65 64  ad been computed
0d70: 20 62 79 20 74 68 65 20 70 61 73 73 20 69 74 73   by the pass its
0d80: 65 6c 66 2e 0a 0a 09 73 74 61 74 65 20 72 65 61  elf....state rea
0d90: 64 69 6e 67 20 70 72 6f 6a 65 63 74 0a 09 73 74  ding project..st
0da0: 61 74 65 20 72 65 61 64 69 6e 67 20 66 69 6c 65  ate reading file
0db0: 0a 0a 09 72 65 70 6f 73 69 74 6f 72 79 20 6c 6f  ...repository lo
0dc0: 61 64 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d  ad..return.    }
0dd0: 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64  ..    typemethod
0de0: 20 72 75 6e 20 7b 7d 20 7b 0a 09 23 20 50 61 73   run {} {..# Pas
0df0: 73 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66  s manager interf
0e00: 61 63 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f  ace. Executed to
0e10: 20 70 65 72 66 6f 72 6d 20 74 68 65 0a 09 23 20   perform the..# 
0e20: 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 6f 66  functionality of
0e30: 20 74 68 65 20 70 61 73 73 2e 0a 0a 09 73 65 74   the pass....set
0e40: 20 72 62 61 73 65 20 5b 72 65 70 6f 73 69 74 6f   rbase [reposito
0e50: 72 79 20 62 61 73 65 3f 5d 0a 09 66 6f 72 65 61  ry base?]..forea
0e60: 63 68 20 70 72 6f 6a 65 63 74 20 5b 72 65 70 6f  ch project [repo
0e70: 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 73 5d  sitory projects]
0e80: 20 7b 0a 09 20 20 20 20 73 65 74 20 62 61 73 65   {..    set base
0e90: 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 72 62 61   [file join $rba
0ea0: 73 65 20 5b 24 70 72 6f 6a 65 63 74 20 62 61 73  se [$project bas
0eb0: 65 5d 5d 0a 09 20 20 20 20 6c 6f 67 20 77 72 69  e]]..    log wri
0ec0: 74 65 20 31 20 63 6f 6c 6c 61 72 20 22 53 63 61  te 1 collar "Sca
0ed0: 6e 20 24 62 61 73 65 22 0a 0a 09 20 20 20 20 73  n $base"...    s
0ee0: 65 74 20 74 72 61 76 65 72 73 65 20 5b 66 69 6c  et traverse [fil
0ef0: 65 75 74 69 6c 3a 3a 74 72 61 76 65 72 73 65 20  eutil::traverse 
0f00: 25 41 55 54 4f 25 20 24 62 61 73 65 20 5c 0a 09  %AUTO% $base \..
0f10: 09 09 20 20 20 20 20 20 2d 70 72 65 66 69 6c 74  ..      -prefilt
0f20: 65 72 20 5b 6d 79 70 72 6f 63 20 46 69 6c 74 65  er [myproc Filte
0f30: 72 41 74 74 69 63 53 75 62 64 69 72 20 24 62 61  rAtticSubdir $ba
0f40: 73 65 5d 5d 0a 09 20 20 20 20 73 65 74 20 6e 20  se]]..    set n 
0f50: 30 0a 09 20 20 20 20 73 65 74 20 72 20 7b 7d 0a  0..    set r {}.
0f60: 0a 09 20 20 20 20 24 74 72 61 76 65 72 73 65 20  ..    $traverse 
0f70: 66 6f 72 65 61 63 68 20 70 61 74 68 20 7b 0a 09  foreach path {..
0f80: 09 73 65 74 20 72 63 73 20 5b 66 69 6c 65 75 74  .set rcs [fileut
0f90: 69 6c 3a 3a 73 74 72 69 70 50 61 74 68 20 24 62  il::stripPath $b
0fa0: 61 73 65 20 24 70 61 74 68 5d 0a 09 09 69 66 20  ase $path]...if 
0fb0: 7b 5b 49 73 43 56 53 41 64 6d 69 6e 20 20 20 20  {[IsCVSAdmin    
0fc0: 24 72 63 73 5d 7d 20 20 63 6f 6e 74 69 6e 75 65  $rcs]}  continue
0fd0: 0a 09 09 69 66 20 7b 21 5b 49 73 52 43 53 41 72  ...if {![IsRCSAr
0fe0: 63 68 69 76 65 20 24 70 61 74 68 5d 7d 20 63 6f  chive $path]} co
0ff0: 6e 74 69 6e 75 65 0a 0a 09 09 73 65 74 20 75 73  ntinue....set us
1000: 72 20 5b 55 73 65 72 50 61 74 68 20 24 72 63 73  r [UserPath $rcs
1010: 20 69 73 61 74 74 69 63 5d 0a 09 09 69 66 20 7b   isattic]...if {
1020: 5b 49 73 53 75 70 65 72 63 65 64 65 64 20 24 62  [IsSuperceded $b
1030: 61 73 65 20 24 72 63 73 20 24 75 73 72 20 24 69  ase $rcs $usr $i
1040: 73 61 74 74 69 63 5d 7d 20 63 6f 6e 74 69 6e 75  sattic]} continu
1050: 65 0a 0a 09 09 69 66 20 7b 0a 09 09 20 20 20 20  e....if {...    
1060: 5b 66 69 6c 65 20 65 78 69 73 74 73 20 20 20 20  [file exists    
1070: 20 20 24 62 61 73 65 2f 24 75 73 72 5d 20 26 26    $base/$usr] &&
1080: 0a 09 09 20 20 20 20 5b 66 69 6c 65 20 69 73 64  ...    [file isd
1090: 69 72 65 63 74 6f 72 79 20 24 62 61 73 65 2f 24  irectory $base/$
10a0: 75 73 72 5d 0a 09 09 7d 20 7b 0a 09 09 20 20 20  usr]...} {...   
10b0: 20 74 72 6f 75 62 6c 65 20 66 61 74 61 6c 20 22   trouble fatal "
10c0: 44 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 20 63  Directory name c
10d0: 6f 6e 66 6c 69 63 74 73 20 77 69 74 68 20 66 69  onflicts with fi
10e0: 6c 65 6e 61 6d 65 2e 22 0a 09 09 20 20 20 20 74  lename."...    t
10f0: 72 6f 75 62 6c 65 20 66 61 74 61 6c 20 22 50 6c  rouble fatal "Pl
1100: 65 61 73 65 20 72 65 6d 6f 76 65 20 6f 72 20 72  ease remove or r
1110: 65 6e 61 6d 65 20 6f 6e 65 20 6f 66 20 74 68 65  ename one of the
1120: 20 66 6f 6c 6c 6f 77 69 6e 67 3a 22 0a 09 09 20   following:"... 
1130: 20 20 20 74 72 6f 75 62 6c 65 20 66 61 74 61 6c     trouble fatal
1140: 20 22 20 20 20 20 24 62 61 73 65 2f 24 75 73 72   "    $base/$usr
1150: 22 0a 09 09 20 20 20 20 74 72 6f 75 62 6c 65 20  "...    trouble 
1160: 66 61 74 61 6c 20 22 20 20 20 20 24 62 61 73 65  fatal "    $base
1170: 2f 24 72 63 73 22 0a 09 09 20 20 20 20 63 6f 6e  /$rcs"...    con
1180: 74 69 6e 75 65 0a 09 09 7d 0a 0a 09 09 6c 6f 67  tinue...}....log
1190: 20 77 72 69 74 65 20 34 20 63 6f 6c 6c 61 72 20   write 4 collar 
11a0: 22 46 6f 75 6e 64 20 20 20 24 72 63 73 22 0a 09  "Found   $rcs"..
11b0: 09 24 70 72 6f 6a 65 63 74 20 61 64 64 66 69 6c  .$project addfil
11c0: 65 20 24 72 63 73 20 24 75 73 72 20 5b 66 69 6c  e $rcs $usr [fil
11d0: 65 20 65 78 65 63 75 74 61 62 6c 65 20 24 72 63  e executable $rc
11e0: 73 5d 0a 0a 09 09 69 6e 63 72 20 6e 0a 09 09 69  s]....incr n...i
11f0: 66 20 7b 5b 6c 6f 67 20 76 65 72 62 6f 73 69 74  f {[log verbosit
1200: 79 3f 5d 20 3c 20 34 7d 20 7b 0a 09 09 20 20 20  y?] < 4} {...   
1210: 20 6c 6f 67 20 70 72 6f 67 72 65 73 73 20 30 20   log progress 0 
1220: 63 6f 6c 6c 61 72 20 24 6e 20 7b 7d 0a 09 09 7d  collar $n {}...}
1230: 0a 09 20 20 20 20 7d 0a 0a 09 20 20 20 20 24 74  ..    }...    $t
1240: 72 61 76 65 72 73 65 20 64 65 73 74 72 6f 79 0a  raverse destroy.
1250: 09 7d 0a 0a 09 72 65 70 6f 73 69 74 6f 72 79 20  .}...repository 
1260: 70 72 69 6e 74 73 74 61 74 69 73 74 69 63 73 0a  printstatistics.
1270: 09 72 65 70 6f 73 69 74 6f 72 79 20 70 65 72 73  .repository pers
1280: 69 73 74 0a 0a 09 6c 6f 67 20 77 72 69 74 65 20  ist...log write 
1290: 31 20 63 6f 6c 6c 61 72 20 22 53 63 61 6e 20 63  1 collar "Scan c
12a0: 6f 6d 70 6c 65 74 65 64 22 0a 09 72 65 74 75 72  ompleted"..retur
12b0: 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 74 79 70  n.    }..    typ
12c0: 65 6d 65 74 68 6f 64 20 64 69 73 63 61 72 64 20  emethod discard 
12d0: 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d 61 6e  {} {..# Pass man
12e0: 61 67 65 72 20 69 6e 74 65 72 66 61 63 65 2e 20  ager interface. 
12f0: 45 78 65 63 75 74 65 64 20 66 6f 72 20 61 6c 6c  Executed for all
1300: 20 70 61 73 73 65 73 20 61 66 74 65 72 20 74 68   passes after th
1310: 65 0a 09 23 20 72 75 6e 20 70 61 73 73 65 73 2c  e..# run passes,
1320: 20 74 6f 20 72 65 6d 6f 76 65 20 61 6c 6c 20 64   to remove all d
1330: 61 74 61 20 6f 66 20 74 68 69 73 20 70 61 73 73  ata of this pass
1340: 20 66 72 6f 6d 20 74 68 65 20 73 74 61 74 65 2c   from the state,
1350: 0a 09 23 20 61 73 20 62 65 69 6e 67 20 6f 75 74  ..# as being out
1360: 20 6f 66 20 64 61 74 65 2e 0a 0a 09 73 74 61 74   of date....stat
1370: 65 20 64 69 73 63 61 72 64 20 70 72 6f 6a 65 63  e discard projec
1380: 74 0a 09 73 74 61 74 65 20 64 69 73 63 61 72 64  t..state discard
1390: 20 66 69 6c 65 0a 09 72 65 74 75 72 6e 0a 20 20   file..return.  
13a0: 20 20 7d 0a 0a 20 20 20 20 74 79 70 65 6d 65 74    }..    typemet
13b0: 68 6f 64 20 69 67 6e 6f 72 65 5f 63 6f 6e 66 6c  hod ignore_confl
13c0: 69 63 74 69 6e 67 5f 61 74 74 69 63 73 20 7b 7d  icting_attics {}
13d0: 20 7b 0a 09 73 65 74 20 6d 79 69 67 6e 6f 72 65   {..set myignore
13e0: 20 31 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d   1..return.    }
13f0: 0a 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 23  ..    # # ## ###
1400: 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 20   ##### ######## 
1410: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20 20  #############.  
1420: 20 20 23 23 20 49 6e 74 65 72 6e 61 6c 20 6d 65    ## Internal me
1430: 74 68 6f 64 73 0a 0a 20 20 20 20 74 79 70 65 76  thods..    typev
1440: 61 72 69 61 62 6c 65 20 6d 79 69 67 6e 6f 72 65  ariable myignore
1450: 20 30 0a 0a 20 20 20 20 70 72 6f 63 20 46 69 6c   0..    proc Fil
1460: 74 65 72 41 74 74 69 63 53 75 62 64 69 72 20 7b  terAtticSubdir {
1470: 62 61 73 65 20 70 61 74 68 7d 20 7b 0a 09 23 20  base path} {..# 
1480: 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20  This command is 
1490: 75 73 65 64 20 62 79 20 74 68 65 20 74 72 61 76  used by the trav
14a0: 65 72 73 65 72 20 74 6f 20 70 72 65 76 65 6e 74  erser to prevent
14b0: 20 69 74 20 66 72 6f 6d 0a 09 23 20 73 63 61 6e   it from..# scan
14c0: 6e 69 6e 67 20 69 6e 74 6f 20 73 75 62 64 69 72  ning into subdir
14d0: 65 63 74 6f 72 69 65 73 20 6f 66 20 61 6e 20 41  ectories of an A
14e0: 74 74 69 63 2e 20 57 65 20 67 65 74 20 61 77 61  ttic. We get awa
14f0: 79 20 77 69 74 68 0a 09 23 20 63 68 65 63 6b 69  y with..# checki
1500: 6e 67 20 74 68 65 20 69 6d 6d 65 64 69 61 74 65  ng the immediate
1510: 20 70 61 72 65 6e 74 20 64 69 72 65 63 74 6f 72   parent director
1520: 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74  y of the current
1530: 20 70 61 74 68 0a 09 23 20 61 73 20 6f 75 72 20   path..# as our 
1540: 72 65 6a 65 63 74 69 6f 6e 20 6d 65 61 6e 73 20  rejection means 
1550: 74 68 61 74 20 64 65 65 70 65 72 20 70 61 74 68  that deeper path
1560: 20 64 6f 20 6e 6f 74 20 6f 63 63 75 72 2e 0a 0a   do not occur...
1570: 09 69 66 20 7b 5b 66 69 6c 65 20 74 61 69 6c 20  .if {[file tail 
1580: 5b 66 69 6c 65 20 64 69 72 6e 61 6d 65 20 24 70  [file dirname $p
1590: 61 74 68 5d 5d 20 65 71 20 22 41 74 74 69 63 22  ath]] eq "Attic"
15a0: 7d 20 7b 0a 09 20 20 20 20 73 65 74 20 61 64 20  } {..    set ad 
15b0: 5b 66 69 6c 65 75 74 69 6c 3a 3a 73 74 72 69 70  [fileutil::strip
15c0: 50 61 74 68 20 24 62 61 73 65 20 24 70 61 74 68  Path $base $path
15d0: 5d 0a 09 20 20 20 20 6c 6f 67 20 77 72 69 74 65  ]..    log write
15e0: 20 31 20 63 6f 6c 6c 61 72 20 22 44 69 72 65 63   1 collar "Direc
15f0: 74 6f 72 79 20 24 61 64 20 66 6f 75 6e 64 20 69  tory $ad found i
1600: 6e 20 41 74 74 69 63 2c 20 69 67 6e 6f 72 69 6e  n Attic, ignorin
1610: 67 2e 22 0a 09 20 20 20 20 72 65 74 75 72 6e 20  g."..    return 
1620: 30 0a 09 7d 0a 09 72 65 74 75 72 6e 20 31 0a 20  0..}..return 1. 
1630: 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 49     }..    proc I
1640: 73 52 43 53 41 72 63 68 69 76 65 20 7b 70 61 74  sRCSArchive {pat
1650: 68 7d 20 7b 0a 09 69 66 20 7b 21 5b 73 74 72 69  h} {..if {![stri
1660: 6e 67 20 6d 61 74 63 68 20 2a 2c 76 20 24 70 61  ng match *,v $pa
1670: 74 68 5d 7d 20 20 20 20 20 7b 72 65 74 75 72 6e  th]}     {return
1680: 20 30 7d 0a 09 69 66 20 7b 5b 66 69 6c 65 75 74   0}..if {[fileut
1690: 69 6c 3a 3a 74 65 73 74 20 24 70 61 74 68 20 66  il::test $path f
16a0: 72 20 6d 73 67 5d 7d 20 7b 72 65 74 75 72 6e 20  r msg]} {return 
16b0: 31 7d 0a 09 74 72 6f 75 62 6c 65 20 77 61 72 6e  1}..trouble warn
16c0: 20 24 6d 73 67 0a 09 72 65 74 75 72 6e 20 30 0a   $msg..return 0.
16d0: 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20      }..    proc 
16e0: 49 73 43 56 53 41 64 6d 69 6e 20 7b 72 63 73 7d  IsCVSAdmin {rcs}
16f0: 20 7b 0a 09 69 66 20 7b 21 5b 73 74 72 69 6e 67   {..if {![string
1700: 20 6d 61 74 63 68 20 43 56 53 52 4f 4f 54 2f 2a   match CVSROOT/*
1710: 20 24 72 63 73 5d 7d 20 7b 72 65 74 75 72 6e 20   $rcs]} {return 
1720: 30 7d 0a 09 6c 6f 67 20 77 72 69 74 65 20 34 20  0}..log write 4 
1730: 63 6f 6c 6c 61 72 20 22 49 67 6e 6f 72 65 64 20  collar "Ignored 
1740: 24 72 63 73 2c 20 61 64 6d 69 6e 69 73 74 72 61  $rcs, administra
1750: 74 69 76 65 20 61 72 63 68 69 76 65 22 0a 09 72  tive archive"..r
1760: 65 74 75 72 6e 20 31 0a 20 20 20 20 7d 0a 0a 20  eturn 1.    }.. 
1770: 20 20 20 70 72 6f 63 20 55 73 65 72 50 61 74 68     proc UserPath
1780: 20 7b 72 63 73 20 69 61 76 7d 20 7b 0a 09 75 70   {rcs iav} {..up
1790: 76 61 72 20 31 20 24 69 61 76 20 69 73 61 74 74  var 1 $iav isatt
17a0: 69 63 0a 0a 09 23 20 44 65 72 69 76 65 20 74 68  ic...# Derive th
17b0: 65 20 75 73 65 72 2d 76 69 73 69 62 6c 65 20 70  e user-visible p
17c0: 61 74 68 20 66 72 6f 6d 20 74 68 65 20 72 63 73  ath from the rcs
17d0: 20 70 61 74 68 2e 20 4d 65 61 6e 69 6e 67 3a 0a   path. Meaning:.
17e0: 09 23 20 43 68 6f 70 20 6f 66 66 20 74 68 65 20  .# Chop off the 
17f0: 22 2c 76 22 20 73 75 66 66 69 78 2c 20 61 6e 64  ",v" suffix, and
1800: 20 72 65 6d 6f 76 65 20 61 20 70 6f 73 73 69 62   remove a possib
1810: 6c 65 20 22 41 74 74 69 63 22 2e 0a 0a 09 73 65  le "Attic"....se
1820: 74 20 66 20 5b 73 74 72 69 6e 67 20 72 61 6e 67  t f [string rang
1830: 65 20 24 72 63 73 20 30 20 65 6e 64 2d 32 5d 0a  e $rcs 0 end-2].
1840: 0a 09 69 66 20 7b 22 41 74 74 69 63 22 20 65 71  ..if {"Attic" eq
1850: 20 5b 6c 69 6e 64 65 78 20 5b 66 69 6c 65 20 73   [lindex [file s
1860: 70 6c 69 74 20 24 72 63 73 5d 20 65 6e 64 2d 31  plit $rcs] end-1
1870: 5d 7d 20 7b 0a 0a 09 20 20 20 20 23 20 54 68 65  ]} {...    # The
1880: 20 63 6f 6e 73 74 72 75 63 74 69 6f 6e 20 62 65   construction be
1890: 6c 6f 77 20 65 6e 73 75 72 65 73 20 74 68 61 74  low ensures that
18a0: 20 41 74 74 69 63 2f 58 20 6d 61 70 73 20 74 6f   Attic/X maps to
18b0: 20 58 0a 09 20 20 20 20 23 20 69 6e 73 74 65 61   X..    # instea
18c0: 64 20 6f 66 20 2e 2f 58 2e 20 4f 74 68 65 72 77  d of ./X. Otherw
18d0: 69 73 65 2c 20 59 2f 41 74 74 69 63 2f 58 20 6d  ise, Y/Attic/X m
18e0: 61 70 73 20 74 6f 20 59 2f 58 2e 0a 0a 09 20 20  aps to Y/X....  
18f0: 20 20 73 65 74 20 66 78 20 5b 66 69 6c 65 20 64    set fx [file d
1900: 69 72 6e 61 6d 65 20 5b 66 69 6c 65 20 64 69 72  irname [file dir
1910: 6e 61 6d 65 20 24 66 5d 5d 0a 09 20 20 20 20 73  name $f]]..    s
1920: 65 74 20 66 20 20 5b 66 69 6c 65 20 74 61 69 6c  et f  [file tail
1930: 20 24 66 5d 0a 09 20 20 20 20 69 66 20 7b 24 66   $f]..    if {$f
1940: 78 20 6e 65 20 22 2e 22 7d 20 7b 20 73 65 74 20  x ne "."} { set 
1950: 66 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 66 78  f [file join $fx
1960: 20 24 66 5d 20 7d 0a 0a 09 20 20 20 20 73 65 74   $f] }...    set
1970: 20 69 73 61 74 74 69 63 20 31 0a 09 7d 20 65 6c   isattic 1..} el
1980: 73 65 20 7b 0a 09 20 20 20 20 73 65 74 20 69 73  se {..    set is
1990: 61 74 74 69 63 20 30 0a 09 7d 0a 0a 09 72 65 74  attic 0..}...ret
19a0: 75 72 6e 20 24 66 0a 20 20 20 20 7d 0a 0a 20 20  urn $f.    }..  
19b0: 20 20 70 72 6f 63 20 49 73 53 75 70 65 72 63 65    proc IsSuperce
19c0: 64 65 64 20 7b 62 61 73 65 20 72 63 73 20 75 73  ded {base rcs us
19d0: 72 20 69 73 61 74 74 69 63 7d 20 7b 0a 09 3a 3a  r isattic} {..::
19e0: 76 61 72 69 61 62 6c 65 20 6d 79 69 67 6e 6f 72  variable myignor
19f0: 65 0a 0a 09 69 66 20 7b 21 24 69 73 61 74 74 69  e...if {!$isatti
1a00: 63 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 20  c}              
1a10: 20 20 20 20 20 7b 72 65 74 75 72 6e 20 30 7d 0a       {return 0}.
1a20: 09 69 66 20 7b 21 5b 66 69 6c 65 20 65 78 69 73  .if {![file exis
1a30: 74 73 20 24 62 61 73 65 2f 24 75 73 72 2c 76 5d  ts $base/$usr,v]
1a40: 7d 20 7b 72 65 74 75 72 6e 20 30 7d 0a 0a 09 23  } {return 0}...#
1a50: 20 57 65 20 68 61 76 65 20 61 20 72 65 67 75 6c   We have a regul
1a60: 61 72 20 61 72 63 68 69 76 65 20 61 6e 64 20 61  ar archive and a
1a70: 6e 20 41 74 74 69 63 20 61 72 63 68 69 76 65 20  n Attic archive 
1a80: 72 65 66 65 72 69 6e 67 20 74 6f 0a 09 23 20 74  refering to..# t
1a90: 68 65 20 73 61 6d 65 20 75 73 65 72 20 76 69 73  he same user vis
1aa0: 69 62 6c 65 20 66 69 6c 65 2e 20 49 67 6e 6f 72  ible file. Ignor
1ab0: 65 20 74 68 65 20 66 69 6c 65 20 69 6e 20 74 68  e the file in th
1ac0: 65 20 41 74 74 69 63 2e 0a 09 23 0a 09 23 20 42  e Attic...#..# B
1ad0: 79 20 64 65 66 61 75 6c 74 20 74 68 69 73 20 69  y default this i
1ae0: 73 20 61 20 70 72 6f 62 6c 65 6d 20 63 61 75 73  s a problem caus
1af0: 69 6e 67 20 61 6e 20 61 62 6f 72 74 20 61 66 74  ing an abort aft
1b00: 65 72 20 74 68 65 20 70 61 73 73 0a 09 23 20 68  er the pass..# h
1b10: 61 73 20 63 6f 6d 70 6c 65 74 65 64 2e 20 54 68  as completed. Th
1b20: 65 20 75 73 65 72 20 63 61 6e 20 68 6f 77 65 76  e user can howev
1b30: 65 72 20 66 6f 72 63 65 20 75 73 20 74 6f 20 69  er force us to i
1b40: 67 6e 6f 72 65 20 69 74 2e 0a 09 23 20 49 6e 20  gnore it...# In 
1b50: 74 68 61 74 20 63 61 73 65 20 74 68 65 20 77 61  that case the wa
1b60: 72 6e 69 6e 67 20 69 73 20 73 74 69 6c 6c 20 70  rning is still p
1b70: 72 69 6e 74 65 64 2c 20 62 75 74 20 77 69 6c 6c  rinted, but will
1b80: 20 6e 6f 74 0a 09 23 20 69 6e 64 75 63 65 20 61   not..# induce a
1b90: 6e 20 61 62 6f 72 74 20 61 6e 79 20 6c 6f 6e 67  n abort any long
1ba0: 65 72 2e 0a 0a 09 69 66 20 7b 24 6d 79 69 67 6e  er....if {$myign
1bb0: 6f 72 65 7d 20 7b 0a 09 20 20 20 20 6c 6f 67 20  ore} {..    log 
1bc0: 77 72 69 74 65 20 32 20 63 6f 6c 6c 61 72 20 22  write 2 collar "
1bd0: 49 67 6e 6f 72 65 64 20 24 72 63 73 2c 20 73 75  Ignored $rcs, su
1be0: 70 65 72 63 65 64 65 64 20 61 72 63 68 69 76 65  perceded archive
1bf0: 22 0a 09 7d 20 65 6c 73 65 20 7b 0a 09 20 20 20  "..} else {..   
1c00: 20 74 72 6f 75 62 6c 65 20 77 61 72 6e 20 20 20   trouble warn   
1c10: 20 20 20 20 22 49 67 6e 6f 72 65 64 20 24 72 63      "Ignored $rc
1c20: 73 2c 20 73 75 70 65 72 63 65 64 65 64 20 61 72  s, superceded ar
1c30: 63 68 69 76 65 22 0a 09 7d 0a 09 72 65 74 75 72  chive"..}..retur
1c40: 6e 20 31 0a 20 20 20 20 7d 0a 0a 20 20 20 20 23  n 1.    }..    #
1c50: 20 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20   # ## ### ##### 
1c60: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23  ######## #######
1c70: 23 23 23 23 23 23 0a 20 20 20 20 23 23 20 43 6f  ######.    ## Co
1c80: 6e 66 69 67 75 72 61 74 69 6f 6e 0a 0a 20 20 20  nfiguration..   
1c90: 20 70 72 61 67 6d 61 20 2d 68 61 73 69 6e 73 74   pragma -hasinst
1ca0: 61 6e 63 65 73 20 20 20 6e 6f 20 3b 20 23 20 73  ances   no ; # s
1cb0: 69 6e 67 6c 65 74 6f 6e 0a 20 20 20 20 70 72 61  ingleton.    pra
1cc0: 67 6d 61 20 2d 68 61 73 74 79 70 65 69 6e 66 6f  gma -hastypeinfo
1cd0: 20 20 20 20 6e 6f 20 3b 20 23 20 6e 6f 20 69 6e      no ; # no in
1ce0: 74 72 6f 73 70 65 63 74 69 6f 6e 0a 20 20 20 20  trospection.    
1cf0: 70 72 61 67 6d 61 20 2d 68 61 73 74 79 70 65 64  pragma -hastyped
1d00: 65 73 74 72 6f 79 20 6e 6f 20 3b 20 23 20 69 6d  estroy no ; # im
1d10: 6d 6f 72 74 61 6c 0a 0a 20 20 20 20 23 20 23 20  mortal..    # # 
1d20: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23  ## ### ##### ###
1d30: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23  ##### ##########
1d40: 23 23 23 0a 7d 0a 0a 6e 61 6d 65 73 70 61 63 65  ###.}..namespace
1d50: 20 65 76 61 6c 20 3a 3a 76 63 3a 3a 66 6f 73 73   eval ::vc::foss
1d60: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a  il::import::cvs:
1d70: 3a 70 61 73 73 20 7b 0a 20 20 20 20 6e 61 6d 65  :pass {.    name
1d80: 73 70 61 63 65 20 65 78 70 6f 72 74 20 63 6f 6c  space export col
1d90: 6c 61 72 0a 20 20 20 20 6e 61 6d 65 73 70 61 63  lar.    namespac
1da0: 65 20 65 76 61 6c 20 63 6f 6c 6c 61 72 20 7b 0a  e eval collar {.
1db0: 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72  .namespace impor
1dc0: 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a  t ::vc::fossil::
1dd0: 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 72 65 70  import::cvs::rep
1de0: 6f 73 69 74 6f 72 79 0a 09 6e 61 6d 65 73 70 61  ository..namespa
1df0: 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a  ce import ::vc::
1e00: 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a  fossil::import::
1e10: 63 76 73 3a 3a 73 74 61 74 65 0a 09 6e 61 6d 65  cvs::state..name
1e20: 73 70 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76  space import ::v
1e30: 63 3a 3a 74 6f 6f 6c 73 3a 3a 74 72 6f 75 62 6c  c::tools::troubl
1e40: 65 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70  e..namespace imp
1e50: 6f 72 74 20 3a 3a 76 63 3a 3a 74 6f 6f 6c 73 3a  ort ::vc::tools:
1e60: 3a 6c 6f 67 0a 09 6c 6f 67 20 72 65 67 69 73 74  :log..log regist
1e70: 65 72 20 63 6f 6c 6c 61 72 0a 20 20 20 20 7d 0a  er collar.    }.
1e80: 7d 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 23  }..# # ## ### ##
1e90: 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23  ### ######## ###
1ea0: 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23  ########## #####
1eb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1ec0: 0a 23 23 20 52 65 61 64 79 0a 0a 70 61 63 6b 61  .## Ready..packa
1ed0: 67 65 20 70 72 6f 76 69 64 65 20 76 63 3a 3a 66  ge provide vc::f
1ee0: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63  ossil::import::c
1ef0: 76 73 3a 3a 70 61 73 73 3a 3a 63 6f 6c 6c 61 72  vs::pass::collar
1f00: 20 31 2e 30 0a 72 65 74 75 72 6e 0a               1.0.return.