Artifact a36f7cb9bcc38dfcb3521b0baceec22d0e9830d2:
Wiki page
[Import CVS Repositories]
by
aku on
2007-12-05 02:32:27.
0000: 44 20 32 30 30 37 2d 31 32 2d 30 35 54 30 32 3a D 2007-12-05T02:
0010: 33 32 3a 32 37 0a 4c 20 49 6d 70 6f 72 74 5c 73 32:27.L Import\s
0020: 43 56 53 5c 73 52 65 70 6f 73 69 74 6f 72 69 65 CVS\sRepositorie
0030: 73 0a 50 20 65 61 37 37 34 36 32 30 37 63 63 36 s.P ea7746207cc6
0040: 62 66 34 62 38 62 61 34 37 35 31 32 33 65 32 35 bf4b8ba475123e25
0050: 62 35 32 64 31 39 38 36 34 64 34 63 0a 55 20 61 b52d19864d4c.U a
0060: 6b 75 0a 57 20 35 32 34 35 0a 53 70 69 72 69 74 ku.W 5245.Spirit
0070: 75 61 6c 20 61 6e 63 65 73 74 6f 72 3a 20 5b 68 ual ancestor: [h
0080: 74 74 70 3a 2f 2f 63 76 73 32 73 76 6e 2e 74 69 ttp://cvs2svn.ti
0090: 67 72 69 73 2e 6f 72 67 2f 7c 63 76 73 32 73 76 gris.org/|cvs2sv
00a0: 6e 5d 2e 0d 0a 0d 0a 53 69 6d 69 6c 61 72 69 74 n].....Similarit
00b0: 69 65 73 3a 0d 0a 20 20 2a 20 20 55 73 69 6e 67 ies:.. * Using
00c0: 20 69 64 65 6e 74 69 63 61 6c 20 68 69 67 68 6c identical highl
00d0: 65 76 65 6c 20 61 72 63 68 69 74 65 63 74 75 72 evel architectur
00e0: 65 20 28 70 61 73 73 2d 62 61 73 65 64 29 0d 0a e (pass-based)..
00f0: 20 20 2a 20 20 55 73 69 6e 67 20 73 6f 6d 65 20 * Using some
0100: 73 70 65 63 69 66 69 63 20 61 6c 67 6f 72 69 74 specific algorit
0110: 68 6d 73 20 28 67 72 61 70 68 20 74 72 61 76 65 hms (graph trave
0120: 72 73 61 6c 29 2e 0d 0a 0d 0a 44 69 66 66 65 72 rsal).....Differ
0130: 65 6e 63 65 73 3a 0d 0a 20 20 2a 20 20 4e 6f 74 ences:.. * Not
0140: 20 75 73 69 6e 67 20 61 6e 79 20 6f 66 20 69 74 using any of it
0150: 73 20 63 6f 64 65 20 28 44 69 66 66 65 72 65 6e s code (Differen
0160: 74 20 6c 61 6e 67 75 61 67 65 73 20 66 6f 72 20 t languages for
0170: 6f 6e 65 20 74 68 69 6e 67 2c 20 5b 68 74 74 70 one thing, [http
0180: 3a 2f 2f 77 77 77 2e 70 79 74 68 6f 6e 2e 6f 72 ://www.python.or
0190: 67 2f 7c 50 79 74 68 6f 6e 5d 20 74 68 65 72 65 g/|Python] there
01a0: 2c 20 5b 68 74 74 70 3a 2f 2f 77 77 77 2e 74 63 , [http://www.tc
01b0: 6c 2e 74 6b 2f 7c 54 63 6c 5d 20 68 65 72 65 29 l.tk/|Tcl] here)
01c0: 2e 0d 0a 20 20 2a 20 20 50 65 72 73 69 73 74 65 ... * Persiste
01d0: 6e 74 20 73 74 61 74 65 20 63 6f 6d 70 6c 65 74 nt state complet
01e0: 65 6c 79 20 64 69 66 66 65 72 65 6e 74 2c 20 75 ely different, u
01f0: 73 69 6e 67 20 5b 68 74 74 70 3a 2f 2f 77 77 77 sing [http://www
0200: 2e 73 71 6c 69 74 65 2e 6f 72 67 2f 7c 73 71 6c .sqlite.org/|sql
0210: 69 74 65 5d 20 64 61 74 61 62 61 73 65 20 66 6f ite] database fo
0220: 72 20 61 6c 6c 20 74 68 69 6e 67 73 20 77 65 20 r all things we
0230: 77 69 73 68 20 74 6f 20 6b 65 65 70 20 62 65 74 wish to keep bet
0240: 77 65 65 6e 20 70 61 73 73 65 73 2e 0d 0a 0d 0a ween passes.....
0250: 53 74 61 74 75 73 3a 0d 0a 20 20 2a 20 20 50 61 Status:.. * Pa
0260: 73 73 20 43 6f 6c 6c 65 63 74 41 72 3a 20 43 6f ss CollectAr: Co
0270: 6c 6c 65 63 74 20 61 72 63 68 69 76 65 73 20 2d llect archives -
0280: 20 6f 6b 2e 0d 0a 20 20 2a 20 20 50 61 73 73 20 ok... * Pass
0290: 43 6f 6c 6c 65 63 74 52 65 76 3a 20 43 6f 6c 6c CollectRev: Coll
02a0: 65 63 74 20 72 65 76 69 73 69 6f 6e 73 2c 20 74 ect revisions, t
02b0: 61 67 73 2c 20 62 72 61 6e 63 68 65 73 20 28 66 ags, branches (f
02c0: 69 6c 65 20 6c 65 76 65 6c 29 20 2d 20 6f 6b 2e ile level) - ok.
02d0: 0d 0a 20 20 2a 20 20 50 61 73 73 20 43 6f 6c 6c .. * Pass Coll
02e0: 61 74 65 53 79 6d 62 6f 6c 73 3a 20 43 6f 6c 6c ateSymbols: Coll
02f0: 61 74 65 20 73 79 6d 62 6f 6c 20 28 70 72 6f 6a ate symbol (proj
0300: 65 63 74 20 6c 65 76 65 6c 29 20 66 72 6f 6d 20 ect level) from
0310: 74 68 65 20 66 69 6c 65 20 6c 65 76 65 6c 20 64 the file level d
0320: 61 74 61 20 2d 20 6f 6b 2e 0d 0a 20 20 2a 20 20 ata - ok... *
0330: 50 61 73 73 20 46 69 6c 74 65 72 53 79 6d 62 6f Pass FilterSymbo
0340: 6c 73 3a 20 46 69 6c 74 65 72 20 73 79 6d 62 6f ls: Filter symbo
0350: 6c 73 2c 20 65 78 63 6c 75 64 65 20 73 79 6d 62 ls, exclude symb
0360: 6f 6c 73 20 61 6e 64 20 6c 69 6e 65 73 20 6f 66 ols and lines of
0370: 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 2d 20 6f development - o
0380: 6b 2e 0d 0a 20 20 2a 20 20 50 61 73 73 20 49 6e k... * Pass In
0390: 69 74 43 73 65 74 73 3a 20 43 72 65 61 74 65 20 itCsets: Create
03a0: 69 6e 69 74 69 61 6c 20 63 68 61 6e 67 65 73 65 initial changese
03b0: 74 73 20 2d 20 6f 6b 2e 20 3c 62 3e 4d 65 6d 6f ts - ok. <b>Memo
03c0: 72 79 20 48 6f 67 2c 20 53 6c 6f 77 20 63 6f 6d ry Hog, Slow com
03d0: 6d 69 74 3c 2f 62 3e 0d 0a 20 20 2a 20 20 50 61 mit</b>.. * Pa
03e0: 73 73 20 43 73 65 74 44 65 70 73 3a 20 43 6f 6d ss CsetDeps: Com
03f0: 70 75 74 65 20 63 68 61 6e 67 65 73 65 74 20 64 pute changeset d
0400: 65 70 65 6e 64 65 6e 63 69 65 73 20 66 72 6f 6d ependencies from
0410: 20 72 65 76 69 73 69 6f 6e 20 64 65 70 65 6e 64 revision depend
0420: 65 6e 63 69 65 73 20 2d 20 6f 6b 2e 0d 0a 20 20 encies - ok...
0430: 2a 20 20 50 61 73 73 20 42 72 65 61 6b 52 65 76 * Pass BreakRev
0440: 43 73 65 74 43 79 63 6c 65 73 3a 20 42 72 65 61 CsetCycles: Brea
0450: 6b 20 63 79 63 6c 65 73 20 61 6d 6f 6e 67 20 72 k cycles among r
0460: 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 evision changese
0470: 74 73 20 2d 20 6f 6b 2e 0d 0a 20 20 2a 20 20 50 ts - ok... * P
0480: 61 73 73 20 52 65 76 54 6f 70 6f 6c 6f 67 69 63 ass RevTopologic
0490: 61 6c 53 6f 72 74 3a 20 20 54 6f 70 6f 6c 6f 67 alSort: Topolog
04a0: 69 63 61 6c 6c 79 20 73 6f 72 74 20 72 65 76 69 ically sort revi
04b0: 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 74 73 20 sion changesets
04c0: 2d 20 6f 6b 2e 0d 0a 20 20 2a 20 20 50 61 73 73 - ok... * Pass
04d0: 20 42 72 65 61 6b 53 79 6d 43 73 65 74 43 79 63 BreakSymCsetCyc
04e0: 6c 65 73 3a 20 42 72 65 61 6b 20 63 79 63 6c 65 les: Break cycle
04f0: 73 20 61 6d 6f 6e 67 20 73 79 6d 62 6f 6c 20 63 s among symbol c
0500: 68 61 6e 67 65 73 65 74 73 20 2d 20 6f 6b 2e 0d hangesets - ok..
0510: 0a 20 20 2a 20 20 50 61 73 73 20 42 72 65 61 6b . * Pass Break
0520: 41 6c 6c 43 73 65 74 43 79 63 6c 65 73 3a 20 42 AllCsetCycles: B
0530: 72 65 61 6b 20 63 79 63 6c 65 73 20 6f 76 65 72 reak cycles over
0540: 20 61 6c 6c 20 63 68 61 6e 67 65 73 65 74 73 20 all changesets
0550: 2d 20 3c 62 3e 4d 61 79 20 73 74 69 6c 6c 20 63 - <b>May still c
0560: 68 61 6e 67 65 20 74 68 65 20 6f 72 64 65 72 20 hange the order
0570: 6f 66 20 72 65 76 69 73 69 6f 6e 20 63 68 61 6e of revision chan
0580: 67 65 73 65 74 73 20 6f 76 65 72 20 74 68 65 20 gesets over the
0590: 72 65 73 75 6c 74 20 6f 66 20 70 61 73 73 20 37 result of pass 7
05a0: 2e 3c 2f 62 3e 0d 0a 20 20 2a 20 20 50 61 73 73 .</b>.. * Pass
05b0: 20 41 6c 6c 54 6f 70 6f 6c 6f 67 69 63 61 6c 6c AllTopologicall
05c0: 53 6f 72 74 3a 20 54 6f 70 6f 6c 6f 67 69 63 61 Sort: Topologica
05d0: 6c 6c 79 20 73 6f 72 74 20 61 6c 6c 20 63 68 61 lly sort all cha
05e0: 6e 67 65 73 65 74 73 20 2d 20 6f 6b 2e 0d 0a 0d ngesets - ok....
05f0: 0a 50 61 73 73 65 73 20 74 6f 20 64 6f 3a 0d 0a .Passes to do:..
0600: 20 20 2a 20 20 50 75 74 20 63 68 61 6e 67 65 73 * Put changes
0610: 65 74 20 6f 72 64 65 72 20 66 72 6f 6d 20 74 68 et order from th
0620: 65 20 74 6f 70 2e 73 6f 72 74 20 70 61 73 73 65 e top.sort passe
0630: 73 20 61 6e 64 20 74 72 65 65 20 6f 66 20 73 79 s and tree of sy
0640: 6d 62 6f 6c 73 20 66 72 6f 6d 20 74 68 65 20 63 mbols from the c
0650: 6f 6c 6c 7c 46 69 6c 74 65 72 53 79 6d 20 70 61 oll|FilterSym pa
0660: 73 73 65 73 20 74 6f 67 65 74 68 65 72 20 69 6e sses together in
0670: 74 6f 20 61 20 74 72 65 65 20 6f 66 20 63 68 61 to a tree of cha
0680: 6e 67 65 73 65 74 73 2e 20 4e 6f 74 65 20 74 68 ngesets. Note th
0690: 61 74 20 69 74 20 6d 69 67 68 74 20 6e 6f 74 20 at it might not
06a0: 62 65 20 61 20 74 72 65 65 20 69 66 20 74 68 65 be a tree if the
06b0: 72 65 20 69 73 20 61 6e 20 4e 54 44 42 20 61 72 re is an NTDB ar
06c0: 6f 75 6e 64 2e 0d 0a 20 20 2a 20 20 50 65 72 66 ound... * Perf
06d0: 6f 72 6d 20 74 68 65 20 61 63 74 75 61 6c 20 69 orm the actual i
06e0: 6d 70 6f 72 74 2e 0d 0a 0d 0a 4e 6f 74 65 73 20 mport.....Notes
06f0: 72 65 67 61 72 64 69 6e 67 20 74 68 65 20 61 63 regarding the ac
0700: 74 75 61 6c 20 69 6d 70 6f 72 74 3a 0d 0a 3c 75 tual import:..<u
0710: 6c 3e 0d 0a 3c 6c 69 3e 63 76 73 32 73 76 6e 20 l>..<li>cvs2svn
0720: 69 73 20 65 69 74 68 65 72 20 73 6c 6f 77 2c 20 is either slow,
0730: 6f 72 20 68 75 6e 67 72 79 20 66 6f 72 20 64 69 or hungry for di
0740: 73 6b 73 70 61 63 65 2e 20 54 68 65 20 72 65 61 skspace. The rea
0750: 73 6f 6e 3a 20 49 74 20 69 73 20 69 6d 70 6f 72 son: It is impor
0760: 74 69 6e 67 20 63 68 61 6e 67 65 73 65 74 20 62 ting changeset b
0770: 79 20 63 68 61 6e 67 65 73 65 74 20 61 6e 64 20 y changeset and
0780: 73 6f 20 68 61 73 20 74 6f 20 65 69 74 68 65 72 so has to either
0790: 20 72 65 67 65 6e 65 72 61 74 65 20 74 68 65 20 regenerate the
07a0: 6e 65 65 64 65 64 20 72 65 76 69 73 69 6f 6e 73 needed revisions
07b0: 20 6f 66 20 74 68 65 20 66 69 6c 65 73 20 6f 6e of the files on
07c0: 2d 64 65 6d 61 6e 64 20 6f 76 65 72 20 61 6e 64 -demand over and
07d0: 20 6f 76 65 72 2c 20 6f 72 20 69 74 20 63 61 63 over, or it cac
07e0: 68 65 73 20 74 68 65 20 6e 65 65 64 65 64 20 72 hes the needed r
07f0: 65 76 69 73 69 6f 6e 73 20 77 68 65 6e 20 63 72 evisions when cr
0800: 65 61 74 65 64 20 75 6e 74 69 6c 20 74 68 65 20 eated until the
0810: 6c 61 73 74 20 75 73 65 72 20 69 73 20 67 6f 6e last user is gon
0820: 65 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 57 e...</li>..<li>W
0830: 65 20 63 61 6e 20 64 6f 20 62 65 74 74 65 72 2c e can do better,
0840: 20 69 66 20 77 65 20 67 65 74 20 68 65 6c 70 20 if we get help
0850: 66 72 6f 6d 20 66 6f 73 73 69 6c 2e 20 57 65 20 from fossil. We
0860: 77 6f 75 6c 64 20 6e 65 65 64 20 63 6f 6d 6d 61 would need comma
0870: 6e 64 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 nds to perform t
0880: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 63 74 he following act
0890: 69 6f 6e 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 ions:..<ul>..<li
08a0: 3e 20 49 6d 70 6f 72 74 20 61 20 66 69 6c 65 20 > Import a file
08b0: 61 73 20 62 6c 6f 62 2c 20 72 65 74 75 72 6e 20 as blob, return
08c0: 69 74 73 20 69 6e 74 65 72 6e 61 6c 20 69 64 2e its internal id.
08d0: 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 20 44 65 ..</li>..<li> De
08e0: 6c 74 69 66 79 20 61 20 6b 6e 6f 77 6e 20 66 69 ltify a known fi
08f0: 6c 65 20 72 65 73 70 65 63 74 69 76 65 20 74 6f le respective to
0900: 20 61 20 73 65 63 6f 6e 64 20 6b 6e 6f 77 6e 20 a second known
0910: 66 69 6c 65 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c file...</li>..<l
0920: 69 3e 20 47 65 6e 65 72 61 74 65 20 61 20 6d 61 i> Generate a ma
0930: 6e 69 66 65 73 74 20 66 69 6c 65 20 66 6f 72 20 nifest file for
0940: 61 20 6c 69 73 74 20 6f 66 20 66 69 6c 65 73 20 a list of files
0950: 28 70 61 74 68 73 2c 20 69 64 73 29 2c 20 70 61 (paths, ids), pa
0960: 72 65 6e 74 20 6d 61 6e 69 66 65 73 74 20 72 65 rent manifest re
0970: 66 65 72 65 6e 63 65 73 2c 20 75 73 65 72 2c 20 ferences, user,
0980: 74 69 6d 65 73 74 61 6d 70 2c 20 6c 6f 67 20 6d timestamp, log m
0990: 65 73 73 61 67 65 2e 20 43 6f 75 6c 64 20 62 65 essage. Could be
09a0: 20 73 69 67 6e 65 64 20 6f 72 20 6e 6f 74 2e 0d signed or not..
09b0: 0a 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c .</li>..</ul>..<
09c0: 62 72 3e 0d 0a 57 69 74 68 20 74 68 65 73 65 20 br>..With these
09d0: 61 63 74 69 6f 6e 73 20 28 70 6f 73 73 69 62 6c actions (possibl
09e0: 65 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e e in combination
09f0: 29 20 77 65 20 63 61 6e 20 69 6d 70 6f 72 74 20 ) we can import
0a00: 74 68 65 20 61 72 63 68 69 76 65 20 66 69 6c 65 the archive file
0a10: 73 20 66 69 72 73 74 2c 20 6e 65 65 64 69 6e 67 s first, needing
0a20: 20 6f 6e 6c 79 20 73 70 61 63 65 20 66 6f 72 20 only space for
0a30: 74 68 65 20 72 65 76 69 73 69 6f 6e 73 20 6f 66 the revisions of
0a40: 20 61 20 73 69 6e 67 6c 65 20 66 69 6c 65 20 28 a single file (
0a50: 62 6f 75 6e 64 65 64 20 62 79 20 74 68 65 20 6c bounded by the l
0a60: 61 72 67 65 73 74 20 66 69 6c 65 20 69 6e 20 74 argest file in t
0a70: 65 72 6d 73 20 6f 66 20 73 69 7a 65 20 61 6e 64 erms of size and
0a80: 20 68 69 73 74 6f 72 79 29 2c 20 77 69 74 68 20 history), with
0a90: 74 68 65 69 72 20 64 65 6c 74 61 2d 6c 69 6e 6b their delta-link
0aa0: 73 20 6d 69 72 72 6f 72 69 6e 67 20 74 68 65 20 s mirroring the
0ab0: 52 43 53 20 73 74 72 75 63 74 75 72 65 2e 20 41 RCS structure. A
0ac0: 66 74 65 72 20 74 68 61 74 20 77 65 20 63 61 6e fter that we can
0ad0: 20 69 6e 64 65 70 65 6e 64 65 6e 74 6c 79 20 67 independently g
0ae0: 65 6e 65 72 61 74 65 2c 20 69 6d 70 6f 72 74 2c enerate, import,
0af0: 20 61 6e 64 20 64 65 6c 74 69 66 79 20 74 68 65 and deltify the
0b00: 20 6d 61 6e 69 66 65 73 74 73 20 66 6f 72 20 63 manifests for c
0b10: 68 61 6e 67 65 73 65 74 73 2e 20 74 6f 20 66 69 hangesets. to fi
0b20: 6e 61 6c 69 7a 65 20 77 65 20 73 69 6d 70 6c 79 nalize we simply
0b30: 20 27 72 65 62 75 69 6c 64 27 20 74 68 65 20 72 'rebuild' the r
0b40: 65 70 6f 73 69 74 6f 72 79 2e 20 54 68 69 73 20 epository. This
0b50: 73 68 6f 75 6c 64 20 62 65 20 66 61 73 74 20 77 should be fast w
0b60: 69 74 68 6f 75 74 20 6e 65 65 64 69 6e 67 20 6d ithout needing m
0b70: 75 63 68 20 74 65 6d 70 6f 72 61 72 79 20 64 69 uch temporary di
0b80: 73 6b 20 73 70 61 63 65 20 65 69 74 68 65 72 2e sk space either.
0b90: 0d 0a 3c 62 72 3e 0d 0a 43 75 72 72 65 6e 74 6c ..<br>..Currentl
0ba0: 79 20 49 20 61 6d 20 74 68 69 6e 6b 69 6e 67 20 y I am thinking
0bb0: 61 62 6f 75 74 20 77 61 6e 74 69 6e 67 20 61 20 about wanting a
0bc0: 63 6f 6d 6d 61 6e 64 0d 0a 3c 70 72 65 3e 0d 0a command..<pre>..
0bd0: 66 6f 73 73 69 6c 20 69 6d 70 6f 72 74 2d 66 69 fossil import-fi
0be0: 6c 65 73 20 53 50 45 43 46 49 4c 45 0d 0a 3c 2f les SPECFILE..</
0bf0: 70 72 65 3e 0d 0a 77 68 69 63 68 20 69 6d 70 6f pre>..which impo
0c00: 72 74 73 20 61 6e 64 20 64 65 6c 74 69 66 69 65 rts and deltifie
0c10: 73 20 66 69 6c 65 73 20 61 73 20 62 6c 6f 62 20 s files as blob
0c20: 70 65 72 20 74 68 65 20 53 50 45 43 46 49 4c 45 per the SPECFILE
0c30: 2c 20 72 65 74 75 72 6e 69 6e 67 20 6f 6e 20 73 , returning on s
0c40: 74 64 6f 75 74 20 74 68 65 20 61 73 73 6f 63 69 tdout the associ
0c50: 61 74 65 64 20 6f 66 20 70 61 74 68 73 20 61 6e ated of paths an
0c60: 64 20 69 6e 74 65 72 6e 61 6c 20 69 64 73 2e 20 d internal ids.
0c70: 45 78 61 6d 70 6c 65 20 53 50 45 43 46 49 4c 45 Example SPECFILE
0c80: 3a 0d 0a 3c 70 72 65 3e 0d 0a 46 20 70 61 74 68 :..<pre>..F path
0c90: 31 0d 0a 44 20 70 61 74 68 32 20 70 61 74 68 31 1..D path2 path1
0ca0: 0d 0a 2e 2e 2e 0d 0a 3c 2f 70 72 65 3e 0d 0a 54 .......</pre>..T
0cb0: 68 65 20 27 46 27 20 63 61 72 64 20 74 65 6c 6c he 'F' card tell
0cc0: 73 20 69 74 20 74 6f 20 69 6d 70 6f 72 74 20 27 s it to import '
0cd0: 70 61 74 68 31 27 20 61 73 20 69 73 2e 20 54 68 path1' as is. Th
0ce0: 65 20 27 44 27 20 63 61 72 64 20 74 68 65 6e 20 e 'D' card then
0cf0: 74 65 6c 6c 73 20 69 74 20 74 6f 20 69 6d 70 6f tells it to impo
0d00: 72 74 20 27 70 61 74 68 32 27 20 61 73 20 69 73 rt 'path2' as is
0d10: 20 61 6e 64 20 74 68 65 6e 20 64 65 6c 74 69 66 and then deltif
0d20: 79 20 27 70 61 74 68 31 27 20 69 6e 20 74 65 72 y 'path1' in ter
0d30: 6d 73 20 6f 66 20 27 70 61 74 68 32 27 2e 20 41 ms of 'path2'. A
0d40: 6e 64 20 73 6f 20 6f 6e 2e 0d 0a 3c 62 72 3e 0d nd so on...<br>.
0d50: 0a 54 6f 20 69 6d 70 6f 72 74 20 61 6e 20 52 43 .To import an RC
0d60: 53 20 61 72 63 68 69 76 65 20 77 65 20 6e 6f 77 S archive we now
0d70: 20 6a 75 73 74 20 68 61 76 65 20 74 6f 20 67 65 just have to ge
0d80: 6e 65 72 61 74 65 20 74 68 65 20 66 75 6c 6c 20 nerate the full
0d90: 72 65 76 69 73 69 6f 6e 73 20 69 6e 20 73 6f 6d revisions in som
0da0: 65 20 74 65 6d 70 64 69 72 2c 20 74 68 65 6e 20 e tempdir, then
0db0: 63 72 65 61 74 65 20 61 20 53 50 45 43 20 73 68 create a SPEC sh
0dc0: 6f 77 69 6e 67 20 74 68 65 20 64 65 6c 74 61 2d owing the delta-
0dd0: 6c 69 6e 6b 73 20 61 6e 64 20 6c 65 74 20 66 6f links and let fo
0de0: 73 73 69 6c 20 68 61 76 65 20 74 68 69 73 2e 20 ssil have this.
0df0: 54 68 65 20 72 65 73 75 6c 74 69 6e 67 20 69 64 The resulting id
0e00: 73 20 74 68 65 6e 20 67 6f 20 69 6e 74 6f 20 74 s then go into t
0e10: 68 65 20 69 6d 70 6f 72 74 65 72 20 73 74 61 74 he importer stat
0e20: 65 20 66 6f 72 20 77 68 65 6e 20 77 65 20 67 65 e for when we ge
0e30: 6e 65 72 61 74 65 20 74 68 65 20 6d 61 6e 69 66 nerate the manif
0e40: 65 73 74 73 2e 0d 0a 3c 62 72 3e 0d 0a 54 6f 20 ests...<br>..To
0e50: 69 6d 70 6f 72 74 20 6d 61 6e 69 66 65 73 74 73 import manifests
0e60: 20 77 65 20 6e 65 65 64 20 73 65 63 6f 6e 64 20 we need second
0e70: 63 6f 6d 6d 61 6e 64 2c 20 77 68 69 63 68 20 67 command, which g
0e80: 65 6e 65 72 61 74 65 73 20 69 74 20 66 72 6f 6d enerates it from
0e90: 20 63 68 61 6e 67 65 73 65 74 20 64 61 74 61 2c changeset data,
0ea0: 20 61 6e 64 20 69 6d 70 6f 72 74 73 20 69 74 20 and imports it
0eb0: 74 6f 6f 2e 0d 0a 3c 70 72 65 3e 0d 0a 66 6f 73 too...<pre>..fos
0ec0: 73 69 6c 20 69 6d 70 6f 72 74 2d 6d 61 6e 69 66 sil import-manif
0ed0: 65 73 74 20 75 73 65 72 20 74 69 6d 65 73 74 61 est user timesta
0ee0: 6d 70 20 4d 45 53 53 41 47 45 46 49 4c 45 20 46 mp MESSAGEFILE F
0ef0: 49 4c 45 46 49 4c 45 20 70 61 72 65 6e 74 2e 2e ILEFILE parent..
0f00: 2e 0d 0a 3c 2f 70 72 65 3e 0d 0a 54 68 65 20 27 ...</pre>..The '
0f10: 6d 65 73 73 61 67 65 66 69 6c 65 27 20 63 6f 6e messagefile' con
0f20: 74 61 69 6e 73 20 74 68 65 20 6c 6f 67 20 6d 65 tains the log me
0f30: 73 73 61 67 65 2c 20 74 68 65 20 27 66 69 6c 65 ssage, the 'file
0f40: 66 69 6c 65 27 20 6c 69 73 74 73 20 74 68 65 20 file' lists the
0f50: 72 65 76 69 73 69 6f 6e 73 20 69 6e 20 74 68 65 revisions in the
0f60: 20 6d 61 6e 69 66 65 73 74 20 62 79 20 69 64 2c manifest by id,
0f70: 20 61 6e 64 20 77 69 74 68 20 70 61 74 68 20 69 and with path i
0f80: 6e 20 74 68 65 20 77 6f 72 6b 73 70 61 63 65 2e n the workspace.
0f90: 20 54 68 65 20 70 61 72 65 6e 74 73 20 61 72 65 The parents are
0fa0: 20 74 68 65 20 69 64 73 20 6f 66 20 74 68 65 20 the ids of the
0fb0: 70 61 72 65 6e 74 20 6d 61 6e 69 66 65 73 74 73 parent manifests
0fc0: 2e 20 54 68 65 20 72 65 73 75 6c 74 20 6f 66 20 . The result of
0fd0: 74 68 65 20 63 6f 6d 6d 61 6e 64 20 69 73 20 74 the command is t
0fe0: 68 65 20 69 64 20 6f 66 20 74 68 65 20 6e 65 77 he id of the new
0ff0: 20 6d 61 6e 69 66 65 73 74 2e 0d 0a 3c 62 72 3e manifest...<br>
1000: 0d 0a 4e 6f 74 65 3a 20 57 65 20 68 61 76 65 20 ..Note: We have
1010: 61 6c 72 65 61 64 79 20 63 6f 6d 6d 61 6e 64 73 already commands
1020: 20 66 6f 72 20 74 68 65 20 70 75 74 20 61 6e 64 for the put and
1030: 20 64 65 6c 74 69 66 79 20 6f 70 65 72 61 74 69 deltify operati
1040: 6f 6e 73 2c 20 61 6c 62 65 69 74 20 75 6e 64 6f ons, albeit undo
1050: 63 75 6d 65 6e 74 65 64 2c 20 69 6e 20 74 68 65 cumented, in the
1060: 20 73 65 74 20 6f 66 20 74 65 73 74 20 63 6f 6d set of test com
1070: 6d 61 6e 64 73 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c mands...</li>..<
1080: 2f 75 6c 3e 0d 0a 0d 0a 4d 69 73 63 65 6c 6c 61 /ul>....Miscella
1090: 6e 65 6f 75 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c neous:..<ul>..<l
10a0: 69 3e 41 64 64 20 6f 70 74 69 6f 6e 20 74 6f 20 i>Add option to
10b0: 61 6c 6c 6f 77 20 64 69 76 65 72 74 69 6e 67 20 allow diverting
10c0: 74 68 65 20 6c 6f 67 20 6f 75 74 70 75 74 20 69 the log output i
10d0: 6e 74 6f 20 61 20 66 69 6c 65 2c 20 65 78 63 65 nto a file, exce
10e0: 70 74 20 66 6f 72 20 74 68 65 20 70 72 6f 67 72 pt for the progr
10f0: 65 73 73 20 72 65 70 6f 72 74 69 6e 67 2e 20 52 ess reporting. R
1100: 65 73 75 6c 74 20 69 73 20 6e 69 63 65 20 69 6e esult is nice in
1110: 74 65 72 61 63 74 69 76 65 20 6c 6f 67 20 2b 20 teractive log +
1120: 70 72 6f 67 72 65 73 73 2c 20 61 6e 64 20 61 20 progress, and a
1130: 28 72 65 6c 61 74 69 76 65 6c 79 29 20 73 6d 61 (relatively) sma
1140: 6c 6c 20 6c 6f 67 20 66 69 6c 65 20 77 69 74 68 ll log file with
1150: 6f 75 74 20 61 6c 6c 20 74 68 65 20 75 6e 77 61 out all the unwa
1160: 6e 74 65 64 20 70 72 6f 67 72 65 73 73 20 6e 75 nted progress nu
1170: 6d 62 65 72 73 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c mbers...</li>..<
1180: 6c 69 3e 47 6f 20 6f 76 65 72 20 74 68 65 20 53 li>Go over the S
1190: 51 4c 20 73 74 61 74 65 6d 65 6e 74 73 20 61 6e QL statements an
11a0: 64 20 63 68 65 63 6b 20 74 68 61 74 20 74 68 65 d check that the
11b0: 79 20 68 61 76 65 20 67 6f 6f 64 20 71 75 65 72 y have good quer
11c0: 79 20 70 6c 61 6e 73 0d 0a 3c 2f 6c 69 3e 0d 0a y plans..</li>..
11d0: 3c 6c 69 3e 47 6f 20 6f 76 65 72 20 74 68 65 20 <li>Go over the
11e0: 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 73 20 61 SQL statements a
11f0: 6e 64 20 61 64 64 20 63 6f 6d 6d 65 6e 74 73 20 nd add comments
1200: 77 68 65 72 65 20 74 68 65 79 20 61 72 65 20 6e where they are n
1210: 6f 6e 2d 74 72 69 76 69 61 6c 2e 0d 0a 3c 2f 6c on-trivial...</l
1220: 69 3e 0d 0a 3c 6c 69 3e 43 75 72 72 65 6e 74 6c i>..<li>Currentl
1230: 79 20 73 6f 6d 65 20 70 61 73 73 65 73 20 74 61 y some passes ta
1240: 6b 65 20 71 75 69 74 65 20 61 20 62 69 74 20 6f ke quite a bit o
1250: 66 20 74 69 6d 65 20 77 68 65 6e 20 74 68 65 69 f time when thei
1260: 72 20 61 63 74 75 61 6c 20 6f 70 65 72 61 74 69 r actual operati
1270: 6f 6e 20 69 73 20 61 6c 72 65 61 64 79 20 63 6f on is already co
1280: 6d 70 6c 65 74 65 2e 20 49 74 20 73 65 65 6d 73 mplete. It seems
1290: 20 74 68 61 74 20 73 71 6c 69 74 65 20 69 73 20 that sqlite is
12a0: 68 65 61 76 69 6c 79 20 77 6f 72 6b 69 6e 67 20 heavily working
12b0: 6f 6e 20 63 6f 6d 6d 69 74 74 69 6e 67 20 61 20 on committing a
12c0: 6c 6f 74 20 6f 66 20 63 68 61 6e 67 65 73 20 28 lot of changes (
12d0: 4d 6f 73 74 20 70 61 73 73 65 73 20 61 72 65 20 Most passes are
12e0: 77 72 61 70 70 65 64 20 69 6e 74 6f 20 61 20 73 wrapped into a s
12f0: 69 6e 67 6c 65 20 74 72 61 6e 73 61 63 74 69 6f ingle transactio
1300: 6e 29 2e 20 43 6f 6e 73 69 64 65 72 20 77 61 79 n). Consider way
1310: 73 20 6f 66 20 73 70 65 65 64 69 6e 67 20 74 68 s of speeding th
1320: 69 73 20 75 70 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c is up...<ul>..<l
1330: 69 3e 44 6f 20 6f 75 72 20 6f 77 6e 20 74 72 61 i>Do our own tra
1340: 6e 73 61 63 74 69 6f 6e 20 6d 61 6e 61 67 65 6d nsaction managem
1350: 65 6e 74 3f 20 53 6f 20 74 68 61 74 20 77 65 20 ent? So that we
1360: 63 61 6e 20 63 6f 6d 6d 69 74 20 65 76 65 72 79 can commit every
1370: 20 58 20 63 68 61 6e 67 65 73 3f 2e 0d 0a 3c 2f X changes?...</
1380: 6c 69 3e 0d 0a 3c 6c 69 3e 53 68 6f 75 6c 64 20 li>..<li>Should
1390: 77 65 20 64 69 73 61 62 6c 65 20 73 79 6e 63 68 we disable synch
13a0: 72 6f 6e 6f 75 73 20 6f 70 65 72 61 74 69 6f 6e ronous operation
13b0: 3f 20 54 68 65 20 73 74 61 74 65 20 64 61 74 61 ? The state data
13c0: 62 61 73 65 20 69 73 20 6e 6f 74 20 74 68 61 74 base is not that
13d0: 20 63 72 69 74 69 63 61 6c 2c 20 69 2e 65 2e 20 critical, i.e.
13e0: 69 74 20 63 61 6e 20 61 6c 77 61 79 73 20 62 65 it can always be
13f0: 20 72 65 67 65 6e 65 72 61 74 65 64 2e 20 4f 6e regenerated. On
1400: 20 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 2c the other hand,
1410: 20 62 65 69 6e 67 20 61 62 6c 65 20 74 6f 20 62 being able to b
1420: 65 20 73 75 72 65 20 74 68 61 74 20 77 65 20 63 e sure that we c
1430: 61 6e 20 72 65 73 74 61 72 74 20 66 72 6f 6d 20 an restart from
1440: 74 68 65 20 69 6e 74 65 72 72 75 70 74 65 64 20 the interrupted
1450: 70 61 73 73 20 69 73 20 6e 69 63 65 2c 20 61 6e pass is nice, an
1460: 64 20 6e 6f 74 20 70 6f 73 73 69 62 6c 65 20 69 d not possible i
1470: 66 20 77 65 20 67 6f 74 20 69 74 20 63 6f 72 72 f we got it corr
1480: 75 70 74 65 64 20 62 79 20 61 73 79 6e 63 68 72 upted by asynchr
1490: 6f 6e 6f 75 73 20 6f 70 65 72 61 74 69 6f 6e 2e onous operation.
14a0: 20 3c 62 3e 54 61 62 6c 65 64 20 66 6f 72 20 6e <b>Tabled for n
14b0: 6f 77 2c 20 74 68 69 73 20 69 73 20 6e 6f 74 20 ow, this is not
14c0: 79 65 74 20 63 72 69 74 69 63 61 6c 3c 2f 62 3e yet critical</b>
14d0: 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a ..</li>..</ul>..
14e0: 3c 2f 75 6c 3e 0d 0a 0a 5a 20 64 63 62 32 66 36 </ul>...Z dcb2f6
14f0: 33 31 65 62 63 34 37 31 39 62 61 31 62 30 65 62 31ebc4719ba1b0eb
1500: 39 34 65 63 31 66 37 66 64 33 0a 94ec1f7fd3.