Artifact 61842ef2268d219e424e4621a2151c095b551402:
File
tools/cvs2fossil/lib/c2f_pimport.tcl
part of check-in
[e1dbf3186d]
- Reworked the revision import to use the new state tracking system instead of the simple array. Moved some log outputs. Added a file listing the known problems to prevent me from forgetting stuff as it piles up :/
by
aku on
2008-02-04 06:05:11.
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 70 61 63 6b 61 67 65 20 tories..package
0510: 72 65 71 75 69 72 65 20 76 63 3a 3a 66 6f 73 73 require vc::foss
0520: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a il::import::cvs:
0530: 3a 72 69 73 74 61 74 65 20 20 20 20 20 20 20 20 :ristate
0540: 20 20 3b 20 23 20 49 6d 70 6f 72 74 20 73 74 61 ; # Import sta
0550: 74 65 20 28 72 65 76 69 73 69 6f 6e 73 29 0a 0a te (revisions)..
0560: 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 23 # # ## ### #####
0570: 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 ######## ######
0580: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 ####### ########
0590: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 23 #############.##
05a0: 20 52 65 67 69 73 74 65 72 20 74 68 65 20 70 61 Register the pa
05b0: 73 73 20 77 69 74 68 20 74 68 65 20 6d 61 6e 61 ss with the mana
05c0: 67 65 6d 65 6e 74 0a 0a 76 63 3a 3a 66 6f 73 73 gement..vc::foss
05d0: 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a il::import::cvs:
05e0: 3a 70 61 73 73 20 64 65 66 69 6e 65 20 5c 0a 20 :pass define \.
05f0: 20 20 20 49 6d 70 6f 72 74 20 5c 0a 20 20 20 20 Import \.
0600: 7b 49 6d 70 6f 72 74 20 74 68 65 20 63 68 61 6e {Import the chan
0610: 67 65 73 65 74 73 20 61 6e 64 20 66 69 6c 65 20 gesets and file
0620: 72 65 76 69 73 69 6f 6e 73 20 69 6e 74 6f 20 66 revisions into f
0630: 6f 73 73 69 6c 20 72 65 70 6f 73 69 74 6f 72 69 ossil repositori
0640: 65 73 7d 20 5c 0a 20 20 20 20 3a 3a 76 63 3a 3a es} \. ::vc::
0650: 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a fossil::import::
0660: 63 76 73 3a 3a 70 61 73 73 3a 3a 69 6d 70 6f 72 cvs::pass::impor
0670: 74 0a 0a 23 20 23 20 23 23 20 23 23 23 20 23 23 t..# # ## ### ##
0680: 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 ### ######## ###
0690: 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23 ########## #####
06a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
06b0: 0a 23 23 0a 0a 73 6e 69 74 3a 3a 74 79 70 65 20 .##..snit::type
06c0: 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d ::vc::fossil::im
06d0: 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 73 3a port::cvs::pass:
06e0: 3a 69 6d 70 6f 72 74 20 7b 0a 20 20 20 20 23 20 :import {. #
06f0: 23 20 23 23 20 23 23 23 20 23 23 23 23 23 20 23 # ## ### ##### #
0700: 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 ####### ########
0710: 23 23 23 23 23 0a 20 20 20 20 23 23 20 50 75 62 #####. ## Pub
0720: 6c 69 63 20 41 50 49 0a 0a 20 20 20 20 74 79 70 lic API.. typ
0730: 65 6d 65 74 68 6f 64 20 73 65 74 75 70 20 7b 7d emethod setup {}
0740: 20 7b 0a 09 23 20 44 65 66 69 6e 65 20 74 68 65 {..# Define the
0750: 20 6e 61 6d 65 73 20 61 6e 64 20 73 74 72 75 63 names and struc
0760: 74 75 72 65 20 6f 66 20 74 68 65 20 70 65 72 73 ture of the pers
0770: 69 73 74 65 6e 74 20 73 74 61 74 65 20 6f 66 0a istent state of.
0780: 09 23 20 74 68 69 73 20 70 61 73 73 2e 0a 0a 09 .# this pass....
0790: 73 74 61 74 65 20 75 73 65 20 70 72 6f 6a 65 63 state use projec
07a0: 74 0a 09 73 74 61 74 65 20 75 73 65 20 66 69 6c t..state use fil
07b0: 65 0a 09 73 74 61 74 65 20 75 73 65 20 72 65 76 e..state use rev
07c0: 69 73 69 6f 6e 0a 09 73 74 61 74 65 20 75 73 65 ision..state use
07d0: 20 6d 65 74 61 0a 09 73 74 61 74 65 20 75 73 65 meta..state use
07e0: 20 61 75 74 68 6f 72 0a 09 73 74 61 74 65 20 75 author..state u
07f0: 73 65 20 63 6d 65 73 73 61 67 65 0a 09 73 74 61 se cmessage..sta
0800: 74 65 20 75 73 65 20 73 79 6d 62 6f 6c 0a 0a 09 te use symbol...
0810: 23 20 54 68 69 73 20 64 61 74 61 20 69 73 20 61 # This data is a
0820: 63 74 75 61 6c 6c 79 20 74 72 61 6e 73 69 65 6e ctually transien
0830: 74 2c 20 63 6f 6e 66 69 6e 65 64 20 74 6f 20 74 t, confined to t
0840: 68 69 73 20 70 61 73 73 2e 20 57 65 0a 09 23 20 his pass. We..#
0850: 75 73 65 20 74 68 65 20 73 74 61 74 65 20 73 74 use the state st
0860: 6f 72 61 67 65 20 6f 6e 6c 79 20 74 6f 20 6b 65 orage only to ke
0870: 65 70 20 74 68 65 20 52 41 4d 20 75 73 61 67 65 ep the RAM usage
0880: 20 6c 6f 77 2e 0a 09 73 74 61 74 65 20 65 78 74 low...state ext
0890: 65 6e 64 20 72 65 76 75 75 69 64 20 7b 0a 09 20 end revuuid {..
08a0: 20 20 20 72 69 64 20 20 20 49 4e 54 45 47 45 52 rid INTEGER
08b0: 20 4e 4f 54 20 4e 55 4c 4c 20 20 52 45 46 45 52 NOT NULL REFER
08c0: 45 4e 43 45 53 20 72 65 76 69 73 69 6f 6e 20 55 ENCES revision U
08d0: 4e 49 51 55 45 2c 0a 09 20 20 20 20 75 75 69 64 NIQUE,.. uuid
08e0: 20 20 49 4e 54 45 47 45 52 20 4e 4f 54 20 4e 55 INTEGER NOT NU
08f0: 4c 4c 20 20 2d 2d 20 66 6f 73 73 69 6c 20 69 64 LL -- fossil id
0900: 20 6f 66 20 74 68 65 20 72 65 76 69 73 69 6f 6e of the revision
0910: 0a 09 20 20 20 20 2d 2d 20 20 20 20 20 20 20 20 .. --
0920: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0930: 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 74 unique within t
0940: 68 65 20 70 72 6f 6a 65 63 74 0a 09 7d 0a 0a 09 he project..}...
0950: 23 20 54 68 69 73 20 69 6e 66 6f 72 6d 61 74 69 # This informati
0960: 6f 6e 20 69 73 20 74 72 75 6c 79 20 6e 6f 6e 2d on is truly non-
0970: 74 72 61 6e 73 69 65 6e 74 2c 20 6e 65 65 64 65 transient, neede
0980: 64 20 62 79 20 74 68 65 20 6e 65 78 74 0a 09 23 d by the next..#
0990: 20 70 61 73 73 20 61 64 64 69 6e 67 20 74 68 65 pass adding the
09a0: 20 74 61 67 73 2e 0a 0a 09 73 74 61 74 65 20 65 tags....state e
09b0: 78 74 65 6e 64 20 63 73 75 75 69 64 20 7b 0a 09 xtend csuuid {..
09c0: 20 20 20 20 63 69 64 20 20 20 49 4e 54 45 47 45 cid INTEGE
09d0: 52 20 4e 4f 54 20 4e 55 4c 4c 20 20 52 45 46 45 R NOT NULL REFE
09e0: 52 45 4e 43 45 53 20 63 68 61 6e 67 65 73 65 74 RENCES changeset
09f0: 20 55 4e 49 51 55 45 2c 0a 09 20 20 20 20 75 75 UNIQUE,.. uu
0a00: 69 64 20 20 49 4e 54 45 47 45 52 20 4e 4f 54 20 id INTEGER NOT
0a10: 4e 55 4c 4c 20 20 2d 2d 20 66 6f 73 73 69 6c 20 NULL -- fossil
0a20: 69 64 20 6f 66 20 74 68 65 20 63 68 61 6e 67 65 id of the change
0a30: 73 65 74 0a 09 20 20 20 20 2d 2d 20 20 20 20 20 set.. --
0a40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0a50: 20 20 20 20 75 6e 69 71 75 65 20 77 69 74 68 69 unique withi
0a60: 6e 20 74 68 65 20 70 72 6f 6a 65 63 74 0a 09 7d n the project..}
0a70: 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a ..return. }..
0a80: 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 20 6c typemethod l
0a90: 6f 61 64 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 oad {} {..# Pass
0aa0: 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 manager interfa
0ab0: 63 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f 20 ce. Executed to
0ac0: 6c 6f 61 64 20 64 61 74 61 20 63 6f 6d 70 75 74 load data comput
0ad0: 65 64 20 62 79 0a 09 23 20 74 68 69 73 20 70 61 ed by..# this pa
0ae0: 73 73 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 77 ss into memory w
0af0: 68 65 6e 20 74 68 69 73 20 70 61 73 73 20 69 73 hen this pass is
0b00: 20 73 6b 69 70 70 65 64 20 69 6e 73 74 65 61 64 skipped instead
0b10: 20 6f 66 0a 09 23 20 65 78 65 63 75 74 65 64 2e of..# executed.
0b20: 0a 09 72 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a ..return. }..
0b30: 20 20 20 20 74 79 70 65 6d 65 74 68 6f 64 20 72 typemethod r
0b40: 75 6e 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 20 un {} {..# Pass
0b50: 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 63 manager interfac
0b60: 65 2e 20 45 78 65 63 75 74 65 64 20 74 6f 20 70 e. Executed to p
0b70: 65 72 66 6f 72 6d 20 74 68 65 0a 09 23 20 66 75 erform the..# fu
0b80: 6e 63 74 69 6f 6e 61 6c 69 74 79 20 6f 66 20 74 nctionality of t
0b90: 68 65 20 70 61 73 73 2e 0a 0a 09 66 6f 72 65 61 he pass....forea
0ba0: 63 68 20 70 72 6f 6a 65 63 74 20 5b 72 65 70 6f ch project [repo
0bb0: 73 69 74 6f 72 79 20 70 72 6f 6a 65 63 74 73 5d sitory projects]
0bc0: 20 7b 0a 09 20 20 20 20 6c 6f 67 20 77 72 69 74 {.. log writ
0bd0: 65 20 31 20 69 6d 70 6f 72 74 20 7b 49 6d 70 6f e 1 import {Impo
0be0: 72 74 69 6e 67 20 70 72 6f 6a 65 63 74 20 22 5b rting project "[
0bf0: 24 70 72 6f 6a 65 63 74 20 62 61 73 65 5d 22 7d $project base]"}
0c00: 0a 0a 09 20 20 20 20 73 65 74 20 66 6f 73 73 69 ... set fossi
0c10: 6c 20 5b 66 6f 73 73 69 6c 20 25 41 55 54 4f 25 l [fossil %AUTO%
0c20: 5d 0a 09 20 20 20 20 73 65 74 20 72 73 74 61 74 ].. set rstat
0c30: 65 20 5b 72 69 73 74 61 74 65 20 25 41 55 54 4f e [ristate %AUTO
0c40: 25 5d 0a 0a 09 20 20 20 20 73 74 61 74 65 20 74 %]... state t
0c50: 72 61 6e 73 61 63 74 69 6f 6e 20 7b 0a 09 09 23 ransaction {...#
0c60: 20 4c 61 79 65 72 20 49 3a 20 46 69 6c 65 73 20 Layer I: Files
0c70: 61 6e 64 20 74 68 65 69 72 20 72 65 76 69 73 69 and their revisi
0c80: 6f 6e 73 0a 09 09 66 6f 72 65 61 63 68 20 66 69 ons...foreach fi
0c90: 6c 65 20 5b 24 70 72 6f 6a 65 63 74 20 66 69 6c le [$project fil
0ca0: 65 73 5d 20 7b 0a 09 09 20 20 20 20 24 66 69 6c es] {... $fil
0cb0: 65 20 70 75 73 68 74 6f 20 24 66 6f 73 73 69 6c e pushto $fossil
0cc0: 0a 09 09 7d 0a 09 09 23 20 4c 61 79 65 72 20 49 ...}...# Layer I
0cd0: 49 3a 20 43 68 61 6e 67 65 73 65 74 73 0a 09 09 I: Changesets...
0ce0: 66 6f 72 65 61 63 68 20 7b 72 65 76 69 73 69 6f foreach {revisio
0cf0: 6e 20 64 61 74 65 7d 20 5b 24 70 72 6f 6a 65 63 n date} [$projec
0d00: 74 20 72 65 76 69 73 69 6f 6e 73 69 6e 6f 72 64 t revisionsinord
0d10: 65 72 5d 20 7b 0a 09 09 20 20 20 20 24 72 65 76 er] {... $rev
0d20: 69 73 69 6f 6e 20 70 75 73 68 74 6f 20 24 66 6f ision pushto $fo
0d30: 73 73 69 6c 20 24 64 61 74 65 20 24 72 73 74 61 ssil $date $rsta
0d40: 74 65 0a 09 09 7d 0a 09 09 75 6e 73 65 74 20 72 te...}...unset r
0d50: 73 74 61 74 65 0a 09 20 20 20 20 7d 0a 0a 09 20 state.. }...
0d60: 20 20 20 24 72 73 74 61 74 65 20 64 65 73 74 72 $rstate destr
0d70: 6f 79 0a 0a 09 20 20 20 20 23 20 41 74 20 6c 61 oy... # At la
0d80: 73 74 20 63 6f 70 79 20 74 68 65 20 74 65 6d 70 st copy the temp
0d90: 6f 72 61 72 79 20 72 65 70 6f 73 69 74 6f 72 79 orary repository
0da0: 20 66 69 6c 65 20 74 6f 20 69 74 73 20 66 69 6e file to its fin
0db0: 61 6c 0a 09 20 20 20 20 23 20 64 65 73 74 69 6e al.. # destin
0dc0: 61 74 69 6f 6e 20 61 6e 64 20 72 65 6c 65 61 73 ation and releas
0dd0: 65 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 e the associated
0de0: 20 6d 65 6d 6f 72 79 2e 0a 0a 09 20 20 20 20 24 memory.... $
0df0: 66 6f 73 73 69 6c 20 66 69 6e 61 6c 69 7a 65 20 fossil finalize
0e00: 5b 24 70 72 6f 6a 65 63 74 20 62 61 73 65 5d 2e [$project base].
0e10: 66 73 6c 0a 09 7d 0a 0a 09 23 20 54 68 69 73 20 fsl..}...# This
0e20: 64 6f 65 73 20 6e 6f 74 20 6c 69 76 65 20 62 65 does not live be
0e30: 79 6f 6e 64 20 74 68 65 20 70 61 73 73 2e 20 57 yond the pass. W
0e40: 65 20 75 73 65 20 74 68 65 20 73 74 61 74 65 20 e use the state
0e50: 66 6f 72 20 74 68 65 0a 09 23 20 64 61 74 61 20 for the..# data
0e60: 64 65 73 70 69 74 65 20 69 74 73 20 74 72 61 6e despite its tran
0e70: 73 69 65 6e 74 20 6e 61 74 75 72 65 20 74 6f 20 sient nature to
0e80: 6b 65 65 70 20 74 68 65 20 6d 65 6d 6f 72 79 0a keep the memory.
0e90: 09 23 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 .# requirements
0ea0: 64 6f 77 6e 2e 0a 09 23 73 74 61 74 65 20 64 69 down...#state di
0eb0: 73 63 61 72 64 20 72 65 76 75 75 69 64 0a 09 72 scard revuuid..r
0ec0: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 eturn. }..
0ed0: 20 74 79 70 65 6d 65 74 68 6f 64 20 64 69 73 63 typemethod disc
0ee0: 61 72 64 20 7b 7d 20 7b 0a 09 23 20 50 61 73 73 ard {} {..# Pass
0ef0: 20 6d 61 6e 61 67 65 72 20 69 6e 74 65 72 66 61 manager interfa
0f00: 63 65 2e 20 45 78 65 63 75 74 65 64 20 66 6f 72 ce. Executed for
0f10: 20 61 6c 6c 20 70 61 73 73 65 73 20 61 66 74 65 all passes afte
0f20: 72 20 74 68 65 0a 09 23 20 72 75 6e 20 70 61 73 r the..# run pas
0f30: 73 65 73 2c 20 74 6f 20 72 65 6d 6f 76 65 20 61 ses, to remove a
0f40: 6c 6c 20 64 61 74 61 20 6f 66 20 74 68 69 73 20 ll data of this
0f50: 70 61 73 73 20 66 72 6f 6d 20 74 68 65 20 73 74 pass from the st
0f60: 61 74 65 2c 0a 09 23 20 61 73 20 62 65 69 6e 67 ate,..# as being
0f70: 20 6f 75 74 20 6f 66 20 64 61 74 65 2e 0a 09 72 out of date...r
0f80: 65 74 75 72 6e 0a 20 20 20 20 7d 0a 0a 20 20 20 eturn. }..
0f90: 20 23 20 23 20 23 23 20 23 23 23 20 23 23 23 23 # # ## ### ####
0fa0: 23 20 23 23 23 23 23 23 23 23 20 23 23 23 23 23 # ######## #####
0fb0: 23 23 23 23 23 23 23 23 0a 20 20 20 20 23 23 20 ########. ##
0fc0: 49 6e 74 65 72 6e 61 6c 20 6d 65 74 68 6f 64 73 Internal methods
0fd0: 0a 0a 20 20 20 20 23 20 23 20 23 23 20 23 23 23 .. # # ## ###
0fe0: 20 23 23 23 23 23 20 23 23 23 23 23 23 23 23 20 ##### ########
0ff0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 20 20 #############.
1000: 20 20 23 23 20 43 6f 6e 66 69 67 75 72 61 74 69 ## Configurati
1010: 6f 6e 0a 0a 20 20 20 20 70 72 61 67 6d 61 20 2d on.. pragma -
1020: 68 61 73 69 6e 73 74 61 6e 63 65 73 20 20 20 6e hasinstances n
1030: 6f 20 3b 20 23 20 73 69 6e 67 6c 65 74 6f 6e 0a o ; # singleton.
1040: 20 20 20 20 70 72 61 67 6d 61 20 2d 68 61 73 74 pragma -hast
1050: 79 70 65 69 6e 66 6f 20 20 20 20 6e 6f 20 3b 20 ypeinfo no ;
1060: 23 20 6e 6f 20 69 6e 74 72 6f 73 70 65 63 74 69 # no introspecti
1070: 6f 6e 0a 20 20 20 20 70 72 61 67 6d 61 20 2d 68 on. pragma -h
1080: 61 73 74 79 70 65 64 65 73 74 72 6f 79 20 6e 6f astypedestroy no
1090: 20 3b 20 23 20 69 6d 6d 6f 72 74 61 6c 0a 0a 20 ; # immortal..
10a0: 20 20 20 23 20 23 20 23 23 20 23 23 23 20 23 23 # # ## ### ##
10b0: 23 23 23 20 23 23 23 23 23 23 23 23 20 23 23 23 ### ######## ###
10c0: 23 23 23 23 23 23 23 23 23 23 0a 7d 0a 0a 6e 61 ##########.}..na
10d0: 6d 65 73 70 61 63 65 20 65 76 61 6c 20 3a 3a 76 mespace eval ::v
10e0: 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 c::fossil::impor
10f0: 74 3a 3a 63 76 73 3a 3a 70 61 73 73 20 7b 0a 20 t::cvs::pass {.
1100: 20 20 20 6e 61 6d 65 73 70 61 63 65 20 65 78 70 namespace exp
1110: 6f 72 74 20 69 6d 70 6f 72 74 0a 20 20 20 20 6e ort import. n
1120: 61 6d 65 73 70 61 63 65 20 65 76 61 6c 20 69 6d amespace eval im
1130: 70 6f 72 74 20 7b 0a 09 6e 61 6d 65 73 70 61 63 port {..namespac
1140: 65 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 e import ::vc::f
1150: 6f 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 ossil::import::c
1160: 76 73 3a 3a 72 65 70 6f 73 69 74 6f 72 79 0a 09 vs::repository..
1170: 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 6f 72 74 namespace import
1180: 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a 69 ::vc::fossil::i
1190: 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 73 74 61 74 mport::cvs::stat
11a0: 65 0a 09 6e 61 6d 65 73 70 61 63 65 20 69 6d 70 e..namespace imp
11b0: 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f 73 73 69 6c ort ::vc::fossil
11c0: 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 66 ::import::cvs::f
11d0: 6f 73 73 69 6c 0a 09 6e 61 6d 65 73 70 61 63 65 ossil..namespace
11e0: 20 69 6d 70 6f 72 74 20 3a 3a 76 63 3a 3a 66 6f import ::vc::fo
11f0: 73 73 69 6c 3a 3a 69 6d 70 6f 72 74 3a 3a 63 76 ssil::import::cv
1200: 73 3a 3a 72 69 73 74 61 74 65 0a 09 6e 61 6d 65 s::ristate..name
1210: 73 70 61 63 65 20 69 6d 70 6f 72 74 20 3a 3a 76 space import ::v
1220: 63 3a 3a 74 6f 6f 6c 73 3a 3a 6c 6f 67 0a 09 6c c::tools::log..l
1230: 6f 67 20 72 65 67 69 73 74 65 72 20 69 6d 70 6f og register impo
1240: 72 74 0a 20 20 20 20 7d 0a 7d 0a 0a 23 20 23 20 rt. }.}..# #
1250: 23 23 20 23 23 23 20 23 23 23 23 23 20 23 23 23 ## ### ##### ###
1260: 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 ##### ##########
1270: 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 ### ############
1280: 23 23 23 23 23 23 23 23 23 0a 23 23 20 52 65 61 #########.## Rea
1290: 64 79 0a 0a 70 61 63 6b 61 67 65 20 70 72 6f 76 dy..package prov
12a0: 69 64 65 20 76 63 3a 3a 66 6f 73 73 69 6c 3a 3a ide vc::fossil::
12b0: 69 6d 70 6f 72 74 3a 3a 63 76 73 3a 3a 70 61 73 import::cvs::pas
12c0: 73 3a 3a 69 6d 70 6f 72 74 20 31 2e 30 0a 72 65 s::import 1.0.re
12d0: 74 75 72 6e 0a turn.