Artifact b451033b2624b50b2a863f8eeffcdd386e2f6f5b:
Wiki page
[Import CVS Repositories]
by
aku on
2008-03-14 21:07:40.
0000: 44 20 32 30 30 38 2d 30 33 2d 31 34 54 32 31 3a D 2008-03-14T21:
0010: 30 37 3a 34 30 0a 4c 20 49 6d 70 6f 72 74 5c 73 07:40.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 66 32 63 30 35 61 36 61 64 32 37 39 s.P f2c05a6ad279
0040: 63 30 63 62 30 63 37 32 34 39 62 39 66 66 30 63 c0cb0c7249b9ff0c
0050: 65 61 31 32 64 39 31 35 33 62 66 36 0a 55 20 61 ea12d9153bf6.U a
0060: 6b 75 0a 57 20 35 36 34 34 0a 53 70 69 72 69 74 ku.W 5644.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: 3c 70 3e 0d 0a 53 74 61 74 75 73 3a 0d 0a 3c 74 <p>..Status:..<t
0260: 61 62 6c 65 20 20 62 6f 72 64 65 72 3d 31 3e 0d able border=1>.
0270: 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 50 61 73 73 3c .<tr>..<th>Pass<
0280: 2f 74 68 3e 0d 0a 3c 74 68 3e 44 65 73 63 72 69 /th>..<th>Descri
0290: 70 74 69 6f 6e 3c 2f 74 68 3e 0d 0a 3c 74 68 3e ption</th>..<th>
02a0: 4e 6f 74 65 73 3c 2f 74 68 3e 0d 0a 3c 2f 74 72 Notes</th>..</tr
02b0: 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 43 6f 6c >..<tr>..<td>Col
02c0: 6c 65 63 74 41 72 3c 2f 74 64 3e 0d 0a 3c 74 64 lectAr</td>..<td
02d0: 3e 43 6f 6c 6c 65 63 74 20 61 72 63 68 69 76 65 >Collect archive
02e0: 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f s</td>..<td>Ok</
02f0: 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e td>..</tr>..<tr>
0300: 0d 0a 3c 74 64 3e 43 6f 6c 6c 65 63 74 52 65 76 ..<td>CollectRev
0310: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 43 6f 6c 6c 65 </td>..<td>Colle
0320: 63 74 20 72 65 76 69 73 69 6f 6e 73 2c 20 74 61 ct revisions, ta
0330: 67 73 2c 20 62 72 61 6e 63 68 65 73 20 28 66 69 gs, branches (fi
0340: 6c 65 20 6c 65 76 65 6c 29 3c 2f 74 64 3e 0d 0a le level)</td>..
0350: 3c 74 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 <td>Ok</td>..</t
0360: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 43 6f r>..<tr>..<td>Co
0370: 6c 6c 61 74 65 53 79 6d 62 6f 6c 73 3c 2f 74 64 llateSymbols</td
0380: 3e 0d 0a 3c 74 64 3e 43 6f 6c 6c 61 74 65 20 73 >..<td>Collate s
0390: 79 6d 62 6f 6c 20 28 70 72 6f 6a 65 63 74 20 6c ymbol (project l
03a0: 65 76 65 6c 29 20 66 72 6f 6d 20 74 68 65 20 66 evel) from the f
03b0: 69 6c 65 20 6c 65 76 65 6c 20 64 61 74 61 3c 2f ile level data</
03c0: 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 3e td>..<td>Ok</td>
03d0: 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c ..</tr>..<tr>..<
03e0: 74 64 3e 46 69 6c 74 65 72 53 79 6d 62 6f 6c 73 td>FilterSymbols
03f0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 46 69 6c 74 65 </td>..<td>Filte
0400: 72 20 73 79 6d 62 6f 6c 73 2c 20 65 78 63 6c 75 r symbols, exclu
0410: 64 65 20 73 79 6d 62 6f 6c 73 20 61 6e 64 20 6c de symbols and l
0420: 69 6e 65 73 20 6f 66 20 64 65 76 65 6c 6f 70 6d ines of developm
0430: 65 6e 74 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b ent</td>..<td>Ok
0440: 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 </td>..</tr>..<t
0450: 72 3e 0d 0a 3c 74 64 3e 49 6e 69 74 43 73 65 74 r>..<td>InitCset
0460: 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 43 72 65 61 s</td>..<td>Crea
0470: 74 65 20 69 6e 69 74 69 61 6c 20 63 68 61 6e 67 te initial chang
0480: 65 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e esets</td>..<td>
0490: 4f 6b 2e 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d Ok.</td>..</tr>.
04a0: 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 43 73 65 74 44 .<tr>..<td>CsetD
04b0: 65 70 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 43 6f eps</td>..<td>Co
04c0: 6d 70 75 74 65 20 63 68 61 6e 67 65 73 65 74 20 mpute changeset
04d0: 64 65 70 65 6e 64 65 6e 63 69 65 73 20 66 72 6f dependencies fro
04e0: 6d 20 72 65 76 69 73 69 6f 6e 20 64 65 70 65 6e m revision depen
04f0: 64 65 6e 63 69 65 73 3c 2f 74 64 3e 0d 0a 3c 74 dencies</td>..<t
0500: 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e d>Ok</td>..</tr>
0510: 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 42 72 65 61 ..<tr>..<td>Brea
0520: 6b 52 65 76 43 73 65 74 43 79 63 6c 65 73 3c 2f kRevCsetCycles</
0530: 74 64 3e 0d 0a 3c 74 64 3e 42 72 65 61 6b 20 63 td>..<td>Break c
0540: 79 63 6c 65 73 20 61 6d 6f 6e 67 20 72 65 76 69 ycles among revi
0550: 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 74 73 3c sion changesets<
0560: 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 /td>..<td>Ok</td
0570: 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a >..</tr>..<tr>..
0580: 3c 74 64 3e 52 65 76 54 6f 70 6f 6c 6f 67 69 63 <td>RevTopologic
0590: 61 6c 53 6f 72 74 3c 2f 74 64 3e 0d 0a 3c 74 64 alSort</td>..<td
05a0: 3e 54 6f 70 6f 6c 6f 67 69 63 61 6c 6c 79 20 73 >Topologically s
05b0: 6f 72 74 20 72 65 76 69 73 69 6f 6e 20 63 68 61 ort revision cha
05c0: 6e 67 65 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 ngesets</td>..<t
05d0: 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e d>Ok</td>..</tr>
05e0: 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 42 72 65 61 ..<tr>..<td>Brea
05f0: 6b 53 79 6d 43 73 65 74 43 79 63 6c 65 73 3c 2f kSymCsetCycles</
0600: 74 64 3e 0d 0a 3c 74 64 3e 42 72 65 61 6b 20 63 td>..<td>Break c
0610: 79 63 6c 65 73 20 61 6d 6f 6e 67 20 73 79 6d 62 ycles among symb
0620: 6f 6c 20 63 68 61 6e 67 65 73 65 74 73 3c 2f 74 ol changesets</t
0630: 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 3e 0d d>..<td>Ok</td>.
0640: 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 .</tr>..<tr>..<t
0650: 64 3e 42 72 65 61 6b 41 6c 6c 43 73 65 74 43 79 d>BreakAllCsetCy
0660: 63 6c 65 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 42 cles</td>..<td>B
0670: 72 65 61 6b 20 63 79 63 6c 65 73 20 6f 76 65 72 reak cycles over
0680: 20 61 6c 6c 20 63 68 61 6e 67 65 73 65 74 73 3c all changesets<
0690: 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 2e 20 28 41 /td>..<td>Ok. (A
06a0: 63 63 65 70 74 69 6e 67 20 74 68 61 74 20 69 74 ccepting that it
06b0: 20 6d 61 79 20 73 74 69 6c 6c 20 63 68 61 6e 67 may still chang
06c0: 65 20 74 68 65 20 6f 72 64 65 72 20 6f 66 20 72 e the order of r
06d0: 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 evision changese
06e0: 74 73 20 6f 76 65 72 20 74 68 65 20 72 65 73 75 ts over the resu
06f0: 6c 74 20 6f 66 20 70 61 73 73 20 37 29 2e 3c 2f lt of pass 7).</
0700: 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e td>..</tr>..<tr>
0710: 0d 0a 3c 74 64 3e 41 6c 6c 54 6f 70 6f 6c 6f 67 ..<td>AllTopolog
0720: 69 63 61 6c 6c 53 6f 72 74 3c 2f 74 64 3e 0d 0a icallSort</td>..
0730: 3c 74 64 3e 54 6f 70 6f 6c 6f 67 69 63 61 6c 6c <td>Topologicall
0740: 79 20 73 6f 72 74 20 61 6c 6c 20 63 68 61 6e 67 y sort all chang
0750: 65 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e esets</td>..<td>
0760: 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a Ok</td>..</tr>..
0770: 3c 74 72 3e 0d 0a 3c 74 64 3e 49 6d 70 6f 72 74 <tr>..<td>Import
0780: 46 69 6c 65 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e Files</td>..<td>
0790: 49 6d 70 6f 72 74 20 66 69 6c 65 73 3c 2f 74 64 Import files</td
07a0: 3e 0d 0a 3c 74 64 3e 4f 6b 2e 3c 2f 74 64 3e 0d >..<td>Ok.</td>.
07b0: 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 .</tr>..<tr>..<t
07c0: 64 3e 49 6d 70 6f 72 74 43 53 65 74 73 3c 2f 74 d>ImportCSets</t
07d0: 64 3e 0d 0a 3c 74 64 3e 49 6d 70 6f 72 74 20 63 d>..<td>Import c
07e0: 68 61 6e 67 65 73 65 74 73 3c 2f 74 64 3e 0d 0a hangesets</td>..
07f0: 3c 74 64 3e 4f 6b 2e 3c 2f 74 64 3e 0d 0a 3c 2f <td>Ok.</td>..</
0800: 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 49 tr>..<tr>..<td>I
0810: 6d 70 6f 72 74 46 69 6e 61 6c 3c 2f 74 64 3e 0d mportFinal</td>.
0820: 0a 3c 74 64 3e 49 6d 70 6f 72 74 20 66 69 6e 61 .<td>Import fina
0830: 6c 69 7a 61 74 69 6f 6e 20 28 66 6f 73 73 69 6c lization (fossil
0840: 20 72 65 62 75 69 6c 64 29 3c 2f 74 64 3e 0d 0a rebuild)</td>..
0850: 3c 74 64 3e 4f 6b 2e 3c 2f 74 64 3e 0d 0a 3c 2f <td>Ok.</td>..</
0860: 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c tr>..</table>..<
0870: 2f 70 3e 0d 0a 0d 0a 0d 0a 4e 6f 74 65 73 20 72 /p>......Notes r
0880: 65 67 61 72 64 69 6e 67 20 74 68 65 20 61 63 74 egarding the act
0890: 75 61 6c 20 69 6d 70 6f 72 74 3a 0d 0a 3c 75 6c ual import:..<ul
08a0: 3e 0d 0a 3c 6c 69 3e 63 76 73 32 73 76 6e 20 69 >..<li>cvs2svn i
08b0: 73 20 65 69 74 68 65 72 20 73 6c 6f 77 2c 20 6f s either slow, o
08c0: 72 20 68 75 6e 67 72 79 20 66 6f 72 20 64 69 73 r hungry for dis
08d0: 6b 73 70 61 63 65 2e 20 54 68 65 20 72 65 61 73 kspace. The reas
08e0: 6f 6e 3a 20 49 74 20 69 73 20 69 6d 70 6f 72 74 on: It is import
08f0: 69 6e 67 20 63 68 61 6e 67 65 73 65 74 20 62 79 ing changeset by
0900: 20 63 68 61 6e 67 65 73 65 74 20 61 6e 64 20 73 changeset and s
0910: 6f 20 68 61 73 20 74 6f 20 65 69 74 68 65 72 20 o has to either
0920: 72 65 67 65 6e 65 72 61 74 65 20 74 68 65 20 6e regenerate the n
0930: 65 65 64 65 64 20 72 65 76 69 73 69 6f 6e 73 20 eeded revisions
0940: 6f 66 20 74 68 65 20 66 69 6c 65 73 20 6f 6e 2d of the files on-
0950: 64 65 6d 61 6e 64 20 6f 76 65 72 20 61 6e 64 20 demand over and
0960: 6f 76 65 72 2c 20 6f 72 20 69 74 20 63 61 63 68 over, or it cach
0970: 65 73 20 74 68 65 20 6e 65 65 64 65 64 20 72 65 es the needed re
0980: 76 69 73 69 6f 6e 73 20 77 68 65 6e 20 63 72 65 visions when cre
0990: 61 74 65 64 20 75 6e 74 69 6c 20 74 68 65 20 6c ated until the l
09a0: 61 73 74 20 75 73 65 72 20 69 73 20 67 6f 6e 65 ast user is gone
09b0: 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 57 65 ...</li>..<li>We
09c0: 20 63 61 6e 20 64 6f 20 62 65 74 74 65 72 2c 20 can do better,
09d0: 69 66 20 77 65 20 67 65 74 20 68 65 6c 70 20 66 if we get help f
09e0: 72 6f 6d 20 66 6f 73 73 69 6c 2e 20 57 65 20 77 rom fossil. We w
09f0: 6f 75 6c 64 20 6e 65 65 64 20 63 6f 6d 6d 61 6e ould need comman
0a00: 64 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 ds to perform th
0a10: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 63 74 69 e following acti
0a20: 6f 6e 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e ons:..<ul>..<li>
0a30: 20 49 6d 70 6f 72 74 20 61 20 66 69 6c 65 20 61 Import a file a
0a40: 73 20 62 6c 6f 62 2c 20 72 65 74 75 72 6e 20 69 s blob, return i
0a50: 74 73 20 69 6e 74 65 72 6e 61 6c 20 69 64 2e 0d ts internal id..
0a60: 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 20 44 65 6c .</li>..<li> Del
0a70: 74 69 66 79 20 61 20 6b 6e 6f 77 6e 20 66 69 6c tify a known fil
0a80: 65 20 72 65 73 70 65 63 74 69 76 65 20 74 6f 20 e respective to
0a90: 61 20 73 65 63 6f 6e 64 20 6b 6e 6f 77 6e 20 66 a second known f
0aa0: 69 6c 65 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 ile...</li>..<li
0ab0: 3e 20 47 65 6e 65 72 61 74 65 20 61 20 6d 61 6e > Generate a man
0ac0: 69 66 65 73 74 20 66 69 6c 65 20 66 6f 72 20 61 ifest file for a
0ad0: 20 6c 69 73 74 20 6f 66 20 66 69 6c 65 73 20 28 list of files (
0ae0: 70 61 74 68 73 2c 20 69 64 73 29 2c 20 70 61 72 paths, ids), par
0af0: 65 6e 74 20 6d 61 6e 69 66 65 73 74 20 72 65 66 ent manifest ref
0b00: 65 72 65 6e 63 65 73 2c 20 75 73 65 72 2c 20 74 erences, user, t
0b10: 69 6d 65 73 74 61 6d 70 2c 20 6c 6f 67 20 6d 65 imestamp, log me
0b20: 73 73 61 67 65 2e 20 43 6f 75 6c 64 20 62 65 20 ssage. Could be
0b30: 73 69 67 6e 65 64 20 6f 72 20 6e 6f 74 2e 0d 0a signed or not...
0b40: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 62 </li>..</ul>..<b
0b50: 72 3e 0d 0a 57 69 74 68 20 74 68 65 73 65 20 61 r>..With these a
0b60: 63 74 69 6f 6e 73 20 28 70 6f 73 73 69 62 6c 79 ctions (possibly
0b70: 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 29 in combination)
0b80: 20 77 65 20 63 61 6e 20 69 6d 70 6f 72 74 20 74 we can import t
0b90: 68 65 20 61 72 63 68 69 76 65 20 66 69 6c 65 73 he archive files
0ba0: 20 66 69 72 73 74 2c 20 6e 65 65 64 69 6e 67 20 first, needing
0bb0: 6f 6e 6c 79 20 73 70 61 63 65 20 66 6f 72 20 74 only space for t
0bc0: 68 65 20 72 65 76 69 73 69 6f 6e 73 20 6f 66 20 he revisions of
0bd0: 61 20 73 69 6e 67 6c 65 20 66 69 6c 65 20 28 62 a single file (b
0be0: 6f 75 6e 64 65 64 20 62 79 20 74 68 65 20 6c 61 ounded by the la
0bf0: 72 67 65 73 74 20 66 69 6c 65 20 69 6e 20 74 65 rgest file in te
0c00: 72 6d 73 20 6f 66 20 73 69 7a 65 20 61 6e 64 20 rms of size and
0c10: 68 69 73 74 6f 72 79 29 2c 20 77 69 74 68 20 74 history), with t
0c20: 68 65 69 72 20 64 65 6c 74 61 2d 6c 69 6e 6b 73 heir delta-links
0c30: 20 6d 69 72 72 6f 72 69 6e 67 20 74 68 65 20 52 mirroring the R
0c40: 43 53 20 73 74 72 75 63 74 75 72 65 2e 20 41 66 CS structure. Af
0c50: 74 65 72 20 74 68 61 74 20 77 65 20 63 61 6e 20 ter that we can
0c60: 69 6e 64 65 70 65 6e 64 65 6e 74 6c 79 20 67 65 independently ge
0c70: 6e 65 72 61 74 65 2c 20 69 6d 70 6f 72 74 2c 20 nerate, import,
0c80: 61 6e 64 20 64 65 6c 74 69 66 79 20 74 68 65 20 and deltify the
0c90: 6d 61 6e 69 66 65 73 74 73 20 66 6f 72 20 63 68 manifests for ch
0ca0: 61 6e 67 65 73 65 74 73 2e 20 54 6f 20 66 69 6e angesets. To fin
0cb0: 61 6c 69 7a 65 20 77 65 20 73 69 6d 70 6c 79 20 alize we simply
0cc0: 27 72 65 62 75 69 6c 64 27 20 74 68 65 20 72 65 'rebuild' the re
0cd0: 70 6f 73 69 74 6f 72 79 2e 20 54 68 69 73 20 73 pository. This s
0ce0: 68 6f 75 6c 64 20 62 65 20 66 61 73 74 20 77 69 hould be fast wi
0cf0: 74 68 6f 75 74 20 6e 65 65 64 69 6e 67 20 6d 75 thout needing mu
0d00: 63 68 20 74 65 6d 70 6f 72 61 72 79 20 64 69 73 ch temporary dis
0d10: 6b 20 73 70 61 63 65 20 65 69 74 68 65 72 2e 0d k space either..
0d20: 0a 3c 62 72 3e 0d 0a 43 75 72 72 65 6e 74 6c 79 .<br>..Currently
0d30: 20 49 20 61 6d 20 74 68 69 6e 6b 69 6e 67 20 61 I am thinking a
0d40: 62 6f 75 74 20 77 61 6e 74 69 6e 67 20 61 20 63 bout wanting a c
0d50: 6f 6d 6d 61 6e 64 0d 0a 3c 70 72 65 3e 0d 0a 66 ommand..<pre>..f
0d60: 6f 73 73 69 6c 20 69 6d 70 6f 72 74 2d 66 69 6c ossil import-fil
0d70: 65 73 20 53 50 45 43 46 49 4c 45 0d 0a 3c 2f 70 es SPECFILE..</p
0d80: 72 65 3e 0d 0a 77 68 69 63 68 20 69 6d 70 6f 72 re>..which impor
0d90: 74 73 20 61 6e 64 20 64 65 6c 74 69 66 69 65 73 ts and deltifies
0da0: 20 66 69 6c 65 73 20 61 73 20 62 6c 6f 62 20 70 files as blob p
0db0: 65 72 20 74 68 65 20 53 50 45 43 46 49 4c 45 2c er the SPECFILE,
0dc0: 20 72 65 74 75 72 6e 69 6e 67 20 6f 6e 20 73 74 returning on st
0dd0: 64 6f 75 74 20 74 68 65 20 61 73 73 6f 63 69 61 dout the associa
0de0: 74 65 64 20 6f 66 20 70 61 74 68 73 20 61 6e 64 ted of paths and
0df0: 20 69 6e 74 65 72 6e 61 6c 20 69 64 73 2e 20 45 internal ids. E
0e00: 78 61 6d 70 6c 65 20 53 50 45 43 46 49 4c 45 3a xample SPECFILE:
0e10: 0d 0a 3c 70 72 65 3e 0d 0a 46 20 70 61 74 68 31 ..<pre>..F path1
0e20: 0d 0a 44 20 70 61 74 68 32 20 70 61 74 68 31 0d ..D path2 path1.
0e30: 0a 2e 2e 2e 0d 0a 3c 2f 70 72 65 3e 0d 0a 54 68 ......</pre>..Th
0e40: 65 20 27 46 27 20 63 61 72 64 20 74 65 6c 6c 73 e 'F' card tells
0e50: 20 69 74 20 74 6f 20 69 6d 70 6f 72 74 20 27 70 it to import 'p
0e60: 61 74 68 31 27 20 61 73 20 69 73 2e 20 54 68 65 ath1' as is. The
0e70: 20 27 44 27 20 63 61 72 64 20 74 68 65 6e 20 74 'D' card then t
0e80: 65 6c 6c 73 20 69 74 20 74 6f 20 69 6d 70 6f 72 ells it to impor
0e90: 74 20 27 70 61 74 68 32 27 20 61 73 20 69 73 20 t 'path2' as is
0ea0: 61 6e 64 20 74 68 65 6e 20 64 65 6c 74 69 66 79 and then deltify
0eb0: 20 27 70 61 74 68 31 27 20 69 6e 20 74 65 72 6d 'path1' in term
0ec0: 73 20 6f 66 20 27 70 61 74 68 32 27 2e 20 41 6e s of 'path2'. An
0ed0: 64 20 73 6f 20 6f 6e 2e 0d 0a 3c 62 72 3e 0d 0a d so on...<br>..
0ee0: 54 6f 20 69 6d 70 6f 72 74 20 61 6e 20 52 43 53 To import an RCS
0ef0: 20 61 72 63 68 69 76 65 20 77 65 20 6e 6f 77 20 archive we now
0f00: 6a 75 73 74 20 68 61 76 65 20 74 6f 20 67 65 6e just have to gen
0f10: 65 72 61 74 65 20 74 68 65 20 66 75 6c 6c 20 72 erate the full r
0f20: 65 76 69 73 69 6f 6e 73 20 69 6e 20 73 6f 6d 65 evisions in some
0f30: 20 74 65 6d 70 64 69 72 2c 20 74 68 65 6e 20 63 tempdir, then c
0f40: 72 65 61 74 65 20 61 20 53 50 45 43 20 73 68 6f reate a SPEC sho
0f50: 77 69 6e 67 20 74 68 65 20 64 65 6c 74 61 2d 6c wing the delta-l
0f60: 69 6e 6b 73 20 61 6e 64 20 6c 65 74 20 66 6f 73 inks and let fos
0f70: 73 69 6c 20 68 61 76 65 20 74 68 69 73 2e 20 54 sil have this. T
0f80: 68 65 20 72 65 73 75 6c 74 69 6e 67 20 69 64 73 he resulting ids
0f90: 20 74 68 65 6e 20 67 6f 20 69 6e 74 6f 20 74 68 then go into th
0fa0: 65 20 69 6d 70 6f 72 74 65 72 20 73 74 61 74 65 e importer state
0fb0: 20 66 6f 72 20 77 68 65 6e 20 77 65 20 67 65 6e for when we gen
0fc0: 65 72 61 74 65 20 74 68 65 20 6d 61 6e 69 66 65 erate the manife
0fd0: 73 74 73 2e 0d 0a 3c 62 72 3e 0d 0a 54 6f 20 69 sts...<br>..To i
0fe0: 6d 70 6f 72 74 20 6d 61 6e 69 66 65 73 74 73 20 mport manifests
0ff0: 77 65 20 6e 65 65 64 20 73 65 63 6f 6e 64 20 63 we need second c
1000: 6f 6d 6d 61 6e 64 2c 20 77 68 69 63 68 20 67 65 ommand, which ge
1010: 6e 65 72 61 74 65 73 20 69 74 20 66 72 6f 6d 20 nerates it from
1020: 63 68 61 6e 67 65 73 65 74 20 64 61 74 61 2c 20 changeset data,
1030: 61 6e 64 20 69 6d 70 6f 72 74 73 20 69 74 20 74 and imports it t
1040: 6f 6f 2e 0d 0a 3c 70 72 65 3e 0d 0a 66 6f 73 73 oo...<pre>..foss
1050: 69 6c 20 69 6d 70 6f 72 74 2d 6d 61 6e 69 66 65 il import-manife
1060: 73 74 20 75 73 65 72 20 74 69 6d 65 73 74 61 6d st user timestam
1070: 70 20 4d 45 53 53 41 47 45 46 49 4c 45 20 46 49 p MESSAGEFILE FI
1080: 4c 45 46 49 4c 45 20 70 61 72 65 6e 74 2e 2e 2e LEFILE parent...
1090: 0d 0a 3c 2f 70 72 65 3e 0d 0a 54 68 65 20 27 6d ..</pre>..The 'm
10a0: 65 73 73 61 67 65 66 69 6c 65 27 20 63 6f 6e 74 essagefile' cont
10b0: 61 69 6e 73 20 74 68 65 20 6c 6f 67 20 6d 65 73 ains the log mes
10c0: 73 61 67 65 2c 20 74 68 65 20 27 66 69 6c 65 66 sage, the 'filef
10d0: 69 6c 65 27 20 6c 69 73 74 73 20 74 68 65 20 72 ile' lists the r
10e0: 65 76 69 73 69 6f 6e 73 20 69 6e 20 74 68 65 20 evisions in the
10f0: 6d 61 6e 69 66 65 73 74 20 62 79 20 69 64 2c 20 manifest by id,
1100: 61 6e 64 20 77 69 74 68 20 70 61 74 68 20 69 6e and with path in
1110: 20 74 68 65 20 77 6f 72 6b 73 70 61 63 65 2e 20 the workspace.
1120: 54 68 65 20 70 61 72 65 6e 74 73 20 61 72 65 20 The parents are
1130: 74 68 65 20 69 64 73 20 6f 66 20 74 68 65 20 70 the ids of the p
1140: 61 72 65 6e 74 20 6d 61 6e 69 66 65 73 74 73 2e arent manifests.
1150: 20 54 68 65 20 72 65 73 75 6c 74 20 6f 66 20 74 The result of t
1160: 68 65 20 63 6f 6d 6d 61 6e 64 20 69 73 20 74 68 he command is th
1170: 65 20 69 64 20 6f 66 20 74 68 65 20 6e 65 77 20 e id of the new
1180: 6d 61 6e 69 66 65 73 74 2e 0d 0a 3c 62 72 3e 0d manifest...<br>.
1190: 0a 4e 6f 74 65 3a 20 57 65 20 68 61 76 65 20 61 .Note: We have a
11a0: 6c 72 65 61 64 79 20 63 6f 6d 6d 61 6e 64 73 20 lready commands
11b0: 66 6f 72 20 74 68 65 20 70 75 74 20 61 6e 64 20 for the put and
11c0: 64 65 6c 74 69 66 79 20 6f 70 65 72 61 74 69 6f deltify operatio
11d0: 6e 73 2c 20 61 6c 62 65 69 74 20 75 6e 64 6f 63 ns, albeit undoc
11e0: 75 6d 65 6e 74 65 64 2c 20 69 6e 20 74 68 65 20 umented, in the
11f0: 73 65 74 20 6f 66 20 74 65 73 74 20 63 6f 6d 6d set of test comm
1200: 61 6e 64 73 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 2f ands...</li>..</
1210: 75 6c 3e 0d 0a 0d 0a 4d 69 73 63 65 6c 6c 61 6e ul>....Miscellan
1220: 65 6f 75 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 eous:..<ul>..<li
1230: 3e 41 64 64 20 6f 70 74 69 6f 6e 20 74 6f 20 61 >Add option to a
1240: 6c 6c 6f 77 20 64 69 76 65 72 74 69 6e 67 20 74 llow diverting t
1250: 68 65 20 6c 6f 67 20 6f 75 74 70 75 74 20 69 6e he log output in
1260: 74 6f 20 61 20 66 69 6c 65 2c 20 65 78 63 65 70 to a file, excep
1270: 74 20 66 6f 72 20 74 68 65 20 70 72 6f 67 72 65 t for the progre
1280: 73 73 20 72 65 70 6f 72 74 69 6e 67 2e 20 52 65 ss reporting. Re
1290: 73 75 6c 74 20 69 73 20 6e 69 63 65 20 69 6e 74 sult is nice int
12a0: 65 72 61 63 74 69 76 65 20 6c 6f 67 20 2b 20 70 eractive log + p
12b0: 72 6f 67 72 65 73 73 2c 20 61 6e 64 20 61 20 28 rogress, and a (
12c0: 72 65 6c 61 74 69 76 65 6c 79 29 20 73 6d 61 6c relatively) smal
12d0: 6c 20 6c 6f 67 20 66 69 6c 65 20 77 69 74 68 6f l log file witho
12e0: 75 74 20 61 6c 6c 20 74 68 65 20 75 6e 77 61 6e ut all the unwan
12f0: 74 65 64 20 70 72 6f 67 72 65 73 73 20 6e 75 6d ted progress num
1300: 62 65 72 73 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c bers...</li>..<l
1310: 69 3e 47 6f 20 6f 76 65 72 20 74 68 65 20 53 51 i>Go over the SQ
1320: 4c 20 73 74 61 74 65 6d 65 6e 74 73 20 61 6e 64 L statements and
1330: 20 63 68 65 63 6b 20 74 68 61 74 20 74 68 65 79 check that they
1340: 20 68 61 76 65 20 67 6f 6f 64 20 71 75 65 72 79 have good query
1350: 20 70 6c 61 6e 73 0d 0a 3c 2f 6c 69 3e 0d 0a 3c plans..</li>..<
1360: 6c 69 3e 47 6f 20 6f 76 65 72 20 74 68 65 20 53 li>Go over the S
1370: 51 4c 20 73 74 61 74 65 6d 65 6e 74 73 20 61 6e QL statements an
1380: 64 20 61 64 64 20 63 6f 6d 6d 65 6e 74 73 20 77 d add comments w
1390: 68 65 72 65 20 74 68 65 79 20 61 72 65 20 6e 6f here they are no
13a0: 6e 2d 74 72 69 76 69 61 6c 2e 0d 0a 3c 2f 6c 69 n-trivial...</li
13b0: 3e 0d 0a 3c 6c 69 3e 43 75 72 72 65 6e 74 6c 79 >..<li>Currently
13c0: 20 73 6f 6d 65 20 70 61 73 73 65 73 20 74 61 6b some passes tak
13d0: 65 20 71 75 69 74 65 20 61 20 62 69 74 20 6f 66 e quite a bit of
13e0: 20 74 69 6d 65 20 77 68 65 6e 20 74 68 65 69 72 time when their
13f0: 20 61 63 74 75 61 6c 20 6f 70 65 72 61 74 69 6f actual operatio
1400: 6e 20 69 73 20 61 6c 72 65 61 64 79 20 63 6f 6d n is already com
1410: 70 6c 65 74 65 2e 20 49 74 20 73 65 65 6d 73 20 plete. It seems
1420: 74 68 61 74 20 73 71 6c 69 74 65 20 69 73 20 68 that sqlite is h
1430: 65 61 76 69 6c 79 20 77 6f 72 6b 69 6e 67 20 6f eavily working o
1440: 6e 20 63 6f 6d 6d 69 74 74 69 6e 67 20 61 20 6c n committing a l
1450: 6f 74 20 6f 66 20 63 68 61 6e 67 65 73 20 28 4d ot of changes (M
1460: 6f 73 74 20 70 61 73 73 65 73 20 61 72 65 20 77 ost passes are w
1470: 72 61 70 70 65 64 20 69 6e 74 6f 20 61 20 73 69 rapped into a si
1480: 6e 67 6c 65 20 74 72 61 6e 73 61 63 74 69 6f 6e ngle transaction
1490: 29 2e 20 43 6f 6e 73 69 64 65 72 20 77 61 79 73 ). Consider ways
14a0: 20 6f 66 20 73 70 65 65 64 69 6e 67 20 74 68 69 of speeding thi
14b0: 73 20 75 70 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 s up...<ul>..<li
14c0: 3e 44 6f 20 6f 75 72 20 6f 77 6e 20 74 72 61 6e >Do our own tran
14d0: 73 61 63 74 69 6f 6e 20 6d 61 6e 61 67 65 6d 65 saction manageme
14e0: 6e 74 3f 20 53 6f 20 74 68 61 74 20 77 65 20 63 nt? So that we c
14f0: 61 6e 20 63 6f 6d 6d 69 74 20 65 76 65 72 79 20 an commit every
1500: 58 20 63 68 61 6e 67 65 73 3f 2e 0d 0a 3c 2f 6c X changes?...</l
1510: 69 3e 0d 0a 3c 6c 69 3e 53 68 6f 75 6c 64 20 77 i>..<li>Should w
1520: 65 20 64 69 73 61 62 6c 65 20 73 79 6e 63 68 72 e disable synchr
1530: 6f 6e 6f 75 73 20 6f 70 65 72 61 74 69 6f 6e 3f onous operation?
1540: 20 54 68 65 20 73 74 61 74 65 20 64 61 74 61 62 The state datab
1550: 61 73 65 20 69 73 20 6e 6f 74 20 74 68 61 74 20 ase is not that
1560: 63 72 69 74 69 63 61 6c 2c 20 69 2e 65 2e 20 69 critical, i.e. i
1570: 74 20 63 61 6e 20 61 6c 77 61 79 73 20 62 65 20 t can always be
1580: 72 65 67 65 6e 65 72 61 74 65 64 2e 20 4f 6e 20 regenerated. On
1590: 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 2c 20 the other hand,
15a0: 62 65 69 6e 67 20 61 62 6c 65 20 74 6f 20 62 65 being able to be
15b0: 20 73 75 72 65 20 74 68 61 74 20 77 65 20 63 61 sure that we ca
15c0: 6e 20 72 65 73 74 61 72 74 20 66 72 6f 6d 20 74 n restart from t
15d0: 68 65 20 69 6e 74 65 72 72 75 70 74 65 64 20 70 he interrupted p
15e0: 61 73 73 20 69 73 20 6e 69 63 65 2c 20 61 6e 64 ass is nice, and
15f0: 20 6e 6f 74 20 70 6f 73 73 69 62 6c 65 20 69 66 not possible if
1600: 20 77 65 20 67 6f 74 20 69 74 20 63 6f 72 72 75 we got it corru
1610: 70 74 65 64 20 62 79 20 61 73 79 6e 63 68 72 6f pted by asynchro
1620: 6e 6f 75 73 20 6f 70 65 72 61 74 69 6f 6e 2e 20 nous operation.
1630: 3c 62 3e 54 61 62 6c 65 64 20 66 6f 72 20 6e 6f <b>Tabled for no
1640: 77 2c 20 74 68 69 73 20 69 73 20 6e 6f 74 20 79 w, this is not y
1650: 65 74 20 63 72 69 74 69 63 61 6c 3c 2f 62 3e 0d et critical</b>.
1660: 0a 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c .</li>..</ul>..<
1670: 2f 75 6c 3e 0d 0a 0a 5a 20 37 37 39 66 37 35 38 /ul>...Z 779f758
1680: 38 65 63 38 63 65 64 39 32 37 62 33 37 32 66 34 8ec8ced927b372f4
1690: 33 31 64 38 31 35 33 64 33 0a 31d8153d3.