Artifact 54fd12d643c606ff82b0aa5ee00c6ab9f18c340c:
File
tools/cvs2fossil/lib/c2f_pcollar.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_pcollar.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 49 2e 20 54 68 69 73 20 70 # Pass I. This p
0210: 61 73 73 20 73 63 61 6e 73 20 74 68 65 20 72 65 ass scans the re
0220: 70 6f 73 69 74 6f 72 79 20 74 6f 20 69 6d 70 6f pository to impo
0230: 72 74 20 66 6f 72 20 52 43 53 20 61 72 63 68 69 rt for RCS archi
0240: 76 65 73 2c 0a 23 23 20 61 6e 64 20 73 6f 72 74 ves,.## and sort
0250: 73 20 61 6e 64 20 66 69 6c 74 65 72 73 20 74 68 s and filters th
0260: 65 6d 20 69 6e 74 6f 20 74 68 65 20 64 65 63 6c em into the decl
0270: 61 72 65 64 20 70 72 6f 6a 65 63 74 73 2c 20 69 ared projects, i
0280: 66 20 61 6e 79 0a 23 23 20 57 69 74 68 6f 75 74 f any.## Without
0290: 20 64 65 63 6c 61 72 65 64 20 70 72 6f 6a 65 63 declared projec
02a0: 74 73 20 74 68 65 20 77 68 6f 6c 65 20 72 65 70 ts the whole rep
02b0: 6f 73 69 74 6f 72 79 20 69 73 20 74 72 65 61 74 ository is treat
02c0: 65 64 20 61 73 20 61 0a 23 23 20 73 69 6e 67 6c ed as a.## singl
02d0: 65 20 70 72 6f 6a 65 63 74 2e 0a 0a 23 20 23 20 e project...# #
02e0: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 ## ### ##### ###
02f0: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ##########
0300: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 ### ############
0310: 23 23 23 23 23 23 23 23 23 0a 23 23 20 52 65 71 #########.## Req
0320: 75 69 72 65 6d 65 6e 74 73 0a 0a 70 61 63 6b 61 uirements..packa
0330: 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 20 38 ge require Tcl 8
0340: 2e 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .4
0350: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b ;
0360: 20 23 20 52 65 71 75 69 72 65 64 20 72 75 6e 74 # Required runt
0370: 69 6d 65 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 ime..package req
0380: 75 69 72 65 20 73 6e 69 74 20 20 20 20 20 20 20 uire snit
0390: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
03a0: 20 20 20 20 20 20 20 20 20 3b 20 23 20 4f 4f 20 ; # OO
03b0: 73 79 73 74 65 6d 2e 0a 70 61 63 6b 61 67 65 20 system..package
03c0: 72 65 71 75 69 72 65 20 66 69 6c 65 75 74 69 6c require fileutil
03d0: 3a 3a 74 72 61 76 65 72 73 65 20 20 20 20 20 20 ::traverse
03e0: 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 23 20 ; #
03f0: 44 69 72 65 63 74 6f 72 79 20 74 72 61 76 65 72 Directory traver
0400: 73 61 6c 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 sal..package req
0410: 75 69 72 65 20 66 69 6c 65 75 74 69 6c 20 20 20 uire fileutil
0420: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0430: 20 20 20 20 20 20 20 20 20 3b 20 23 20 46 69 6c ; # Fil
0440: 65 20 26 20 70 61 74 68 20 75 74 69 6c 69 74 69 e & path utiliti
0450: 65 73 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 es..package requ
0460: 69 72 65 20 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 74 ire vc::tools::t
0470: 72 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 20 rouble
0480: 20 20 20 20 20 20 20 20 3b 20 23 20 45 72 72 6f ; # Erro
0490: 72 20 72 65 70 6f 72 74 69 6e 67 2e 0a 70 61 63 r reporting..pac
04a0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 76 63 3a kage require vc:
04b0: 3a 74 6f 6f 6c 73 3a 3a 6c 6f 67 20 20 20 20 20 :tools::log
04c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
04d0: 20 3b 20 23 20 55 73 65 72 20 66 65 65 64 62 61 ; # User feedba
04e0: 63 6b 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ck..package requ
04f0: 69 72 65 20 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6d ire vc::tools::m
0500: 69 73 63 20 20 20 20 20 20 20 20 20 20 20 20 20 isc
0510: 20 20 20 20 20 20 20 20 3b 20 23 20 4c 6f 63 61 ; # Loca
0520: 6c 20 66 69 6c 65 20 75 74 69 6c 69 74 69 65 73 l file utilities
0530: 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 ..package requir
0540: 65 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d e vc::fossil::im
0550: 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 20 port::cvs::pass
0560: 20 20 20 20 20 20 3b 20 23 20 50 61 73 73 20 6d ; # Pass m
0570: 61 6e 61 67 65 6d 65 6e 74 2e 0a 70 61 63 6b 61 anagement..packa
0580: 67 65 20 72 65 71 75 69 72 65 20 76 63 3a 3a 66 ge require vc::f
0590: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c
05a0: 76 73 3a 3a 72 65 70 6f 73 69 74 6f 72 79 20 3b vs::repository ;
05b0: 20 23 20 52 65 70 6f 73 69 74 6f 72 79 20 6d 61 # Repository ma
05c0: 6e 61 67 65 6d 65 6e 74 2e 0a 70 61 63 6b 61 67 nagement..packag
05d0: 65 20 72 65 71 75 69 72 65 20 76 63 3a 3a 66 6f e require vc::fo
05e0: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 ssil::import::cv
05f0: 73 3a 3a 73 74 61 74 65 20 20 20 20 20 20 3b 20 s::state ;
0600: 23 20 53 74 61 74 65 20 73 74 6f 72 61 67 65 0a # State storage.
0610: 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 .# # ## ### ####
0620: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 # ######## #####
0630: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 ######## #######
0640: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 ##############.#
0650: 23 20 52 65 67 69 73 74 65 72 20 74 68 65 20 70 # Register the p
0660: 61 73 73 20 77 69 74 68 20 74 68 65 20 6d 61 6e ass with the man
0670: 61 67 65 6d 65 6e 74 0a 0a 76 63 3a 3a 66 6f 73 agement..vc::fos
0680: 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 sil::import::cvs
0690: 3a 3a 70 61 73 73 20 64 65 66 69 6e 65 20 5c 0a ::pass define \.
06a0: 20 20 20 20 43 6f 6c 6c 65 63 74 41 72 20 5c 0a CollectAr \.
06b0: 20 20 20 20 7b 43 6f 6c 6c 65 63 74 20 61 72 63 {Collect arc
06c0: 68 69 76 65 73 20 69 6e 20 72 65 70 6f 73 69 74 hives in reposit
06d0: 6f 72 79 7d 20 5c 0a 20 20 20 20 3a 3a 76 63 3a ory} \. ::vc:
06e0: 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a :fossil::import:
06f0: 3a 63 76 73 3a 3a 70 61 73 73 3a 3a 63 6f 6c 6c :cvs::pass::coll
0700: 61 72 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 ar..# # ## ### #
0710: 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 #### ######## ##
0720: 23 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 ########### ####
0730: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0740: 23 0a 23 23 0a 0a 73 6e 69 74 3a 3a 74 79 70 65 #.##..snit::type
0750: 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 ::vc::fossil::i
0760: 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 mport::cvs::pass
0770: 3a 3a 63 6f 6c 6c 61 72 20 7b 0a 20 20 20 20 23 ::collar {. #
0780: 20 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 # ## ### #####
0790: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 ######## #######
07a0: 23 23 23 23 23 23 0a 20 20 20 20 23 23 20 50 75 ######. ## Pu
07b0: 62 6c 69 63 20 41 50 49 0a 0a 20 20 20 20 74 79 blic API.. ty
07c0: 70 65 6d 65 74 68 6f 64 20 73 65 74 75 70 20 7b pemethod setup {
07d0: 7d 20 7b 0a 09 23 20 44 65 66 69 6e 65 20 6e 61 } {..# Define na
07e0: 6d 65 73 20 61 6e 64 20 73 74 72 75 63 74 75 72 mes and structur
07f0: 65 20 6f 66 20 74 68 65 20 70 65 72 73 69 73 74 e of the persist
0800: 65 6e 74 20 73 74 61 74 65 20 6f 66 20 74 68 69 ent state of thi
0810: 73 0a 09 23 20 70 61 73 73 2e 0a 0a 09 23 20 57 s..# pass....# W
0820: 65 20 64 65 61 6c 20 77 69 74 68 20 72 65 70 6f e deal with repo
0830: 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 73 2c sitory projects,
0840: 20 61 6e 64 20 74 68 65 20 72 63 73 20 61 72 63 and the rcs arc
0850: 68 69 76 65 20 66 69 6c 65 73 0a 09 23 20 69 6e hive files..# in
0860: 20 74 68 65 20 70 72 6f 6a 65 63 74 73 2e 0a 0a the projects...
0870: 09 23 20 46 6f 72 20 74 68 65 20 66 69 72 73 74 .# For the first
0880: 2c 20 70 72 6f 6a 65 63 74 73 2c 20 77 65 20 6b , projects, we k
0890: 65 65 70 20 74 68 65 69 72 20 6e 61 6d 65 73 2c eep their names,
08a0: 20 77 68 69 63 68 20 61 72 65 0a 09 23 20 74 68 which are..# th
08b0: 65 69 72 20 70 61 74 68 73 20 72 65 6c 61 74 69 eir paths relati
08c0: 76 65 20 74 6f 20 74 68 65 20 62 61 73 65 20 64 ve to the base d
08d0: 69 72 65 63 74 6f 72 79 20 6f 66 20 74 68 65 20 irectory of the
08e0: 77 68 6f 6c 65 0a 09 23 20 72 65 70 6f 73 69 74 whole..# reposit
08f0: 6f 72 79 2e 20 54 68 65 73 65 20 68 61 76 65 20 ory. These have
0900: 74 6f 20 62 65 20 67 6c 6f 62 61 6c 6c 79 20 75 to be globally u
0910: 6e 69 71 75 65 2c 20 69 2e 65 2e 20 6e 6f 20 74 nique, i.e. no t
0920: 77 6f 0a 09 23 20 70 72 6f 6a 65 63 74 73 20 63 wo..# projects c
0930: 61 6e 20 68 61 76 65 20 74 68 65 20 73 61 6d 65 an have the same
0940: 20 6e 61 6d 65 2e 0a 0a 09 23 20 46 6f 72 20 74 name....# For t
0950: 68 65 20 66 69 6c 65 73 20 77 65 20 6b 65 65 70 he files we keep
0960: 20 74 68 65 69 72 20 6e 61 6d 65 73 2c 20 77 68 their names, wh
0970: 69 63 68 20 61 72 65 20 74 68 65 69 72 20 70 61 ich are their pa
0980: 74 68 73 0a 09 23 20 72 65 6c 61 74 69 76 65 20 ths..# relative
0990: 74 6f 20 74 68 65 20 62 61 73 65 20 64 69 72 65 to the base dire
09a0: 63 74 6f 72 79 20 6f 66 20 74 68 65 20 77 68 6f ctory of the who
09b0: 6c 65 20 70 72 6f 6a 65 63 74 21 20 54 68 65 73 le project! Thes
09c0: 65 0a 09 23 20 68 61 76 65 20 74 6f 20 62 65 20 e..# have to be
09d0: 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 61 20 unique within a
09e0: 70 72 6f 6a 65 63 74 2c 20 68 6f 77 65 76 65 72 project, however
09f0: 20 67 6c 6f 62 61 6c 6c 79 20 74 68 69 73 0a 09 globally this..
0a00: 23 20 64 6f 65 73 20 6e 6f 74 20 68 6f 6c 64 2c # does not hold,
0a10: 20 61 20 6e 61 6d 65 20 6d 61 79 20 6f 63 63 75 a name may occu
0a20: 72 20 73 65 76 65 72 61 6c 20 74 69 6d 65 73 2c r several times,
0a30: 20 69 6e 20 64 69 66 66 65 72 65 6e 74 0a 09 23 in different..#
0a40: 20 70 72 6f 6a 65 63 74 73 2e 20 57 65 20 66 75 projects. We fu
0a50: 72 74 68 65 72 20 73 74 6f 72 65 20 74 68 65 20 rther store the
0a60: 75 73 65 72 20 76 69 73 69 62 6c 65 20 66 69 6c user visible fil
0a70: 65 20 6e 61 6d 65 0a 09 23 20 61 73 73 6f 63 69 e name..# associ
0a80: 61 74 65 64 20 77 69 74 68 20 74 68 65 20 72 63 ated with the rc
0a90: 73 20 61 72 63 68 69 76 65 2e 0a 0a 09 23 20 42 s archive....# B
0aa0: 6f 74 68 20 70 72 6f 6a 65 63 74 73 20 61 6e 64 oth projects and
0ab0: 20 66 69 6c 65 73 20 61 72 65 20 69 64 65 6e 74 files are ident
0ac0: 69 66 69 65 64 20 62 79 20 67 6c 6f 62 61 6c 6c ified by globall
0ad0: 79 20 75 6e 69 71 75 65 0a 09 23 20 69 6e 74 65 y unique..# inte
0ae0: 67 65 72 20 69 64 73 2c 20 61 75 74 6f 6d 61 74 ger ids, automat
0af0: 69 63 61 6c 6c 79 20 61 73 73 69 67 6e 65 64 20 ically assigned
0b00: 62 79 20 74 68 65 20 64 61 74 61 62 61 73 65 2e by the database.
0b10: 0a 0a 09 73 74 61 74 65 20 65 78 74 65 6e 64 20 ...state extend
0b20: 70 72 6f 6a 65 63 74 20 7b 0a 09 20 20 20 20 70 project {.. p
0b30: 69 64 20 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 id INTEGER NOT
0b40: 20 4e 55 4c 4c 20 20 50 52 49 4d 41 52 59 20 4b NULL PRIMARY K
0b50: 45 59 20 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 EY AUTOINCREMENT
0b60: 2c 0a 09 20 20 20 20 6e 61 6d 65 20 54 45 58 54 ,.. name TEXT
0b70: 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 55 NOT NULL U
0b80: 4e 49 51 55 45 0a 09 7d 0a 09 73 74 61 74 65 20 NIQUE..}..state
0b90: 65 78 74 65 6e 64 20 66 69 6c 65 20 7b 0a 09 20 extend file {..
0ba0: 20 20 20 66 69 64 20 20 20 20 20 49 4e 54 45 47 fid INTEG
0bb0: 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 50 52 ER NOT NULL PR
0bc0: 49 4d 41 52 59 20 4b 45 59 20 41 55 54 4f 49 4e IMARY KEY AUTOIN
0bd0: 43 52 45 4d 45 4e 54 2c 0a 09 20 20 20 20 70 69 CREMENT,.. pi
0be0: 64 20 20 20 20 20 49 4e 54 45 47 45 52 20 20 4e d INTEGER N
0bf0: 4f 54 20 4e 55 4c 4c 20 20 52 45 46 45 52 45 4e OT NULL REFEREN
0c00: 43 45 53 20 70 72 6f 6a 65 63 74 2c 20 20 20 20 CES project,
0c10: 20 20 20 2d 2d 20 70 72 6f 6a 65 63 74 20 74 68 -- project th
0c20: 65 20 66 69 6c 65 20 62 65 6c 6f 6e 67 73 20 74 e file belongs t
0c30: 6f 0a 09 20 20 20 20 6e 61 6d 65 20 20 20 20 54 o.. name T
0c40: 45 58 54 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c EXT NOT NULL
0c50: 2c 0a 09 20 20 20 20 76 69 73 69 62 6c 65 20 54 ,.. visible T
0c60: 45 58 54 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c EXT NOT NULL
0c70: 2c 0a 09 20 20 20 20 65 78 65 63 20 20 20 20 49 ,.. exec I
0c80: 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c NTEGER NOT NULL
0c90: 2c 20 2d 2d 20 62 6f 6f 6c 65 61 6e 2c 20 27 66 , -- boolean, 'f
0ca0: 69 6c 65 20 65 78 65 63 75 74 61 62 6c 65 27 2e ile executable'.
0cb0: 0a 09 20 20 20 20 55 4e 49 51 55 45 20 28 70 69 .. UNIQUE (pi
0cc0: 64 2c 20 6e 61 6d 65 29 20 20 20 20 20 20 20 20 d, name)
0cd0: 20 2d 2d 20 66 69 6c 65 20 6e 61 6d 65 73 20 61 -- file names a
0ce0: 72 65 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e re unique within
0cf0: 20 61 20 70 72 6f 6a 65 63 74 0a 09 7d 0a 09 72 a project..}..r
0d00: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 eturn. }..
0d10: 20 74 79 70 65 6d 65 74 68 6f 64 20 6c 6f 61 64 typemethod load
0d20: 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d 61 {} {..# Pass ma
0d30: 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 65 2e nager interface.
0d40: 20 45 78 65 63 75 74 65 64 20 66 6f 72 20 61 6c Executed for al
0d50: 6c 20 70 61 73 73 65 73 20 62 65 66 6f 72 65 20 l passes before
0d60: 74 68 65 0a 09 23 20 72 75 6e 20 70 61 73 73 65 the..# run passe
0d70: 73 2c 20 74 6f 20 6c 6f 61 64 20 61 6c 6c 20 64 s, to load all d
0d80: 61 74 61 20 6f 66 20 74 68 65 69 72 20 70 61 73 ata of their pas
0d90: 73 20 66 72 6f 6d 20 74 68 65 20 73 74 61 74 65 s from the state
0da0: 2c 0a 09 23 20 61 73 20 69 66 20 69 74 20 68 61 ,..# as if it ha
0db0: 64 20 62 65 65 6e 20 63 6f 6d 70 75 74 65 64 20 d been computed
0dc0: 62 79 20 74 68 65 20 70 61 73 73 20 69 74 73 65 by the pass itse
0dd0: 6c 66 2e 0a 0a 09 73 74 61 74 65 20 75 73 65 20 lf....state use
0de0: 70 72 6f 6a 65 63 74 0a 09 73 74 61 74 65 20 75 project..state u
0df0: 73 65 20 66 69 6c 65 0a 0a 09 72 65 70 6f 73 69 se file...reposi
0e00: 74 6f 72 79 20 6c 6f 61 64 0a 09 72 65 74 75 72 tory load..retur
0e10: 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 74 79 70 n. }.. typ
0e20: 65 6d 65 74 68 6f 64 20 72 75 6e 20 7b 7d 20 7b emethod run {} {
0e30: 0a 09 23 20 50 61 73 73 20 6d 61 6e 61 67 65 72 ..# Pass manager
0e40: 20 69 6e 74 65 72 66 61 63 65 2e 20 45 78 65 63 interface. Exec
0e50: 75 74 65 64 20 74 6f 20 70 65 72 66 6f 72 6d 20 uted to perform
0e60: 74 68 65 0a 09 23 20 66 75 6e 63 74 69 6f 6e 61 the..# functiona
0e70: 6c 69 74 79 20 6f 66 20 74 68 65 20 70 61 73 73 lity of the pass
0e80: 2e 0a 0a 09 73 65 74 20 72 62 61 73 65 20 5b 72 ....set rbase [r
0e90: 65 70 6f 73 69 74 6f 72 79 20 62 61 73 65 3f 5d epository base?]
0ea0: 0a 09 66 6f 72 65 61 63 68 20 70 72 6f 6a 65 63 ..foreach projec
0eb0: 74 20 5b 72 65 70 6f 73 69 74 6f 72 79 20 70 72 t [repository pr
0ec0: 6f 6a 65 63 74 73 5d 20 7b 0a 09 20 20 20 20 73 ojects] {.. s
0ed0: 65 74 20 62 61 73 65 20 5b 3a 3a 66 69 6c 65 20 et base [::file
0ee0: 6a 6f 69 6e 20 24 72 62 61 73 65 20 5b 24 70 72 join $rbase [$pr
0ef0: 6f 6a 65 63 74 20 62 61 73 65 5d 5d 0a 09 20 20 oject base]]..
0f00: 20 20 6c 6f 67 20 77 72 69 74 65 20 31 20 63 6f log write 1 co
0f10: 6c 6c 61 72 20 22 53 63 61 6e 20 24 62 61 73 65 llar "Scan $base
0f20: 22 0a 0a 09 20 20 20 20 73 65 74 20 74 72 61 76 "... set trav
0f30: 65 72 73 65 20 5b 66 69 6c 65 75 74 69 6c 3a 3a erse [fileutil::
0f40: 74 72 61 76 65 72 73 65 20 25 41 55 54 4f 25 20 traverse %AUTO%
0f50: 24 62 61 73 65 20 5c 0a 09 09 09 20 20 20 20 20 $base \....
0f60: 20 2d 70 72 65 66 69 6c 74 65 72 20 5b 6d 79 70 -prefilter [myp
0f70: 72 6f 63 20 46 69 6c 74 65 72 41 74 74 69 63 53 roc FilterAtticS
0f80: 75 62 64 69 72 20 24 62 61 73 65 5d 5d 0a 09 20 ubdir $base]]..
0f90: 20 20 20 73 65 74 20 6e 20 30 0a 09 20 20 20 20 set n 0..
0fa0: 73 65 74 20 72 20 7b 7d 0a 0a 09 20 20 20 20 24 set r {}... $
0fb0: 74 72 61 76 65 72 73 65 20 66 6f 72 65 61 63 68 traverse foreach
0fc0: 20 70 61 74 68 20 7b 0a 09 09 73 65 74 20 72 63 path {...set rc
0fd0: 73 20 5b 66 69 6c 65 75 74 69 6c 3a 3a 73 74 72 s [fileutil::str
0fe0: 69 70 50 61 74 68 20 24 62 61 73 65 20 24 70 61 ipPath $base $pa
0ff0: 74 68 5d 0a 09 09 69 66 20 7b 5b 49 73 43 56 53 th]...if {[IsCVS
1000: 41 64 6d 69 6e 20 20 20 20 24 72 63 73 5d 7d 20 Admin $rcs]}
1010: 20 63 6f 6e 74 69 6e 75 65 0a 09 09 69 66 20 7b continue...if {
1020: 21 5b 49 73 52 43 53 41 72 63 68 69 76 65 20 24 ![IsRCSArchive $
1030: 70 61 74 68 5d 7d 20 63 6f 6e 74 69 6e 75 65 0a path]} continue.
1040: 0a 09 09 73 65 74 20 75 73 72 20 5b 55 73 65 72 ...set usr [User
1050: 50 61 74 68 20 24 72 63 73 20 69 73 61 74 74 69 Path $rcs isatti
1060: 63 5d 0a 09 09 69 66 20 7b 5b 49 73 53 75 70 65 c]...if {[IsSupe
1070: 72 63 65 64 65 64 20 24 62 61 73 65 20 24 72 63 rceded $base $rc
1080: 73 20 24 75 73 72 20 24 69 73 61 74 74 69 63 5d s $usr $isattic]
1090: 7d 20 63 6f 6e 74 69 6e 75 65 0a 0a 09 09 23 20 } continue....#
10a0: 58 58 58 20 43 68 65 63 6b 6d 65 3a 20 6e 6f 74 XXX Checkme: not
10b0: 20 73 75 72 65 20 69 66 20 74 68 69 73 20 77 69 sure if this wi
10c0: 6c 6c 20 73 74 69 6c 6c 20 66 61 69 6c 20 69 6e ll still fail in
10d0: 20 74 68 65 20 63 61 73 65 20 77 68 65 72 65 20 the case where
10e0: 61 20 64 69 72 65 63 74 6f 72 79 20 64 6f 65 73 a directory does
10f0: 20 63 6f 6e 66 6c 69 63 74 20 77 69 74 68 20 61 conflict with a
1100: 20 66 69 6c 65 20 58 58 58 0a 09 09 69 66 20 7b file XXX...if {
1110: 0a 09 09 20 20 20 20 5b 66 69 6c 65 65 78 69 73 ... [fileexis
1120: 74 73 5f 63 73 20 24 62 61 73 65 2f 24 75 73 72 ts_cs $base/$usr
1130: 5d 20 26 26 0a 09 09 20 20 20 20 5b 66 69 6c 65 ] &&... [file
1140: 69 73 64 69 72 5f 63 73 20 20 24 62 61 73 65 2f isdir_cs $base/
1150: 24 75 73 72 5d 0a 09 09 7d 20 7b 0a 09 09 20 20 $usr]...} {...
1160: 20 20 74 72 6f 75 62 6c 65 20 66 61 74 61 6c 20 trouble fatal
1170: 22 44 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 20 "Directory name
1180: 63 6f 6e 66 6c 69 63 74 73 20 77 69 74 68 20 66 conflicts with f
1190: 69 6c 65 6e 61 6d 65 2e 22 0a 09 09 20 20 20 20 ilename."...
11a0: 74 72 6f 75 62 6c 65 20 66 61 74 61 6c 20 22 50 trouble fatal "P
11b0: 6c 65 61 73 65 20 72 65 6d 6f 76 65 20 6f 72 20 lease remove or
11c0: 72 65 6e 61 6d 65 20 6f 6e 65 20 6f 66 20 74 68 rename one of th
11d0: 65 20 66 6f 6c 6c 6f 77 69 6e 67 3a 22 0a 09 09 e following:"...
11e0: 20 20 20 20 74 72 6f 75 62 6c 65 20 66 61 74 61 trouble fata
11f0: 6c 20 22 20 20 20 20 24 62 61 73 65 2f 24 75 73 l " $base/$us
1200: 72 22 0a 09 09 20 20 20 20 74 72 6f 75 62 6c 65 r"... trouble
1210: 20 66 61 74 61 6c 20 22 20 20 20 20 24 62 61 73 fatal " $bas
1220: 65 2f 24 72 63 73 22 0a 09 09 20 20 20 20 63 6f e/$rcs"... co
1230: 6e 74 69 6e 75 65 0a 09 09 7d 0a 0a 09 09 6c 6f ntinue...}....lo
1240: 67 20 77 72 69 74 65 20 34 20 63 6f 6c 6c 61 72 g write 4 collar
1250: 20 22 46 6f 75 6e 64 20 20 20 24 72 63 73 22 0a "Found $rcs".
1260: 09 09 24 70 72 6f 6a 65 63 74 20 61 64 64 66 69 ..$project addfi
1270: 6c 65 20 24 72 63 73 20 24 75 73 72 20 5b 66 69 le $rcs $usr [fi
1280: 6c 65 20 65 78 65 63 75 74 61 62 6c 65 20 24 72 le executable $r
1290: 63 73 5d 0a 0a 09 09 69 6e 63 72 20 6e 0a 09 09 cs]....incr n...
12a0: 69 66 20 7b 5b 6c 6f 67 20 76 65 72 62 6f 73 69 if {[log verbosi
12b0: 74 79 3f 5d 20 3c 20 34 7d 20 7b 0a 09 09 20 20 ty?] < 4} {...
12c0: 20 20 6c 6f 67 20 70 72 6f 67 72 65 73 73 20 30 log progress 0
12d0: 20 63 6f 6c 6c 61 72 20 24 6e 20 7b 7d 0a 09 09 collar $n {}...
12e0: 7d 0a 09 20 20 20 20 7d 0a 0a 09 20 20 20 20 24 }.. }... $
12f0: 74 72 61 76 65 72 73 65 20 64 65 73 74 72 6f 79 traverse destroy
1300: 0a 09 7d 0a 0a 09 72 65 70 6f 73 69 74 6f 72 79 ..}...repository
1310: 20 70 72 69 6e 74 73 74 61 74 69 73 74 69 63 73 printstatistics
1320: 0a 09 72 65 70 6f 73 69 74 6f 72 79 20 70 65 72 ..repository per
1330: 73 69 73 74 0a 0a 09 6c 6f 67 20 77 72 69 74 65 sist...log write
1340: 20 31 20 63 6f 6c 6c 61 72 20 22 53 63 61 6e 20 1 collar "Scan
1350: 63 6f 6d 70 6c 65 74 65 64 22 0a 09 72 65 74 75 completed"..retu
1360: 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 74 79 rn. }.. ty
1370: 70 65 6d 65 74 68 6f 64 20 64 69 73 63 61 72 64 pemethod discard
1380: 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d 61 {} {..# Pass ma
1390: 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 65 2e nager interface.
13a0: 20 45 78 65 63 75 74 65 64 20 66 6f 72 20 61 6c Executed for al
13b0: 6c 20 70 61 73 73 65 73 20 61 66 74 65 72 20 74 l passes after t
13c0: 68 65 0a 09 23 20 72 75 6e 20 70 61 73 73 65 73 he..# run passes
13d0: 2c 20 74 6f 20 72 65 6d 6f 76 65 20 61 6c 6c 20 , to remove all
13e0: 64 61 74 61 20 6f 66 20 74 68 69 73 20 70 61 73 data of this pas
13f0: 73 20 66 72 6f 6d 20 74 68 65 20 73 74 61 74 65 s from the state
1400: 2c 0a 09 23 20 61 73 20 62 65 69 6e 67 20 6f 75 ,..# as being ou
1410: 74 20 6f 66 20 64 61 74 65 2e 0a 0a 09 73 74 61 t of date....sta
1420: 74 65 20 64 69 73 63 61 72 64 20 70 72 6f 6a 65 te discard proje
1430: 63 74 0a 09 73 74 61 74 65 20 64 69 73 63 61 72 ct..state discar
1440: 64 20 66 69 6c 65 0a 09 72 65 74 75 72 6e 0a 20 d file..return.
1450: 20 20 20 7d 0a 0a 20 20 20 20 74 79 70 65 6d 65 }.. typeme
1460: 74 68 6f 64 20 69 67 6e 6f 72 65 5f 63 6f 6e 66 thod ignore_conf
1470: 6c 69 63 74 69 6e 67 5f 61 74 74 69 63 73 20 7b licting_attics {
1480: 7d 20 7b 0a 09 73 65 74 20 6d 79 69 67 6e 6f 72 } {..set myignor
1490: 65 20 31 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 e 1..return.
14a0: 7d 0a 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 }.. # # ## ##
14b0: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 # ##### ########
14c0: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20 #############.
14d0: 20 20 20 23 23 20 49 6e 74 65 72 6e 61 6c 20 6d ## Internal m
14e0: 65 74 68 6f 64 73 0a 0a 20 20 20 20 74 79 70 65 ethods.. type
14f0: 76 61 72 69 61 62 6c 65 20 6d 79 69 67 6e 6f 72 variable myignor
1500: 65 20 30 0a 0a 20 20 20 20 70 72 6f 63 20 46 69 e 0.. proc Fi
1510: 6c 74 65 72 41 74 74 69 63 53 75 62 64 69 72 20 lterAtticSubdir
1520: 7b 62 61 73 65 20 70 61 74 68 7d 20 7b 0a 09 23 {base path} {..#
1530: 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 This command is
1540: 20 75 73 65 64 20 62 79 20 74 68 65 20 74 72 61 used by the tra
1550: 76 65 72 73 65 72 20 74 6f 20 70 72 65 76 65 6e verser to preven
1560: 74 20 69 74 20 66 72 6f 6d 0a 09 23 20 73 63 61 t it from..# sca
1570: 6e 6e 69 6e 67 20 69 6e 74 6f 20 73 75 62 64 69 nning into subdi
1580: 72 65 63 74 6f 72 69 65 73 20 6f 66 20 61 6e 20 rectories of an
1590: 41 74 74 69 63 2e 20 57 65 20 67 65 74 20 61 77 Attic. We get aw
15a0: 61 79 20 77 69 74 68 0a 09 23 20 63 68 65 63 6b ay with..# check
15b0: 69 6e 67 20 74 68 65 20 69 6d 6d 65 64 69 61 74 ing the immediat
15c0: 65 20 70 61 72 65 6e 74 20 64 69 72 65 63 74 6f e parent directo
15d0: 72 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e ry of the curren
15e0: 74 20 70 61 74 68 0a 09 23 20 61 73 20 6f 75 72 t path..# as our
15f0: 20 72 65 6a 65 63 74 69 6f 6e 20 6d 65 61 6e 73 rejection means
1600: 20 74 68 61 74 20 64 65 65 70 65 72 20 70 61 74 that deeper pat
1610: 68 20 64 6f 20 6e 6f 74 20 6f 63 63 75 72 2e 0a h do not occur..
1620: 0a 09 69 66 20 7b 5b 66 69 6c 65 20 74 61 69 6c ..if {[file tail
1630: 20 5b 66 69 6c 65 20 64 69 72 6e 61 6d 65 20 24 [file dirname $
1640: 70 61 74 68 5d 5d 20 65 71 20 22 41 74 74 69 63 path]] eq "Attic
1650: 22 7d 20 7b 0a 09 20 20 20 20 73 65 74 20 61 64 "} {.. set ad
1660: 20 5b 66 69 6c 65 75 74 69 6c 3a 3a 73 74 72 69 [fileutil::stri
1670: 70 50 61 74 68 20 24 62 61 73 65 20 24 70 61 74 pPath $base $pat
1680: 68 5d 0a 09 20 20 20 20 6c 6f 67 20 77 72 69 74 h].. log writ
1690: 65 20 31 20 63 6f 6c 6c 61 72 20 22 44 69 72 65 e 1 collar "Dire
16a0: 63 74 6f 72 79 20 24 61 64 20 66 6f 75 6e 64 20 ctory $ad found
16b0: 69 6e 20 41 74 74 69 63 2c 20 69 67 6e 6f 72 69 in Attic, ignori
16c0: 6e 67 2e 22 0a 09 20 20 20 20 72 65 74 75 72 6e ng.".. return
16d0: 20 30 0a 09 7d 0a 09 72 65 74 75 72 6e 20 31 0a 0..}..return 1.
16e0: 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 }.. proc
16f0: 49 73 52 43 53 41 72 63 68 69 76 65 20 7b 70 61 IsRCSArchive {pa
1700: 74 68 7d 20 7b 0a 09 69 66 20 7b 21 5b 73 74 72 th} {..if {![str
1710: 69 6e 67 20 6d 61 74 63 68 20 2a 2c 76 20 24 70 ing match *,v $p
1720: 61 74 68 5d 7d 20 20 20 20 20 7b 72 65 74 75 72 ath]} {retur
1730: 6e 20 30 7d 0a 09 69 66 20 7b 5b 66 69 6c 65 75 n 0}..if {[fileu
1740: 74 69 6c 3a 3a 74 65 73 74 20 24 70 61 74 68 20 til::test $path
1750: 66 72 20 6d 73 67 5d 7d 20 7b 72 65 74 75 72 6e fr msg]} {return
1760: 20 31 7d 0a 09 74 72 6f 75 62 6c 65 20 77 61 72 1}..trouble war
1770: 6e 20 24 6d 73 67 0a 09 72 65 74 75 72 6e 20 30 n $msg..return 0
1780: 0a 20 20 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 . }.. proc
1790: 20 49 73 43 56 53 41 64 6d 69 6e 20 7b 72 63 73 IsCVSAdmin {rcs
17a0: 7d 20 7b 0a 09 69 66 20 7b 21 5b 73 74 72 69 6e } {..if {![strin
17b0: 67 20 6d 61 74 63 68 20 43 56 53 52 4f 4f 54 2f g match CVSROOT/
17c0: 2a 20 24 72 63 73 5d 7d 20 7b 72 65 74 75 72 6e * $rcs]} {return
17d0: 20 30 7d 0a 09 6c 6f 67 20 77 72 69 74 65 20 34 0}..log write 4
17e0: 20 63 6f 6c 6c 61 72 20 22 49 67 6e 6f 72 65 64 collar "Ignored
17f0: 20 24 72 63 73 2c 20 61 64 6d 69 6e 69 73 74 72 $rcs, administr
1800: 61 74 69 76 65 20 61 72 63 68 69 76 65 22 0a 09 ative archive"..
1810: 72 65 74 75 72 6e 20 31 0a 20 20 20 20 7d 0a 0a return 1. }..
1820: 20 20 20 20 70 72 6f 63 20 55 73 65 72 50 61 74 proc UserPat
1830: 68 20 7b 72 63 73 20 69 61 76 7d 20 7b 0a 09 75 h {rcs iav} {..u
1840: 70 76 61 72 20 31 20 24 69 61 76 20 69 73 61 74 pvar 1 $iav isat
1850: 74 69 63 0a 0a 09 23 20 44 65 72 69 76 65 20 74 tic...# Derive t
1860: 68 65 20 75 73 65 72 2d 76 69 73 69 62 6c 65 20 he user-visible
1870: 70 61 74 68 20 66 72 6f 6d 20 74 68 65 20 72 63 path from the rc
1880: 73 20 70 61 74 68 2e 20 4d 65 61 6e 69 6e 67 3a s path. Meaning:
1890: 0a 09 23 20 43 68 6f 70 20 6f 66 66 20 74 68 65 ..# Chop off the
18a0: 20 22 2c 76 22 20 73 75 66 66 69 78 2c 20 61 6e ",v" suffix, an
18b0: 64 20 72 65 6d 6f 76 65 20 61 20 70 6f 73 73 69 d remove a possi
18c0: 62 6c 65 20 22 41 74 74 69 63 22 2e 0a 0a 09 73 ble "Attic"....s
18d0: 65 74 20 66 20 5b 73 74 72 69 6e 67 20 72 61 6e et f [string ran
18e0: 67 65 20 24 72 63 73 20 30 20 65 6e 64 2d 32 5d ge $rcs 0 end-2]
18f0: 0a 0a 09 69 66 20 7b 22 41 74 74 69 63 22 20 65 ...if {"Attic" e
1900: 71 20 5b 6c 69 6e 64 65 78 20 5b 66 69 6c 65 20 q [lindex [file
1910: 73 70 6c 69 74 20 24 72 63 73 5d 20 65 6e 64 2d split $rcs] end-
1920: 31 5d 7d 20 7b 0a 0a 09 20 20 20 20 23 20 54 68 1]} {... # Th
1930: 65 20 63 6f 6e 73 74 72 75 63 74 69 6f 6e 20 62 e construction b
1940: 65 6c 6f 77 20 65 6e 73 75 72 65 73 20 74 68 61 elow ensures tha
1950: 74 20 41 74 74 69 63 2f 58 20 6d 61 70 73 20 74 t Attic/X maps t
1960: 6f 20 58 0a 09 20 20 20 20 23 20 69 6e 73 74 65 o X.. # inste
1970: 61 64 20 6f 66 20 2e 2f 58 2e 20 4f 74 68 65 72 ad of ./X. Other
1980: 77 69 73 65 2c 20 59 2f 41 74 74 69 63 2f 58 20 wise, Y/Attic/X
1990: 6d 61 70 73 20 74 6f 20 59 2f 58 2e 0a 0a 09 20 maps to Y/X....
19a0: 20 20 20 73 65 74 20 66 78 20 5b 66 69 6c 65 20 set fx [file
19b0: 64 69 72 6e 61 6d 65 20 5b 66 69 6c 65 20 64 69 dirname [file di
19c0: 72 6e 61 6d 65 20 24 66 5d 5d 0a 09 20 20 20 20 rname $f]]..
19d0: 73 65 74 20 66 20 20 5b 66 69 6c 65 20 74 61 69 set f [file tai
19e0: 6c 20 24 66 5d 0a 09 20 20 20 20 69 66 20 7b 24 l $f].. if {$
19f0: 66 78 20 6e 65 20 22 2e 22 7d 20 7b 20 73 65 74 fx ne "."} { set
1a00: 20 66 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 66 f [file join $f
1a10: 78 20 24 66 5d 20 7d 0a 0a 09 20 20 20 20 73 65 x $f] }... se
1a20: 74 20 69 73 61 74 74 69 63 20 31 0a 09 7d 20 65 t isattic 1..} e
1a30: 6c 73 65 20 7b 0a 09 20 20 20 20 73 65 74 20 69 lse {.. set i
1a40: 73 61 74 74 69 63 20 30 0a 09 7d 0a 0a 09 72 65 sattic 0..}...re
1a50: 74 75 72 6e 20 24 66 0a 20 20 20 20 7d 0a 0a 20 turn $f. }..
1a60: 20 20 20 70 72 6f 63 20 49 73 53 75 70 65 72 63 proc IsSuperc
1a70: 65 64 65 64 20 7b 62 61 73 65 20 72 63 73 20 75 eded {base rcs u
1a80: 73 72 20 69 73 61 74 74 69 63 7d 20 7b 0a 09 3a sr isattic} {..:
1a90: 3a 76 61 72 69 61 62 6c 65 20 6d 79 69 67 6e 6f :variable myigno
1aa0: 72 65 0a 0a 09 69 66 20 7b 21 24 69 73 61 74 74 re...if {!$isatt
1ab0: 69 63 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 ic}
1ac0: 20 20 20 20 20 20 20 20 7b 72 65 74 75 72 6e 20 {return
1ad0: 30 7d 0a 09 69 66 20 7b 21 5b 66 69 6c 65 65 78 0}..if {![fileex
1ae0: 69 73 74 73 5f 63 73 20 24 62 61 73 65 2f 24 75 ists_cs $base/$u
1af0: 73 72 2c 76 5d 7d 20 7b 72 65 74 75 72 6e 20 30 sr,v]} {return 0
1b00: 7d 0a 0a 09 23 20 57 65 20 68 61 76 65 20 61 20 }...# We have a
1b10: 72 65 67 75 6c 61 72 20 61 72 63 68 69 76 65 20 regular archive
1b20: 61 6e 64 20 61 6e 20 41 74 74 69 63 20 61 72 63 and an Attic arc
1b30: 68 69 76 65 20 72 65 66 65 72 69 6e 67 20 74 6f hive refering to
1b40: 0a 09 23 20 74 68 65 20 73 61 6d 65 20 75 73 65 ..# the same use
1b50: 72 20 76 69 73 69 62 6c 65 20 66 69 6c 65 2e 20 r visible file.
1b60: 49 67 6e 6f 72 65 20 74 68 65 20 66 69 6c 65 20 Ignore the file
1b70: 69 6e 20 74 68 65 20 41 74 74 69 63 2e 0a 09 23 in the Attic...#
1b80: 0a 09 23 20 42 79 20 64 65 66 61 75 6c 74 20 74 ..# By default t
1b90: 68 69 73 20 69 73 20 61 20 70 72 6f 62 6c 65 6d his is a problem
1ba0: 20 63 61 75 73 69 6e 67 20 61 6e 20 61 62 6f 72 causing an abor
1bb0: 74 20 61 66 74 65 72 20 74 68 65 20 70 61 73 73 t after the pass
1bc0: 0a 09 23 20 68 61 73 20 63 6f 6d 70 6c 65 74 65 ..# has complete
1bd0: 64 2e 20 54 68 65 20 75 73 65 72 20 63 61 6e 20 d. The user can
1be0: 68 6f 77 65 76 65 72 20 66 6f 72 63 65 20 75 73 however force us
1bf0: 20 74 6f 20 69 67 6e 6f 72 65 20 69 74 2e 0a 09 to ignore it...
1c00: 23 20 49 6e 20 74 68 61 74 20 63 61 73 65 20 74 # In that case t
1c10: 68 65 20 77 61 72 6e 69 6e 67 20 69 73 20 73 74 he warning is st
1c20: 69 6c 6c 20 70 72 69 6e 74 65 64 2c 20 62 75 74 ill printed, but
1c30: 20 77 69 6c 6c 20 6e 6f 74 0a 09 23 20 69 6e 64 will not..# ind
1c40: 75 63 65 20 61 6e 20 61 62 6f 72 74 20 61 6e 79 uce an abort any
1c50: 20 6c 6f 6e 67 65 72 2e 0a 0a 09 69 66 20 7b 24 longer....if {$
1c60: 6d 79 69 67 6e 6f 72 65 7d 20 7b 0a 09 20 20 20 myignore} {..
1c70: 20 6c 6f 67 20 77 72 69 74 65 20 32 20 63 6f 6c log write 2 col
1c80: 6c 61 72 20 22 49 67 6e 6f 72 65 64 20 24 72 63 lar "Ignored $rc
1c90: 73 2c 20 73 75 70 65 72 63 65 64 65 64 20 61 72 s, superceded ar
1ca0: 63 68 69 76 65 22 0a 09 7d 20 65 6c 73 65 20 7b chive"..} else {
1cb0: 0a 09 20 20 20 20 74 72 6f 75 62 6c 65 20 77 61 .. trouble wa
1cc0: 72 6e 20 20 20 20 20 20 20 22 49 67 6e 6f 72 65 rn "Ignore
1cd0: 64 20 24 72 63 73 2c 20 73 75 70 65 72 63 65 64 d $rcs, superced
1ce0: 65 64 20 61 72 63 68 69 76 65 22 0a 09 7d 0a 09 ed archive"..}..
1cf0: 72 65 74 75 72 6e 20 31 0a 20 20 20 20 7d 0a 0a return 1. }..
1d00: 20 20 20 20 23 20 23 20 23 23 20 23 23 23 20 23 # # ## ### #
1d10: 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 #### ######## ##
1d20: 23 23 23 23 23 23 23 23 23 23 23 0a 20 20 20 20 ###########.
1d30: 23 23 20 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e ## Configuration
1d40: 0a 0a 20 20 20 20 70 72 61 67 6d 61 20 2d 68 61 .. pragma -ha
1d50: 73 69 6e 73 74 61 6e 63 65 73 20 20 20 6e 6f 20 sinstances no
1d60: 3b 20 23 20 73 69 6e 67 6c 65 74 6f 6e 0a 20 20 ; # singleton.
1d70: 20 20 70 72 61 67 6d 61 20 2d 68 61 73 74 79 70 pragma -hastyp
1d80: 65 69 6e 66 6f 20 20 20 20 6e 6f 20 3b 20 23 20 einfo no ; #
1d90: 6e 6f 20 69 6e 74 72 6f 73 70 65 63 74 69 6f 6e no introspection
1da0: 0a 20 20 20 20 70 72 61 67 6d 61 20 2d 68 61 73 . pragma -has
1db0: 74 79 70 65 64 65 73 74 72 6f 79 20 6e 6f 20 3b typedestroy no ;
1dc0: 20 23 20 69 6d 6d 6f 72 74 61 6c 0a 0a 20 20 20 # immortal..
1dd0: 20 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 # # ## ### ####
1de0: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 # ######## #####
1df0: 23 23 23 23 23 23 23 23 0a 7d 0a 0a 6e 61 6d 65 ########.}..name
1e00: 73 70 61 63 65 20 65 76 61 6c 20 3a 3a 76 63 3a space eval ::vc:
1e10: 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a :fossil::import:
1e20: 3a 63 76 73 3a 3a 70 61 73 73 20 7b 0a 20 20 20 :cvs::pass {.
1e30: 20 6e 61 6d 65 73 70 61 63 65 20 65 78 70 6f 72 namespace expor
1e40: 74 20 63 6f 6c 6c 61 72 0a 20 20 20 20 6e 61 6d t collar. nam
1e50: 65 73 70 61 63 65 20 65 76 61 6c 20 63 6f 6c 6c espace eval coll
1e60: 61 72 20 7b 0a 09 6e 61 6d 65 73 70 61 63 65 20 ar {..namespace
1e70: 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 import ::vc::fos
1e80: 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 sil::import::cvs
1e90: 3a 3a 72 65 70 6f 73 69 74 6f 72 79 0a 09 6e 61 ::repository..na
1ea0: 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74 20 3a mespace import :
1eb0: 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 :vc::fossil::imp
1ec0: 6f 72 74 3a 3a 63 76 73 3a 3a 73 74 61 74 65 0a ort::cvs::state.
1ed0: 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 .namespace impor
1ee0: 74 20 3a 3a 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 74 t ::vc::tools::t
1ef0: 72 6f 75 62 6c 65 0a 09 6e 61 6d 65 73 70 61 63 rouble..namespac
1f00: 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 74 e import ::vc::t
1f10: 6f 6f 6c 73 3a 3a 6c 6f 67 0a 09 6e 61 6d 65 73 ools::log..names
1f20: 70 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 pace import ::vc
1f30: 3a 3a 74 6f 6f 6c 73 3a 3a 6d 69 73 63 3a 3a 66 ::tools::misc::f
1f40: 69 6c 65 2a 0a 09 6c 6f 67 20 72 65 67 69 73 74 ile*..log regist
1f50: 65 72 20 63 6f 6c 6c 61 72 0a 20 20 20 20 7d 0a er collar. }.
1f60: 7d 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 }..# # ## ### ##
1f70: 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 ### ######## ###
1f80: 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23 ########## #####
1f90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1fa0: 0a 23 23 20 52 65 61 64 79 0a 0a 70 61 63 6b 61 .## Ready..packa
1fb0: 67 65 20 70 72 6f 76 69 64 65 20 76 63 3a 3a 66 ge provide vc::f
1fc0: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c
1fd0: 76 73 3a 3a 70 61 73 73 3a 3a 63 6f 6c 6c 61 72 vs::pass::collar
1fe0: 20 31 2e 30 0a 72 65 74 75 72 6e 0a 1.0.return.