Artifact 1601bf3ce0199a486bdaaf3cb569da4c2775c1dc:
File
tools/cvs2fossil/lib/c2f_pimport.tcl
part of check-in
[d9fc75e587]
- Created new pass for the import of files and changesets. Uses the new file method and fossil accessor class to handle the file import. Changeset -> manifest conversion is _not_ covered yet.
by
aku on
2007-12-05 07:57:50.
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 58 49 49 2e 20 54 68 69 73 20 69 73 20 74 s XII. This is t
0210: 68 65 20 66 69 72 73 74 20 6f 66 20 74 68 65 20 he first of the
0220: 62 61 63 6b 65 6e 64 20 70 61 73 73 65 73 2e 20 backend passes.
0230: 49 74 20 69 6d 70 6f 72 74 73 20 74 68 65 0a 23 It imports the.#
0240: 23 20 63 68 61 6e 67 65 73 65 74 73 20 63 6f 6e # changesets con
0250: 73 74 72 75 63 74 65 64 20 62 79 20 74 68 65 20 structed by the
0260: 70 72 65 76 69 6f 75 73 20 70 61 73 73 65 73 2c previous passes,
0270: 20 61 6e 64 20 61 6c 6c 20 66 69 6c 65 0a 23 23 and all file.##
0280: 20 72 65 76 69 73 69 6f 6e 73 20 74 68 65 79 20 revisions they
0290: 72 65 66 65 72 20 74 6f 20 69 6e 74 6f 20 6f 6e refer to into on
02a0: 65 20 6f 72 20 6d 6f 72 65 20 66 6f 73 73 69 6c e or more fossil
02b0: 20 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 6f repositories, o
02c0: 6e 65 0a 23 23 20 70 65 72 20 70 72 6f 6a 65 63 ne.## per projec
02d0: 74 2e 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 t...# # ## ### #
02e0: 23 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 #### ######## ##
02f0: 23 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 ########### ####
0300: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0310: 23 0a 23 23 20 52 65 71 75 69 72 65 6d 65 6e 74 #.## Requirement
0320: 73 0a 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 s..package requi
0330: 72 65 20 54 63 6c 20 38 2e 34 20 20 20 20 20 20 re 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 20 20 20 3b 20 23 ; #
0360: 20 52 65 71 75 69 72 65 64 20 72 75 6e 74 69 6d Required runtim
0370: 65 2e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 e..package requi
0380: 72 65 20 73 6e 69 74 20 20 20 20 20 20 20 20 20 re 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 20 20 20 20 3b 20 23 ; #
03b0: 20 4f 4f 20 73 79 73 74 65 6d 2e 0a 70 61 63 6b OO system..pack
03c0: 61 67 65 20 72 65 71 75 69 72 65 20 76 63 3a 3a age require vc::
03d0: 74 6f 6f 6c 73 3a 3a 6c 6f 67 20 20 20 20 20 20 tools::log
03e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
03f0: 20 20 20 20 20 20 3b 20 23 20 55 73 65 72 20 66 ; # User f
0400: 65 65 64 62 61 63 6b 2e 0a 70 61 63 6b 61 67 65 eedback..package
0410: 20 72 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 require vc::fos
0420: 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 sil::import::cvs
0430: 3a 3a 72 65 70 6f 73 69 74 6f 72 79 20 20 20 20 ::repository
0440: 20 20 20 3b 20 23 20 52 65 70 6f 73 69 74 6f 72 ; # Repositor
0450: 79 20 6d 61 6e 61 67 65 6d 65 6e 74 2e 0a 70 61 y management..pa
0460: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 76 63 ckage require vc
0470: 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 ::fossil::import
0480: 3a 3a 63 76 73 3a 3a 73 74 61 74 65 20 20 20 20 ::cvs::state
0490: 20 20 20 20 20 20 20 20 3b 20 23 20 53 74 61 74 ; # Stat
04a0: 65 20 73 74 6f 72 61 67 65 2e 0a 70 61 63 6b 61 e storage..packa
04b0: 67 65 20 72 65 71 75 69 72 65 20 76 63 3a 3a 66 ge require vc::f
04c0: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c
04d0: 76 73 3a 3a 66 6f 73 73 69 6c 20 20 20 20 20 20 vs::fossil
04e0: 20 20 20 20 20 3b 20 23 20 41 63 63 65 73 73 20 ; # Access
04f0: 74 6f 20 66 6f 73 73 69 6c 20 72 65 70 6f 73 69 to fossil reposi
0500: 74 6f 72 69 65 73 2e 0a 0a 23 20 23 20 23 23 20 tories...# # ##
0510: 23 23 23 20 23 23 23 23 23 20 23 23 23 23 23 23 ### ##### ######
0520: 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 23 ## #############
0530: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ###############
0540: 23 23 23 23 23 23 0a 23 23 20 52 65 67 69 73 74 ######.## Regist
0550: 65 72 20 74 68 65 20 70 61 73 73 20 77 69 74 68 er the pass with
0560: 20 74 68 65 20 6d 61 6e 61 67 65 6d 65 6e 74 0a the management.
0570: 0a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 .vc::fossil::imp
0580: 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 20 64 ort::cvs::pass d
0590: 65 66 69 6e 65 20 5c 0a 20 20 20 20 49 6d 70 6f efine \. Impo
05a0: 72 74 20 5c 0a 20 20 20 20 7b 49 6d 70 6f 72 74 rt \. {Import
05b0: 20 74 68 65 20 63 68 61 6e 67 65 73 65 74 73 20 the changesets
05c0: 61 6e 64 20 66 69 6c 65 20 72 65 76 69 73 69 6f and file revisio
05d0: 6e 73 20 69 6e 74 6f 20 66 6f 73 73 69 6c 20 72 ns into fossil r
05e0: 65 70 6f 73 69 74 6f 72 69 65 73 7d 20 5c 0a 20 epositories} \.
05f0: 20 20 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a ::vc::fossil:
0600: 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 :import::cvs::pa
0610: 73 73 3a 3a 69 6d 70 6f 72 74 0a 0a 23 20 23 20 ss::import..# #
0620: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 ## ### ##### ###
0630: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ##########
0640: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 ### ############
0650: 23 23 23 23 23 23 23 23 23 0a 23 23 0a 0a 73 6e #########.##..sn
0660: 69 74 3a 3a 74 79 70 65 20 3a 3a 76 63 3a 3a 66 it::type ::vc::f
0670: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c
0680: 76 73 3a 3a 70 61 73 73 3a 3a 69 6d 70 6f 72 74 vs::pass::import
0690: 20 7b 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 {. # # ## ##
06a0: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 # ##### ########
06b0: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20 #############.
06c0: 20 20 20 23 23 20 50 75 62 6c 69 63 20 41 50 49 ## Public API
06d0: 0a 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 .. typemethod
06e0: 20 73 65 74 75 70 20 7b 7d 20 7b 0a 09 23 20 44 setup {} {..# D
06f0: 65 66 69 6e 65 20 74 68 65 20 6e 61 6d 65 73 20 efine the names
0700: 61 6e 64 20 73 74 72 75 63 74 75 72 65 20 6f 66 and structure of
0710: 20 74 68 65 20 70 65 72 73 69 73 74 65 6e 74 20 the persistent
0720: 73 74 61 74 65 20 6f 66 0a 09 23 20 74 68 69 73 state of..# this
0730: 20 70 61 73 73 2e 0a 0a 09 73 74 61 74 65 20 75 pass....state u
0740: 73 65 20 70 72 6f 6a 65 63 74 0a 09 73 74 61 74 se project..stat
0750: 65 20 75 73 65 20 66 69 6c 65 0a 09 73 74 61 74 e use file..stat
0760: 65 20 75 73 65 20 72 65 76 69 73 69 6f 6e 0a 0a e use revision..
0770: 09 23 20 54 68 69 73 20 64 61 74 61 20 69 73 20 .# This data is
0780: 61 63 74 75 61 6c 6c 79 20 74 72 61 6e 73 69 65 actually transie
0790: 6e 74 2c 20 63 6f 6e 66 69 6e 65 64 20 74 6f 20 nt, confined to
07a0: 74 68 69 73 20 70 61 73 73 2e 20 57 65 0a 09 23 this pass. We..#
07b0: 20 75 73 65 20 74 68 65 20 73 74 61 74 65 20 73 use the state s
07c0: 74 6f 72 61 67 65 20 6f 6e 6c 79 20 74 6f 20 6b torage only to k
07d0: 65 65 70 20 74 68 65 20 52 41 4d 20 75 73 61 67 eep the RAM usag
07e0: 65 20 6c 6f 77 2e 0a 09 73 74 61 74 65 20 65 78 e low...state ex
07f0: 74 65 6e 64 20 72 65 76 75 75 69 64 20 7b 0a 09 tend revuuid {..
0800: 20 20 20 20 72 69 64 20 20 20 49 4e 54 45 47 45 rid INTEGE
0810: 52 20 4e 4f 54 20 4e 55 4c 4c 20 20 52 45 46 45 R NOT NULL REFE
0820: 52 45 4e 43 45 53 20 72 65 76 69 73 69 6f 6e 20 RENCES revision
0830: 55 4e 49 51 55 45 2c 0a 09 20 20 20 20 75 75 69 UNIQUE,.. uui
0840: 64 20 20 49 4e 54 45 47 45 52 20 4e 4f 54 20 4e d INTEGER NOT N
0850: 55 4c 4c 20 20 2d 2d 20 66 6f 73 73 69 6c 20 69 ULL -- fossil i
0860: 64 20 6f 66 20 74 68 65 20 72 65 76 69 73 69 6f d of the revisio
0870: 6e 0a 09 20 20 20 20 2d 2d 20 20 20 20 20 20 20 n.. --
0880: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0890: 20 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 unique within
08a0: 74 68 65 20 70 72 6f 6a 65 63 74 0a 09 7d 0a 0a the project..}..
08b0: 09 23 20 54 68 69 73 20 69 6e 66 6f 72 6d 61 74 .# This informat
08c0: 69 6f 6e 20 69 73 20 74 72 75 6c 79 20 6e 6f 6e ion is truly non
08d0: 2d 74 72 61 6e 73 69 65 6e 74 2c 20 6e 65 65 64 -transient, need
08e0: 65 64 20 62 79 20 74 68 65 20 6e 65 78 74 0a 09 ed by the next..
08f0: 23 20 70 61 73 73 20 61 64 64 69 6e 67 20 74 68 # pass adding th
0900: 65 20 74 61 67 73 2e 0a 0a 09 73 74 61 74 65 20 e tags....state
0910: 65 78 74 65 6e 64 20 63 73 75 75 69 64 20 7b 0a extend csuuid {.
0920: 09 20 20 20 20 63 69 64 20 20 20 49 4e 54 45 47 . cid INTEG
0930: 45 52 20 4e 4f 54 20 4e 55 4c 4c 20 20 52 45 46 ER NOT NULL REF
0940: 45 52 45 4e 43 45 53 20 63 68 61 6e 67 65 73 65 ERENCES changese
0950: 74 20 55 4e 49 51 55 45 2c 0a 09 20 20 20 20 75 t UNIQUE,.. u
0960: 75 69 64 20 20 49 4e 54 45 47 45 52 20 4e 4f 54 uid INTEGER NOT
0970: 20 4e 55 4c 4c 20 20 2d 2d 20 66 6f 73 73 69 6c NULL -- fossil
0980: 20 69 64 20 6f 66 20 74 68 65 20 63 68 61 6e 67 id of the chang
0990: 65 73 65 74 0a 09 20 20 20 20 2d 2d 20 20 20 20 eset.. --
09a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
09b0: 20 20 20 20 20 75 6e 69 71 75 65 20 77 69 74 68 unique with
09c0: 69 6e 20 74 68 65 20 70 72 6f 6a 65 63 74 0a 09 in the project..
09d0: 7d 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a }..return. }.
09e0: 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 20 . typemethod
09f0: 6c 6f 61 64 20 7b 7d 20 7b 0a 09 23 20 50 61 73 load {} {..# Pas
0a00: 73 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 s manager interf
0a10: 61 63 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f ace. Executed to
0a20: 20 6c 6f 61 64 20 64 61 74 61 20 63 6f 6d 70 75 load data compu
0a30: 74 65 64 20 62 79 0a 09 23 20 74 68 69 73 20 70 ted by..# this p
0a40: 61 73 73 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 ass into memory
0a50: 77 68 65 6e 20 74 68 69 73 20 70 61 73 73 20 69 when this pass i
0a60: 73 20 73 6b 69 70 70 65 64 20 69 6e 73 74 65 61 s skipped instea
0a70: 64 20 6f 66 0a 09 23 20 65 78 65 63 75 74 65 64 d of..# executed
0a80: 2e 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a ...return. }.
0a90: 0a 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 20 . typemethod
0aa0: 72 75 6e 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 run {} {..# Pass
0ab0: 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 manager interfa
0ac0: 63 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f 20 ce. Executed to
0ad0: 70 65 72 66 6f 72 6d 20 74 68 65 0a 09 23 20 66 perform the..# f
0ae0: 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 6f 66 20 unctionality of
0af0: 74 68 65 20 70 61 73 73 2e 0a 0a 09 66 6f 72 65 the pass....fore
0b00: 61 63 68 20 70 72 6f 6a 65 63 74 20 5b 72 65 70 ach project [rep
0b10: 6f 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 73 ository projects
0b20: 5d 20 7b 0a 09 20 20 20 20 6c 6f 67 20 77 72 69 ] {.. log wri
0b30: 74 65 20 31 20 69 6d 70 6f 72 74 20 7b 49 6d 70 te 1 import {Imp
0b40: 6f 72 74 69 6e 67 20 70 72 6f 6a 65 63 74 20 22 orting project "
0b50: 5b 24 70 72 6f 6a 65 63 74 20 62 61 73 65 5d 22 [$project base]"
0b60: 7d 0a 0a 09 20 20 20 20 73 65 74 20 66 6f 73 73 }... set foss
0b70: 69 6c 20 5b 66 6f 73 73 69 6c 20 25 41 55 54 4f il [fossil %AUTO
0b80: 25 5d 0a 0a 09 20 20 20 20 73 74 61 74 65 20 74 %]... state t
0b90: 72 61 6e 73 61 63 74 69 6f 6e 20 7b 0a 09 09 66 ransaction {...f
0ba0: 6f 72 65 61 63 68 20 66 69 6c 65 20 5b 24 70 72 oreach file [$pr
0bb0: 6f 6a 65 63 74 20 66 69 6c 65 73 5d 20 7b 0a 09 oject files] {..
0bc0: 09 20 20 20 20 73 65 74 20 70 61 74 68 20 5b 24 . set path [$
0bd0: 66 69 6c 65 20 70 61 74 68 5d 0a 09 09 20 20 20 file path]...
0be0: 20 6c 6f 67 20 77 72 69 74 65 20 32 20 69 6d 70 log write 2 imp
0bf0: 6f 72 74 20 7b 49 6d 70 6f 72 74 69 6e 67 20 66 ort {Importing f
0c00: 69 6c 65 20 22 24 70 61 74 68 22 7d 0a 09 09 20 ile "$path"}...
0c10: 20 20 20 24 66 69 6c 65 20 70 75 73 68 74 6f 20 $file pushto
0c20: 24 66 6f 73 73 69 6c 0a 09 09 7d 0a 0a 09 09 23 $fossil...}....#
0c30: 20 54 4f 44 4f 3a 20 47 65 6e 65 72 61 74 65 20 TODO: Generate
0c40: 6d 61 6e 69 66 65 73 74 73 20 66 6f 72 20 74 68 manifests for th
0c50: 65 20 63 68 61 6e 67 65 73 65 74 73 20 69 6e 20 e changesets in
0c60: 74 68 65 0a 09 09 23 20 20 20 20 20 20 20 70 72 the...# pr
0c70: 6f 6a 65 63 74 20 61 6e 64 20 69 6d 70 6f 72 74 oject and import
0c80: 20 74 68 65 6d 2e 20 54 68 69 73 20 6e 65 65 64 them. This need
0c90: 73 0a 09 09 23 20 20 20 20 20 20 20 74 6f 70 6f s...# topo
0ca0: 6c 6f 67 69 63 61 6c 20 74 72 61 76 65 72 73 61 logical traversa
0cb0: 6c 2e 20 41 6e 64 20 74 68 65 20 63 72 65 61 74 l. And the creat
0cc0: 69 6f 6e 20 6f 66 0a 09 09 23 20 20 20 20 20 20 ion of...#
0cd0: 20 65 6d 70 74 79 20 68 65 6c 70 65 72 20 62 61 empty helper ba
0ce0: 73 65 6c 69 6e 65 73 20 66 6f 72 20 73 74 75 66 selines for stuf
0cf0: 66 20 6c 69 6b 65 20 74 68 65 20 72 6f 6f 74 0a f like the root.
0d00: 09 09 23 20 20 20 20 20 20 20 6f 66 20 6e 74 64 ..# of ntd
0d10: 62 20 61 6e 64 20 73 75 63 68 2e 0a 09 20 20 20 b and such...
0d20: 20 7d 0a 0a 09 20 20 20 20 23 20 41 74 20 6c 61 }... # At la
0d30: 73 74 20 63 6f 70 79 20 74 68 65 20 74 65 6d 70 st copy the temp
0d40: 6f 72 61 72 79 20 72 65 70 6f 73 69 74 6f 72 79 orary repository
0d50: 20 66 69 6c 65 20 74 6f 20 69 74 73 20 66 69 6e file to its fin
0d60: 61 6c 0a 09 20 20 20 20 23 20 64 65 73 74 69 6e al.. # destin
0d70: 61 74 69 6f 6e 20 61 6e 64 20 72 65 6c 65 61 73 ation and releas
0d80: 65 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 e the associated
0d90: 20 6d 65 6d 6f 72 79 2e 0a 0a 09 20 20 20 20 24 memory.... $
0da0: 66 6f 73 73 69 6c 20 66 69 6e 61 6c 69 7a 65 20 fossil finalize
0db0: 5b 24 70 72 6f 6a 65 63 74 20 62 61 73 65 5d 2e [$project base].
0dc0: 66 73 6c 0a 09 7d 0a 0a 09 23 20 54 68 69 73 20 fsl..}...# This
0dd0: 64 6f 65 73 20 6e 6f 74 20 6c 69 76 65 20 62 65 does not live be
0de0: 79 6f 6e 64 20 74 68 65 20 70 61 73 73 2e 20 57 yond the pass. W
0df0: 65 20 75 73 65 20 74 68 65 20 73 74 61 74 65 20 e use the state
0e00: 66 6f 72 20 74 68 65 0a 09 23 20 64 61 74 61 20 for the..# data
0e10: 64 65 73 70 69 74 65 20 69 74 73 20 74 72 61 6e despite its tran
0e20: 73 69 65 6e 74 20 6e 61 74 75 72 65 20 74 6f 20 sient nature to
0e30: 6b 65 65 70 20 74 68 65 20 6d 65 6d 6f 72 79 0a keep the memory.
0e40: 09 23 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 .# requirements
0e50: 64 6f 77 6e 2e 0a 09 23 73 74 61 74 65 20 64 69 down...#state di
0e60: 73 63 61 72 64 20 72 65 76 75 75 69 64 0a 09 72 scard revuuid..r
0e70: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 eturn. }..
0e80: 20 74 79 70 65 6d 65 74 68 6f 64 20 64 69 73 63 typemethod disc
0e90: 61 72 64 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 ard {} {..# Pass
0ea0: 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 manager interfa
0eb0: 63 65 2e 20 45 78 65 63 75 74 65 64 20 66 6f 72 ce. Executed for
0ec0: 20 61 6c 6c 20 70 61 73 73 65 73 20 61 66 74 65 all passes afte
0ed0: 72 20 74 68 65 0a 09 23 20 72 75 6e 20 70 61 73 r the..# run pas
0ee0: 73 65 73 2c 20 74 6f 20 72 65 6d 6f 76 65 20 61 ses, to remove a
0ef0: 6c 6c 20 64 61 74 61 20 6f 66 20 74 68 69 73 20 ll data of this
0f00: 70 61 73 73 20 66 72 6f 6d 20 74 68 65 20 73 74 pass from the st
0f10: 61 74 65 2c 0a 09 23 20 61 73 20 62 65 69 6e 67 ate,..# as being
0f20: 20 6f 75 74 20 6f 66 20 64 61 74 65 2e 0a 09 72 out of date...r
0f30: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 eturn. }..
0f40: 20 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 # # ## ### ####
0f50: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 # ######## #####
0f60: 23 23 23 23 23 23 23 23 0a 20 20 20 20 23 23 20 ########. ##
0f70: 49 6e 74 65 72 6e 61 6c 20 6d 65 74 68 6f 64 73 Internal methods
0f80: 0a 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 23 .. # # ## ###
0f90: 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 20 ##### ########
0fa0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20 20 #############.
0fb0: 20 20 23 23 20 43 6f 6e 66 69 67 75 72 61 74 69 ## Configurati
0fc0: 6f 6e 0a 0a 20 20 20 20 70 72 61 67 6d 61 20 2d on.. pragma -
0fd0: 68 61 73 69 6e 73 74 61 6e 63 65 73 20 20 20 6e hasinstances n
0fe0: 6f 20 3b 20 23 20 73 69 6e 67 6c 65 74 6f 6e 0a o ; # singleton.
0ff0: 20 20 20 20 70 72 61 67 6d 61 20 2d 68 61 73 74 pragma -hast
1000: 79 70 65 69 6e 66 6f 20 20 20 20 6e 6f 20 3b 20 ypeinfo no ;
1010: 23 20 6e 6f 20 69 6e 74 72 6f 73 70 65 63 74 69 # no introspecti
1020: 6f 6e 0a 20 20 20 20 70 72 61 67 6d 61 20 2d 68 on. pragma -h
1030: 61 73 74 79 70 65 64 65 73 74 72 6f 79 20 6e 6f astypedestroy no
1040: 20 3b 20 23 20 69 6d 6d 6f 72 74 61 6c 0a 0a 20 ; # immortal..
1050: 20 20 20 23 20 23 20 23 23 20 23 23 23 20 23 23 # # ## ### ##
1060: 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 ### ######## ###
1070: 23 23 23 23 23 23 23 23 23 23 0a 7d 0a 0a 6e 61 ##########.}..na
1080: 6d 65 73 70 61 63 65 20 65 76 61 6c 20 3a 3a 76 mespace eval ::v
1090: 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 c::fossil::impor
10a0: 74 3a 3a 63 76 73 3a 3a 70 61 73 73 20 7b 0a 20 t::cvs::pass {.
10b0: 20 20 20 6e 61 6d 65 73 70 61 63 65 20 65 78 70 namespace exp
10c0: 6f 72 74 20 69 6d 70 6f 72 74 0a 20 20 20 20 6e ort import. n
10d0: 61 6d 65 73 70 61 63 65 20 65 76 61 6c 20 69 6d amespace eval im
10e0: 70 6f 72 74 20 7b 0a 09 6e 61 6d 65 73 70 61 63 port {..namespac
10f0: 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 e import ::vc::f
1100: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c
1110: 76 73 3a 3a 72 65 70 6f 73 69 74 6f 72 79 0a 09 vs::repository..
1120: 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74 namespace import
1130: 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 ::vc::fossil::i
1140: 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 73 74 61 74 mport::cvs::stat
1150: 65 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 e..namespace imp
1160: 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c ort ::vc::fossil
1170: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 66 ::import::cvs::f
1180: 6f 73 73 69 6c 0a 09 6e 61 6d 65 73 70 61 63 65 ossil..namespace
1190: 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 74 6f import ::vc::to
11a0: 6f 6c 73 3a 3a 6c 6f 67 0a 09 6c 6f 67 20 72 65 ols::log..log re
11b0: 67 69 73 74 65 72 20 69 6d 70 6f 72 74 0a 20 20 gister import.
11c0: 20 20 7d 0a 7d 0a 0a 23 20 23 20 23 23 20 23 23 }.}..# # ## ##
11d0: 23 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 # ##### ########
11e0: 20 23 23 23 23 23 23 23 23 23 23 23 23 23 20 23 ############# #
11f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1200: 23 23 23 23 0a 23 23 20 52 65 61 64 79 0a 0a 70 ####.## Ready..p
1210: 61 63 6b 61 67 65 20 70 72 6f 76 69 64 65 20 76 ackage provide v
1220: 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 c::fossil::impor
1230: 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a 3a 69 6d t::cvs::pass::im
1240: 70 6f 72 74 20 31 2e 30 0a 72 65 74 75 72 6e 0a port 1.0.return.