Artifact a368b702c329d622929f35b637cacd10af57f4a1:
File
tools/cvs2fossil/lib/c2f_pcollar.tcl
part of check-in
[b679ca3356]
- Code cleanup. Removed trailing whitespace across the board.
by
aku on
2007-11-25 07:54:09.
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 0a 0a 73 6e 69 74 3a 3a 74 79 70 65 20 3a 3a #..snit::type ::
0700: 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f vc::fossil::impo
0710: 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a 3a 63 rt::cvs::pass::c
0720: 6f 6c 6c 61 72 20 7b 0a 20 20 20 20 23 20 23 20 ollar {. # #
0730: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 ## ### ##### ###
0740: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ##########
0750: 23 23 23 0a 20 20 20 20 23 23 20 50 75 62 6c 69 ###. ## Publi
0760: 63 20 41 50 49 0a 0a 20 20 20 20 74 79 70 65 6d c API.. typem
0770: 65 74 68 6f 64 20 73 65 74 75 70 20 7b 7d 20 7b ethod setup {} {
0780: 0a 09 23 20 44 65 66 69 6e 65 20 6e 61 6d 65 73 ..# Define names
0790: 20 61 6e 64 20 73 74 72 75 63 74 75 72 65 20 6f and structure o
07a0: 66 20 74 68 65 20 70 65 72 73 69 73 74 65 6e 74 f the persistent
07b0: 20 73 74 61 74 65 20 6f 66 20 74 68 69 73 0a 09 state of this..
07c0: 23 20 70 61 73 73 2e 0a 0a 09 23 20 57 65 20 64 # pass....# We d
07d0: 65 61 6c 20 77 69 74 68 20 72 65 70 6f 73 69 74 eal with reposit
07e0: 6f 72 79 20 70 72 6f 6a 65 63 74 73 2c 20 61 6e ory projects, an
07f0: 64 20 74 68 65 20 72 63 73 20 61 72 63 68 69 76 d the rcs archiv
0800: 65 20 66 69 6c 65 73 0a 09 23 20 69 6e 20 74 68 e files..# in th
0810: 65 20 70 72 6f 6a 65 63 74 73 2e 0a 0a 09 23 20 e projects....#
0820: 46 6f 72 20 74 68 65 20 66 69 72 73 74 2c 20 70 For the first, p
0830: 72 6f 6a 65 63 74 73 2c 20 77 65 20 6b 65 65 70 rojects, we keep
0840: 20 74 68 65 69 72 20 6e 61 6d 65 73 2c 20 77 68 their names, wh
0850: 69 63 68 20 61 72 65 0a 09 23 20 74 68 65 69 72 ich are..# their
0860: 20 70 61 74 68 73 20 72 65 6c 61 74 69 76 65 20 paths relative
0870: 74 6f 20 74 68 65 20 62 61 73 65 20 64 69 72 65 to the base dire
0880: 63 74 6f 72 79 20 6f 66 20 74 68 65 20 77 68 6f ctory of the who
0890: 6c 65 0a 09 23 20 72 65 70 6f 73 69 74 6f 72 79 le..# repository
08a0: 2e 20 54 68 65 73 65 20 68 61 76 65 20 74 6f 20 . These have to
08b0: 62 65 20 67 6c 6f 62 61 6c 6c 79 20 75 6e 69 71 be globally uniq
08c0: 75 65 2c 20 69 2e 65 2e 20 6e 6f 20 74 77 6f 0a ue, i.e. no two.
08d0: 09 23 20 70 72 6f 6a 65 63 74 73 20 63 61 6e 20 .# projects can
08e0: 68 61 76 65 20 74 68 65 20 73 61 6d 65 20 6e 61 have the same na
08f0: 6d 65 2e 0a 0a 09 23 20 46 6f 72 20 74 68 65 20 me....# For the
0900: 66 69 6c 65 73 20 77 65 20 6b 65 65 70 20 74 68 files we keep th
0910: 65 69 72 20 6e 61 6d 65 73 2c 20 77 68 69 63 68 eir names, which
0920: 20 61 72 65 20 74 68 65 69 72 20 70 61 74 68 73 are their paths
0930: 0a 09 23 20 72 65 6c 61 74 69 76 65 20 74 6f 20 ..# relative to
0940: 74 68 65 20 62 61 73 65 20 64 69 72 65 63 74 6f the base directo
0950: 72 79 20 6f 66 20 74 68 65 20 77 68 6f 6c 65 20 ry of the whole
0960: 70 72 6f 6a 65 63 74 21 20 54 68 65 73 65 0a 09 project! These..
0970: 23 20 68 61 76 65 20 74 6f 20 62 65 20 75 6e 69 # have to be uni
0980: 71 75 65 20 77 69 74 68 69 6e 20 61 20 70 72 6f que within a pro
0990: 6a 65 63 74 2c 20 68 6f 77 65 76 65 72 20 67 6c ject, however gl
09a0: 6f 62 61 6c 6c 79 20 74 68 69 73 0a 09 23 20 64 obally this..# d
09b0: 6f 65 73 20 6e 6f 74 20 68 6f 6c 64 2c 20 61 20 oes not hold, a
09c0: 6e 61 6d 65 20 6d 61 79 20 6f 63 63 75 72 20 73 name may occur s
09d0: 65 76 65 72 61 6c 20 74 69 6d 65 73 2c 20 69 6e everal times, in
09e0: 20 64 69 66 66 65 72 65 6e 74 0a 09 23 20 70 72 different..# pr
09f0: 6f 6a 65 63 74 73 2e 20 57 65 20 66 75 72 74 68 ojects. We furth
0a00: 65 72 20 73 74 6f 72 65 20 74 68 65 20 75 73 65 er store the use
0a10: 72 20 76 69 73 69 62 6c 65 20 66 69 6c 65 20 6e r visible file n
0a20: 61 6d 65 0a 09 23 20 61 73 73 6f 63 69 61 74 65 ame..# associate
0a30: 64 20 77 69 74 68 20 74 68 65 20 72 63 73 20 61 d with the rcs a
0a40: 72 63 68 69 76 65 2e 0a 0a 09 23 20 42 6f 74 68 rchive....# Both
0a50: 20 70 72 6f 6a 65 63 74 73 20 61 6e 64 20 66 69 projects and fi
0a60: 6c 65 73 20 61 72 65 20 69 64 65 6e 74 69 66 69 les are identifi
0a70: 65 64 20 62 79 20 67 6c 6f 62 61 6c 6c 79 20 75 ed by globally u
0a80: 6e 69 71 75 65 0a 09 23 20 69 6e 74 65 67 65 72 nique..# integer
0a90: 20 69 64 73 2c 20 61 75 74 6f 6d 61 74 69 63 61 ids, automatica
0aa0: 6c 6c 79 20 61 73 73 69 67 6e 65 64 20 62 79 20 lly assigned by
0ab0: 74 68 65 20 64 61 74 61 62 61 73 65 2e 0a 0a 09 the database....
0ac0: 73 74 61 74 65 20 77 72 69 74 69 6e 67 20 70 72 state writing pr
0ad0: 6f 6a 65 63 74 20 7b 0a 09 20 20 20 20 70 69 64 oject {.. pid
0ae0: 20 20 49 4e 54 45 47 45 52 20 20 4e 4f 54 20 4e INTEGER NOT N
0af0: 55 4c 4c 20 20 50 52 49 4d 41 52 59 20 4b 45 59 ULL PRIMARY KEY
0b00: 20 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 2c 0a AUTOINCREMENT,.
0b10: 09 20 20 20 20 6e 61 6d 65 20 54 45 58 54 20 20 . name TEXT
0b20: 20 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 55 4e 49 NOT NULL UNI
0b30: 51 55 45 0a 09 7d 0a 09 73 74 61 74 65 20 77 72 QUE..}..state wr
0b40: 69 74 69 6e 67 20 66 69 6c 65 20 7b 0a 09 20 20 iting file {..
0b50: 20 20 66 69 64 20 20 20 20 20 49 4e 54 45 47 45 fid INTEGE
0b60: 52 20 20 4e 4f 54 20 4e 55 4c 4c 20 20 50 52 49 R NOT NULL PRI
0b70: 4d 41 52 59 20 4b 45 59 20 41 55 54 4f 49 4e 43 MARY KEY AUTOINC
0b80: 52 45 4d 45 4e 54 2c 0a 09 20 20 20 20 70 69 64 REMENT,.. pid
0b90: 20 20 20 20 20 49 4e 54 45 47 45 52 20 20 4e 4f INTEGER NO
0ba0: 54 20 4e 55 4c 4c 20 20 52 45 46 45 52 45 4e 43 T NULL REFERENC
0bb0: 45 53 20 70 72 6f 6a 65 63 74 2c 20 20 20 20 20 ES project,
0bc0: 20 20 2d 2d 20 70 72 6f 6a 65 63 74 20 74 68 65 -- project the
0bd0: 20 66 69 6c 65 20 62 65 6c 6f 6e 67 73 20 74 6f file belongs to
0be0: 0a 09 20 20 20 20 6e 61 6d 65 20 20 20 20 54 45 .. name TE
0bf0: 58 54 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c 2c XT NOT NULL,
0c00: 0a 09 20 20 20 20 76 69 73 69 62 6c 65 20 54 45 .. visible TE
0c10: 58 54 20 20 20 20 20 4e 4f 54 20 4e 55 4c 4c 2c XT NOT NULL,
0c20: 0a 09 20 20 20 20 65 78 65 63 20 20 20 20 49 4e .. exec IN
0c30: 54 45 47 45 52 20 20 4e 4f 54 20 4e 55 4c 4c 2c TEGER NOT NULL,
0c40: 20 2d 2d 20 62 6f 6f 6c 65 61 6e 2c 20 27 66 69 -- boolean, 'fi
0c50: 6c 65 20 65 78 65 63 75 74 61 62 6c 65 27 2e 0a le executable'..
0c60: 09 20 20 20 20 55 4e 49 51 55 45 20 28 70 69 64 . UNIQUE (pid
0c70: 2c 20 6e 61 6d 65 29 20 20 20 20 20 20 20 20 20 , name)
0c80: 2d 2d 20 66 69 6c 65 20 6e 61 6d 65 73 20 61 72 -- file names ar
0c90: 65 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 e unique within
0ca0: 61 20 70 72 6f 6a 65 63 74 0a 09 7d 0a 09 72 65 a project..}..re
0cb0: 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 20 turn. }..
0cc0: 74 79 70 65 6d 65 74 68 6f 64 20 6c 6f 61 64 20 typemethod load
0cd0: 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 6d 61 6e {} {..# Pass man
0ce0: 61 67 65 72 20 69 6e 74 65 72 66 61 63 65 2e 20 ager interface.
0cf0: 45 78 65 63 75 74 65 64 20 66 6f 72 20 61 6c 6c Executed for all
0d00: 20 70 61 73 73 65 73 20 62 65 66 6f 72 65 20 74 passes before t
0d10: 68 65 0a 09 23 20 72 75 6e 20 70 61 73 73 65 73 he..# run passes
0d20: 2c 20 74 6f 20 6c 6f 61 64 20 61 6c 6c 20 64 61 , to load all da
0d30: 74 61 20 6f 66 20 74 68 65 69 72 20 70 61 73 73 ta of their pass
0d40: 20 66 72 6f 6d 20 74 68 65 20 73 74 61 74 65 2c from the state,
0d50: 0a 09 23 20 61 73 20 69 66 20 69 74 20 68 61 64 ..# as if it had
0d60: 20 62 65 65 6e 20 63 6f 6d 70 75 74 65 64 20 62 been computed b
0d70: 79 20 74 68 65 20 70 61 73 73 20 69 74 73 65 6c y the pass itsel
0d80: 66 2e 0a 0a 09 73 74 61 74 65 20 72 65 61 64 69 f....state readi
0d90: 6e 67 20 70 72 6f 6a 65 63 74 0a 09 73 74 61 74 ng project..stat
0da0: 65 20 72 65 61 64 69 6e 67 20 66 69 6c 65 0a 0a e reading file..
0db0: 09 72 65 70 6f 73 69 74 6f 72 79 20 6c 6f 61 64 .repository load
0dc0: 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a ..return. }..
0dd0: 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 20 72 typemethod r
0de0: 75 6e 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 un {} {..# Pass
0df0: 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 manager interfac
0e00: 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f 20 70 e. Executed to p
0e10: 65 72 66 6f 72 6d 20 74 68 65 0a 09 23 20 66 75 erform the..# fu
0e20: 6e 63 74 69 6f 6e 61 6c 69 74 79 20 6f 66 20 74 nctionality of t
0e30: 68 65 20 70 61 73 73 2e 0a 0a 09 73 65 74 20 72 he pass....set r
0e40: 62 61 73 65 20 5b 72 65 70 6f 73 69 74 6f 72 79 base [repository
0e50: 20 62 61 73 65 3f 5d 0a 09 66 6f 72 65 61 63 68 base?]..foreach
0e60: 20 70 72 6f 6a 65 63 74 20 5b 72 65 70 6f 73 69 project [reposi
0e70: 74 6f 72 79 20 70 72 6f 6a 65 63 74 73 5d 20 7b tory projects] {
0e80: 0a 09 20 20 20 20 73 65 74 20 62 61 73 65 20 5b .. set base [
0e90: 66 69 6c 65 20 6a 6f 69 6e 20 24 72 62 61 73 65 file join $rbase
0ea0: 20 5b 24 70 72 6f 6a 65 63 74 20 62 61 73 65 5d [$project base]
0eb0: 5d 0a 09 20 20 20 20 6c 6f 67 20 77 72 69 74 65 ].. log write
0ec0: 20 31 20 63 6f 6c 6c 61 72 20 22 53 63 61 6e 20 1 collar "Scan
0ed0: 24 62 61 73 65 22 0a 0a 09 20 20 20 20 73 65 74 $base"... set
0ee0: 20 74 72 61 76 65 72 73 65 20 5b 66 69 6c 65 75 traverse [fileu
0ef0: 74 69 6c 3a 3a 74 72 61 76 65 72 73 65 20 25 41 til::traverse %A
0f00: 55 54 4f 25 20 24 62 61 73 65 20 5c 0a 09 09 09 UTO% $base \....
0f10: 20 20 20 20 20 20 2d 70 72 65 66 69 6c 74 65 72 -prefilter
0f20: 20 5b 6d 79 70 72 6f 63 20 46 69 6c 74 65 72 41 [myproc FilterA
0f30: 74 74 69 63 53 75 62 64 69 72 20 24 62 61 73 65 tticSubdir $base
0f40: 5d 5d 0a 09 20 20 20 20 73 65 74 20 6e 20 30 0a ]].. set n 0.
0f50: 09 20 20 20 20 73 65 74 20 72 20 7b 7d 0a 0a 09 . set r {}...
0f60: 20 20 20 20 24 74 72 61 76 65 72 73 65 20 66 6f $traverse fo
0f70: 72 65 61 63 68 20 70 61 74 68 20 7b 0a 09 09 73 reach path {...s
0f80: 65 74 20 72 63 73 20 5b 66 69 6c 65 75 74 69 6c et rcs [fileutil
0f90: 3a 3a 73 74 72 69 70 50 61 74 68 20 24 62 61 73 ::stripPath $bas
0fa0: 65 20 24 70 61 74 68 5d 0a 09 09 69 66 20 7b 5b e $path]...if {[
0fb0: 49 73 43 56 53 41 64 6d 69 6e 20 20 20 20 24 72 IsCVSAdmin $r
0fc0: 63 73 5d 7d 20 20 63 6f 6e 74 69 6e 75 65 0a 09 cs]} continue..
0fd0: 09 69 66 20 7b 21 5b 49 73 52 43 53 41 72 63 68 .if {![IsRCSArch
0fe0: 69 76 65 20 24 70 61 74 68 5d 7d 20 63 6f 6e 74 ive $path]} cont
0ff0: 69 6e 75 65 0a 0a 09 09 73 65 74 20 75 73 72 20 inue....set usr
1000: 5b 55 73 65 72 50 61 74 68 20 24 72 63 73 20 69 [UserPath $rcs i
1010: 73 61 74 74 69 63 5d 0a 09 09 69 66 20 7b 5b 49 sattic]...if {[I
1020: 73 53 75 70 65 72 63 65 64 65 64 20 24 62 61 73 sSuperceded $bas
1030: 65 20 24 72 63 73 20 24 75 73 72 20 24 69 73 61 e $rcs $usr $isa
1040: 74 74 69 63 5d 7d 20 63 6f 6e 74 69 6e 75 65 0a ttic]} continue.
1050: 0a 09 09 69 66 20 7b 0a 09 09 20 20 20 20 5b 66 ...if {... [f
1060: 69 6c 65 20 65 78 69 73 74 73 20 20 20 20 20 20 ile exists
1070: 24 62 61 73 65 2f 24 75 73 72 5d 20 26 26 0a 09 $base/$usr] &&..
1080: 09 20 20 20 20 5b 66 69 6c 65 20 69 73 64 69 72 . [file isdir
1090: 65 63 74 6f 72 79 20 24 62 61 73 65 2f 24 75 73 ectory $base/$us
10a0: 72 5d 0a 09 09 7d 20 7b 0a 09 09 20 20 20 20 74 r]...} {... t
10b0: 72 6f 75 62 6c 65 20 66 61 74 61 6c 20 22 44 69 rouble fatal "Di
10c0: 72 65 63 74 6f 72 79 20 6e 61 6d 65 20 63 6f 6e rectory name con
10d0: 66 6c 69 63 74 73 20 77 69 74 68 20 66 69 6c 65 flicts with file
10e0: 6e 61 6d 65 2e 22 0a 09 09 20 20 20 20 74 72 6f name."... tro
10f0: 75 62 6c 65 20 66 61 74 61 6c 20 22 50 6c 65 61 uble fatal "Plea
1100: 73 65 20 72 65 6d 6f 76 65 20 6f 72 20 72 65 6e se remove or ren
1110: 61 6d 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 ame one of the f
1120: 6f 6c 6c 6f 77 69 6e 67 3a 22 0a 09 09 20 20 20 ollowing:"...
1130: 20 74 72 6f 75 62 6c 65 20 66 61 74 61 6c 20 22 trouble fatal "
1140: 20 20 20 20 24 62 61 73 65 2f 24 75 73 72 22 0a $base/$usr".
1150: 09 09 20 20 20 20 74 72 6f 75 62 6c 65 20 66 61 .. trouble fa
1160: 74 61 6c 20 22 20 20 20 20 24 62 61 73 65 2f 24 tal " $base/$
1170: 72 63 73 22 0a 09 09 20 20 20 20 63 6f 6e 74 69 rcs"... conti
1180: 6e 75 65 0a 09 09 7d 0a 0a 09 09 6c 6f 67 20 77 nue...}....log w
1190: 72 69 74 65 20 34 20 63 6f 6c 6c 61 72 20 22 46 rite 4 collar "F
11a0: 6f 75 6e 64 20 20 20 24 72 63 73 22 0a 09 09 24 ound $rcs"...$
11b0: 70 72 6f 6a 65 63 74 20 61 64 64 66 69 6c 65 20 project addfile
11c0: 24 72 63 73 20 24 75 73 72 20 5b 66 69 6c 65 20 $rcs $usr [file
11d0: 65 78 65 63 75 74 61 62 6c 65 20 24 72 63 73 5d executable $rcs]
11e0: 0a 0a 09 09 69 6e 63 72 20 6e 0a 09 09 69 66 20 ....incr n...if
11f0: 7b 5b 6c 6f 67 20 76 65 72 62 6f 73 69 74 79 3f {[log verbosity?
1200: 5d 20 3c 20 34 7d 20 7b 0a 09 09 20 20 20 20 6c ] < 4} {... l
1210: 6f 67 20 70 72 6f 67 72 65 73 73 20 30 20 63 6f og progress 0 co
1220: 6c 6c 61 72 20 24 6e 20 7b 7d 0a 09 09 7d 0a 09 llar $n {}...}..
1230: 20 20 20 20 7d 0a 0a 09 20 20 20 20 24 74 72 61 }... $tra
1240: 76 65 72 73 65 20 64 65 73 74 72 6f 79 0a 09 7d verse destroy..}
1250: 0a 0a 09 72 65 70 6f 73 69 74 6f 72 79 20 70 72 ...repository pr
1260: 69 6e 74 73 74 61 74 69 73 74 69 63 73 0a 09 72 intstatistics..r
1270: 65 70 6f 73 69 74 6f 72 79 20 70 65 72 73 69 73 epository persis
1280: 74 0a 0a 09 6c 6f 67 20 77 72 69 74 65 20 31 20 t...log write 1
1290: 63 6f 6c 6c 61 72 20 22 53 63 61 6e 20 63 6f 6d collar "Scan com
12a0: 70 6c 65 74 65 64 22 0a 09 72 65 74 75 72 6e 0a pleted"..return.
12b0: 20 20 20 20 7d 0a 0a 20 20 20 20 74 79 70 65 6d }.. typem
12c0: 65 74 68 6f 64 20 64 69 73 63 61 72 64 20 7b 7d ethod discard {}
12d0: 20 7b 0a 09 23 20 50 61 73 73 20 6d 61 6e 61 67 {..# Pass manag
12e0: 65 72 20 69 6e 74 65 72 66 61 63 65 2e 20 45 78 er interface. Ex
12f0: 65 63 75 74 65 64 20 66 6f 72 20 61 6c 6c 20 70 ecuted for all p
1300: 61 73 73 65 73 20 61 66 74 65 72 20 74 68 65 0a asses after the.
1310: 09 23 20 72 75 6e 20 70 61 73 73 65 73 2c 20 74 .# run passes, t
1320: 6f 20 72 65 6d 6f 76 65 20 61 6c 6c 20 64 61 74 o remove all dat
1330: 61 20 6f 66 20 74 68 69 73 20 70 61 73 73 20 66 a of this pass f
1340: 72 6f 6d 20 74 68 65 20 73 74 61 74 65 2c 0a 09 rom the state,..
1350: 23 20 61 73 20 62 65 69 6e 67 20 6f 75 74 20 6f # as being out o
1360: 66 20 64 61 74 65 2e 0a 0a 09 73 74 61 74 65 20 f date....state
1370: 64 69 73 63 61 72 64 20 70 72 6f 6a 65 63 74 0a discard project.
1380: 09 73 74 61 74 65 20 64 69 73 63 61 72 64 20 66 .state discard f
1390: 69 6c 65 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 ile..return.
13a0: 7d 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f }.. typemetho
13b0: 64 20 69 67 6e 6f 72 65 5f 63 6f 6e 66 6c 69 63 d ignore_conflic
13c0: 74 69 6e 67 5f 61 74 74 69 63 73 20 7b 7d 20 7b ting_attics {} {
13d0: 0a 09 73 65 74 20 6d 79 69 67 6e 6f 72 65 20 31 ..set myignore 1
13e0: 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a ..return. }..
13f0: 20 20 20 20 23 20 23 20 23 23 20 23 23 23 20 23 # # ## ### #
1400: 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 #### ######## ##
1410: 23 23 23 23 23 23 23 23 23 23 23 0a 20 20 20 20 ###########.
1420: 23 23 20 49 6e 74 65 72 6e 61 6c 20 6d 65 74 68 ## Internal meth
1430: 6f 64 73 0a 0a 20 20 20 20 74 79 70 65 76 61 72 ods.. typevar
1440: 69 61 62 6c 65 20 6d 79 69 67 6e 6f 72 65 20 30 iable myignore 0
1450: 0a 0a 20 20 20 20 70 72 6f 63 20 46 69 6c 74 65 .. proc Filte
1460: 72 41 74 74 69 63 53 75 62 64 69 72 20 7b 62 61 rAtticSubdir {ba
1470: 73 65 20 70 61 74 68 7d 20 7b 0a 09 23 20 54 68 se path} {..# Th
1480: 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 75 73 is command is us
1490: 65 64 20 62 79 20 74 68 65 20 74 72 61 76 65 72 ed by the traver
14a0: 73 65 72 20 74 6f 20 70 72 65 76 65 6e 74 20 69 ser to prevent i
14b0: 74 20 66 72 6f 6d 0a 09 23 20 73 63 61 6e 6e 69 t from..# scanni
14c0: 6e 67 20 69 6e 74 6f 20 73 75 62 64 69 72 65 63 ng into subdirec
14d0: 74 6f 72 69 65 73 20 6f 66 20 61 6e 20 41 74 74 tories of an Att
14e0: 69 63 2e 20 57 65 20 67 65 74 20 61 77 61 79 20 ic. We get away
14f0: 77 69 74 68 0a 09 23 20 63 68 65 63 6b 69 6e 67 with..# checking
1500: 20 74 68 65 20 69 6d 6d 65 64 69 61 74 65 20 70 the immediate p
1510: 61 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 20 arent directory
1520: 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 of the current p
1530: 61 74 68 0a 09 23 20 61 73 20 6f 75 72 20 72 65 ath..# as our re
1540: 6a 65 63 74 69 6f 6e 20 6d 65 61 6e 73 20 74 68 jection means th
1550: 61 74 20 64 65 65 70 65 72 20 70 61 74 68 20 64 at deeper path d
1560: 6f 20 6e 6f 74 20 6f 63 63 75 72 2e 0a 0a 09 69 o not occur....i
1570: 66 20 7b 5b 66 69 6c 65 20 74 61 69 6c 20 5b 66 f {[file tail [f
1580: 69 6c 65 20 64 69 72 6e 61 6d 65 20 24 70 61 74 ile dirname $pat
1590: 68 5d 5d 20 65 71 20 22 41 74 74 69 63 22 7d 20 h]] eq "Attic"}
15a0: 7b 0a 09 20 20 20 20 73 65 74 20 61 64 20 5b 66 {.. set ad [f
15b0: 69 6c 65 75 74 69 6c 3a 3a 73 74 72 69 70 50 61 ileutil::stripPa
15c0: 74 68 20 24 62 61 73 65 20 24 70 61 74 68 5d 0a th $base $path].
15d0: 09 20 20 20 20 6c 6f 67 20 77 72 69 74 65 20 31 . log write 1
15e0: 20 63 6f 6c 6c 61 72 20 22 44 69 72 65 63 74 6f collar "Directo
15f0: 72 79 20 24 61 64 20 66 6f 75 6e 64 20 69 6e 20 ry $ad found in
1600: 41 74 74 69 63 2c 20 69 67 6e 6f 72 69 6e 67 2e Attic, ignoring.
1610: 22 0a 09 20 20 20 20 72 65 74 75 72 6e 20 30 0a ".. return 0.
1620: 09 7d 0a 09 72 65 74 75 72 6e 20 31 0a 20 20 20 .}..return 1.
1630: 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 49 73 52 }.. proc IsR
1640: 43 53 41 72 63 68 69 76 65 20 7b 70 61 74 68 7d CSArchive {path}
1650: 20 7b 0a 09 69 66 20 7b 21 5b 73 74 72 69 6e 67 {..if {![string
1660: 20 6d 61 74 63 68 20 2a 2c 76 20 24 70 61 74 68 match *,v $path
1670: 5d 7d 20 20 20 20 20 7b 72 65 74 75 72 6e 20 30 ]} {return 0
1680: 7d 0a 09 69 66 20 7b 5b 66 69 6c 65 75 74 69 6c }..if {[fileutil
1690: 3a 3a 74 65 73 74 20 24 70 61 74 68 20 66 72 20 ::test $path fr
16a0: 6d 73 67 5d 7d 20 7b 72 65 74 75 72 6e 20 31 7d msg]} {return 1}
16b0: 0a 09 74 72 6f 75 62 6c 65 20 77 61 72 6e 20 24 ..trouble warn $
16c0: 6d 73 67 0a 09 72 65 74 75 72 6e 20 30 0a 20 20 msg..return 0.
16d0: 20 20 7d 0a 0a 20 20 20 20 70 72 6f 63 20 49 73 }.. proc Is
16e0: 43 56 53 41 64 6d 69 6e 20 7b 72 63 73 7d 20 7b CVSAdmin {rcs} {
16f0: 0a 09 69 66 20 7b 21 5b 73 74 72 69 6e 67 20 6d ..if {![string m
1700: 61 74 63 68 20 43 56 53 52 4f 4f 54 2f 2a 20 24 atch CVSROOT/* $
1710: 72 63 73 5d 7d 20 7b 72 65 74 75 72 6e 20 30 7d rcs]} {return 0}
1720: 0a 09 6c 6f 67 20 77 72 69 74 65 20 34 20 63 6f ..log write 4 co
1730: 6c 6c 61 72 20 22 49 67 6e 6f 72 65 64 20 24 72 llar "Ignored $r
1740: 63 73 2c 20 61 64 6d 69 6e 69 73 74 72 61 74 69 cs, administrati
1750: 76 65 20 61 72 63 68 69 76 65 22 0a 09 72 65 74 ve archive"..ret
1760: 75 72 6e 20 31 0a 20 20 20 20 7d 0a 0a 20 20 20 urn 1. }..
1770: 20 70 72 6f 63 20 55 73 65 72 50 61 74 68 20 7b proc UserPath {
1780: 72 63 73 20 69 61 76 7d 20 7b 0a 09 75 70 76 61 rcs iav} {..upva
1790: 72 20 31 20 24 69 61 76 20 69 73 61 74 74 69 63 r 1 $iav isattic
17a0: 0a 0a 09 23 20 44 65 72 69 76 65 20 74 68 65 20 ...# Derive the
17b0: 75 73 65 72 2d 76 69 73 69 62 6c 65 20 70 61 74 user-visible pat
17c0: 68 20 66 72 6f 6d 20 74 68 65 20 72 63 73 20 70 h from the rcs p
17d0: 61 74 68 2e 20 4d 65 61 6e 69 6e 67 3a 0a 09 23 ath. Meaning:..#
17e0: 20 43 68 6f 70 20 6f 66 66 20 74 68 65 20 22 2c Chop off the ",
17f0: 76 22 20 73 75 66 66 69 78 2c 20 61 6e 64 20 72 v" suffix, and r
1800: 65 6d 6f 76 65 20 61 20 70 6f 73 73 69 62 6c 65 emove a possible
1810: 20 22 41 74 74 69 63 22 2e 0a 0a 09 73 65 74 20 "Attic"....set
1820: 66 20 5b 73 74 72 69 6e 67 20 72 61 6e 67 65 20 f [string range
1830: 24 72 63 73 20 30 20 65 6e 64 2d 32 5d 0a 0a 09 $rcs 0 end-2]...
1840: 69 66 20 7b 22 41 74 74 69 63 22 20 65 71 20 5b if {"Attic" eq [
1850: 6c 69 6e 64 65 78 20 5b 66 69 6c 65 20 73 70 6c lindex [file spl
1860: 69 74 20 24 72 63 73 5d 20 65 6e 64 2d 31 5d 7d it $rcs] end-1]}
1870: 20 7b 0a 0a 09 20 20 20 20 23 20 54 68 65 20 63 {... # The c
1880: 6f 6e 73 74 72 75 63 74 69 6f 6e 20 62 65 6c 6f onstruction belo
1890: 77 20 65 6e 73 75 72 65 73 20 74 68 61 74 20 41 w ensures that A
18a0: 74 74 69 63 2f 58 20 6d 61 70 73 20 74 6f 20 58 ttic/X maps to X
18b0: 0a 09 20 20 20 20 23 20 69 6e 73 74 65 61 64 20 .. # instead
18c0: 6f 66 20 2e 2f 58 2e 20 4f 74 68 65 72 77 69 73 of ./X. Otherwis
18d0: 65 2c 20 59 2f 41 74 74 69 63 2f 58 20 6d 61 70 e, Y/Attic/X map
18e0: 73 20 74 6f 20 59 2f 58 2e 0a 0a 09 20 20 20 20 s to Y/X....
18f0: 73 65 74 20 66 78 20 5b 66 69 6c 65 20 64 69 72 set fx [file dir
1900: 6e 61 6d 65 20 5b 66 69 6c 65 20 64 69 72 6e 61 name [file dirna
1910: 6d 65 20 24 66 5d 5d 0a 09 20 20 20 20 73 65 74 me $f]].. set
1920: 20 66 20 20 5b 66 69 6c 65 20 74 61 69 6c 20 24 f [file tail $
1930: 66 5d 0a 09 20 20 20 20 69 66 20 7b 24 66 78 20 f].. if {$fx
1940: 6e 65 20 22 2e 22 7d 20 7b 20 73 65 74 20 66 20 ne "."} { set f
1950: 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 66 78 20 24 [file join $fx $
1960: 66 5d 20 7d 0a 0a 09 20 20 20 20 73 65 74 20 69 f] }... set i
1970: 73 61 74 74 69 63 20 31 0a 09 7d 20 65 6c 73 65 sattic 1..} else
1980: 20 7b 0a 09 20 20 20 20 73 65 74 20 69 73 61 74 {.. set isat
1990: 74 69 63 20 30 0a 09 7d 0a 0a 09 72 65 74 75 72 tic 0..}...retur
19a0: 6e 20 24 66 0a 20 20 20 20 7d 0a 0a 20 20 20 20 n $f. }..
19b0: 70 72 6f 63 20 49 73 53 75 70 65 72 63 65 64 65 proc IsSupercede
19c0: 64 20 7b 62 61 73 65 20 72 63 73 20 75 73 72 20 d {base rcs usr
19d0: 69 73 61 74 74 69 63 7d 20 7b 0a 09 3a 3a 76 61 isattic} {..::va
19e0: 72 69 61 62 6c 65 20 6d 79 69 67 6e 6f 72 65 0a riable myignore.
19f0: 0a 09 69 66 20 7b 21 24 69 73 61 74 74 69 63 7d ..if {!$isattic}
1a00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1a10: 20 20 20 7b 72 65 74 75 72 6e 20 30 7d 0a 09 69 {return 0}..i
1a20: 66 20 7b 21 5b 66 69 6c 65 20 65 78 69 73 74 73 f {![file exists
1a30: 20 24 62 61 73 65 2f 24 75 73 72 2c 76 5d 7d 20 $base/$usr,v]}
1a40: 7b 72 65 74 75 72 6e 20 30 7d 0a 0a 09 23 20 57 {return 0}...# W
1a50: 65 20 68 61 76 65 20 61 20 72 65 67 75 6c 61 72 e have a regular
1a60: 20 61 72 63 68 69 76 65 20 61 6e 64 20 61 6e 20 archive and an
1a70: 41 74 74 69 63 20 61 72 63 68 69 76 65 20 72 65 Attic archive re
1a80: 66 65 72 69 6e 67 20 74 6f 0a 09 23 20 74 68 65 fering to..# the
1a90: 20 73 61 6d 65 20 75 73 65 72 20 76 69 73 69 62 same user visib
1aa0: 6c 65 20 66 69 6c 65 2e 20 49 67 6e 6f 72 65 20 le file. Ignore
1ab0: 74 68 65 20 66 69 6c 65 20 69 6e 20 74 68 65 20 the file in the
1ac0: 41 74 74 69 63 2e 0a 09 23 0a 09 23 20 42 79 20 Attic...#..# By
1ad0: 64 65 66 61 75 6c 74 20 74 68 69 73 20 69 73 20 default this is
1ae0: 61 20 70 72 6f 62 6c 65 6d 20 63 61 75 73 69 6e a problem causin
1af0: 67 20 61 6e 20 61 62 6f 72 74 20 61 66 74 65 72 g an abort after
1b00: 20 74 68 65 20 70 61 73 73 0a 09 23 20 68 61 73 the pass..# has
1b10: 20 63 6f 6d 70 6c 65 74 65 64 2e 20 54 68 65 20 completed. The
1b20: 75 73 65 72 20 63 61 6e 20 68 6f 77 65 76 65 72 user can however
1b30: 20 66 6f 72 63 65 20 75 73 20 74 6f 20 69 67 6e force us to ign
1b40: 6f 72 65 20 69 74 2e 0a 09 23 20 49 6e 20 74 68 ore it...# In th
1b50: 61 74 20 63 61 73 65 20 74 68 65 20 77 61 72 6e at case the warn
1b60: 69 6e 67 20 69 73 20 73 74 69 6c 6c 20 70 72 69 ing is still pri
1b70: 6e 74 65 64 2c 20 62 75 74 20 77 69 6c 6c 20 6e nted, but will n
1b80: 6f 74 0a 09 23 20 69 6e 64 75 63 65 20 61 6e 20 ot..# induce an
1b90: 61 62 6f 72 74 20 61 6e 79 20 6c 6f 6e 67 65 72 abort any longer
1ba0: 2e 0a 0a 09 69 66 20 7b 24 6d 79 69 67 6e 6f 72 ....if {$myignor
1bb0: 65 7d 20 7b 0a 09 20 20 20 20 6c 6f 67 20 77 72 e} {.. log wr
1bc0: 69 74 65 20 32 20 63 6f 6c 6c 61 72 20 22 49 67 ite 2 collar "Ig
1bd0: 6e 6f 72 65 64 20 24 72 63 73 2c 20 73 75 70 65 nored $rcs, supe
1be0: 72 63 65 64 65 64 20 61 72 63 68 69 76 65 22 0a rceded archive".
1bf0: 09 7d 20 65 6c 73 65 20 7b 0a 09 20 20 20 20 74 .} else {.. t
1c00: 72 6f 75 62 6c 65 20 77 61 72 6e 20 20 20 20 20 rouble warn
1c10: 20 20 22 49 67 6e 6f 72 65 64 20 24 72 63 73 2c "Ignored $rcs,
1c20: 20 73 75 70 65 72 63 65 64 65 64 20 61 72 63 68 superceded arch
1c30: 69 76 65 22 0a 09 7d 0a 09 72 65 74 75 72 6e 20 ive"..}..return
1c40: 31 0a 20 20 20 20 7d 0a 0a 20 20 20 20 23 20 23 1. }.. # #
1c50: 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 ## ### ##### ##
1c60: 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 ###### #########
1c70: 23 23 23 23 0a 20 20 20 20 23 23 20 43 6f 6e 66 ####. ## Conf
1c80: 69 67 75 72 61 74 69 6f 6e 0a 0a 20 20 20 20 70 iguration.. p
1c90: 72 61 67 6d 61 20 2d 68 61 73 69 6e 73 74 61 6e ragma -hasinstan
1ca0: 63 65 73 20 20 20 6e 6f 20 3b 20 23 20 73 69 6e ces no ; # sin
1cb0: 67 6c 65 74 6f 6e 0a 20 20 20 20 70 72 61 67 6d gleton. pragm
1cc0: 61 20 2d 68 61 73 74 79 70 65 69 6e 66 6f 20 20 a -hastypeinfo
1cd0: 20 20 6e 6f 20 3b 20 23 20 6e 6f 20 69 6e 74 72 no ; # no intr
1ce0: 6f 73 70 65 63 74 69 6f 6e 0a 20 20 20 20 70 72 ospection. pr
1cf0: 61 67 6d 61 20 2d 68 61 73 74 79 70 65 64 65 73 agma -hastypedes
1d00: 74 72 6f 79 20 6e 6f 20 3b 20 23 20 69 6d 6d 6f troy no ; # immo
1d10: 72 74 61 6c 0a 0a 20 20 20 20 23 20 23 20 23 23 rtal.. # # ##
1d20: 20 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23 ### ##### #####
1d30: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 ### ############
1d40: 23 0a 7d 0a 0a 6e 61 6d 65 73 70 61 63 65 20 65 #.}..namespace e
1d50: 76 61 6c 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c val ::vc::fossil
1d60: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 ::import::cvs::p
1d70: 61 73 73 20 7b 0a 20 20 20 20 6e 61 6d 65 73 70 ass {. namesp
1d80: 61 63 65 20 65 78 70 6f 72 74 20 63 6f 6c 6c 61 ace export colla
1d90: 72 0a 20 20 20 20 6e 61 6d 65 73 70 61 63 65 20 r. namespace
1da0: 65 76 61 6c 20 63 6f 6c 6c 61 72 20 7b 0a 09 6e eval collar {..n
1db0: 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74 20 amespace import
1dc0: 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d ::vc::fossil::im
1dd0: 70 6f 72 74 3a 3a 63 76 73 3a 3a 72 65 70 6f 73 port::cvs::repos
1de0: 69 74 6f 72 79 0a 09 6e 61 6d 65 73 70 61 63 65 itory..namespace
1df0: 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f import ::vc::fo
1e00: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 ssil::import::cv
1e10: 73 3a 3a 73 74 61 74 65 0a 09 6e 61 6d 65 73 70 s::state..namesp
1e20: 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a ace import ::vc:
1e30: 3a 74 6f 6f 6c 73 3a 3a 74 72 6f 75 62 6c 65 0a :tools::trouble.
1e40: 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 .namespace impor
1e50: 74 20 3a 3a 76 63 3a 3a 74 6f 6f 6c 73 3a 3a 6c t ::vc::tools::l
1e60: 6f 67 0a 09 6c 6f 67 20 72 65 67 69 73 74 65 72 og..log register
1e70: 20 63 6f 6c 6c 61 72 0a 20 20 20 20 7d 0a 7d 0a collar. }.}.
1e80: 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 .# # ## ### ####
1e90: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 # ######## #####
1ea0: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 ######## #######
1eb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 ##############.#
1ec0: 23 20 52 65 61 64 79 0a 0a 70 61 63 6b 61 67 65 # Ready..package
1ed0: 20 70 72 6f 76 69 64 65 20 76 63 3a 3a 66 6f 73 provide vc::fos
1ee0: 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 sil::import::cvs
1ef0: 3a 3a 70 61 73 73 3a 3a 63 6f 6c 6c 61 72 20 31 ::pass::collar 1
1f00: 2e 30 0a 72 65 74 75 72 6e 0a .0.return.