Artifact f2c05a6ad279c0cb0c7249b9ff0cea12d9153bf6:
Wiki page
[Import CVS Repositories]
by
aku on
2008-03-14 21:06:47.
0000: 44 20 32 30 30 38 2d 30 33 2d 31 34 54 32 31 3a D 2008-03-14T21:
0010: 30 36 3a 34 37 0a 4c 20 49 6d 70 6f 72 74 5c 73 06:47.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 33 62 30 38 66 61 61 39 33 66 61 65 s.P 3b08faa93fae
0040: 65 36 34 65 37 36 35 33 34 37 36 37 36 63 34 38 e64e765347676c48
0050: 62 65 37 39 64 33 33 64 31 66 39 62 0a 55 20 61 be79d33d1f9b.U a
0060: 6b 75 0a 57 20 35 36 33 34 0a 53 70 69 72 69 74 ku.W 5634.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 50 61 73 73 ..<tr>..<td>Pass
0520: 20 42 72 65 61 6b 52 65 76 43 73 65 74 43 79 63 BreakRevCsetCyc
0530: 6c 65 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 42 72 les</td>..<td>Br
0540: 65 61 6b 20 63 79 63 6c 65 73 20 61 6d 6f 6e 67 eak cycles among
0550: 20 72 65 76 69 73 69 6f 6e 20 63 68 61 6e 67 65 revision change
0560: 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f sets</td>..<td>O
0570: 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c k</td>..</tr>..<
0580: 74 72 3e 0d 0a 3c 74 64 3e 52 65 76 54 6f 70 6f tr>..<td>RevTopo
0590: 6c 6f 67 69 63 61 6c 53 6f 72 74 3c 2f 74 64 3e logicalSort</td>
05a0: 0d 0a 3c 74 64 3e 54 6f 70 6f 6c 6f 67 69 63 61 ..<td>Topologica
05b0: 6c 6c 79 20 73 6f 72 74 20 72 65 76 69 73 69 6f lly sort revisio
05c0: 6e 20 63 68 61 6e 67 65 73 65 74 73 3c 2f 74 64 n changesets</td
05d0: 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a >..<td>Ok</td>..
05e0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 </tr>..<tr>..<td
05f0: 3e 42 72 65 61 6b 53 79 6d 43 73 65 74 43 79 63 >BreakSymCsetCyc
0600: 6c 65 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 42 72 les</td>..<td>Br
0610: 65 61 6b 20 63 79 63 6c 65 73 20 61 6d 6f 6e 67 eak cycles among
0620: 20 73 79 6d 62 6f 6c 20 63 68 61 6e 67 65 73 65 symbol changese
0630: 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c ts</td>..<td>Ok<
0640: 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 /td>..</tr>..<tr
0650: 3e 0d 0a 3c 74 64 3e 42 72 65 61 6b 41 6c 6c 43 >..<td>BreakAllC
0660: 73 65 74 43 79 63 6c 65 73 3c 2f 74 64 3e 0d 0a setCycles</td>..
0670: 3c 74 64 3e 42 72 65 61 6b 20 63 79 63 6c 65 73 <td>Break cycles
0680: 20 6f 76 65 72 20 61 6c 6c 20 63 68 61 6e 67 65 over all change
0690: 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f sets</td>..<td>O
06a0: 6b 2e 20 28 41 63 63 65 70 74 69 6e 67 20 74 68 k. (Accepting th
06b0: 61 74 20 69 74 20 6d 61 79 20 73 74 69 6c 6c 20 at it may still
06c0: 63 68 61 6e 67 65 20 74 68 65 20 6f 72 64 65 72 change the order
06d0: 20 6f 66 20 72 65 76 69 73 69 6f 6e 20 63 68 61 of revision cha
06e0: 6e 67 65 73 65 74 73 20 6f 76 65 72 20 74 68 65 ngesets over the
06f0: 20 72 65 73 75 6c 74 20 6f 66 20 70 61 73 73 20 result of pass
0700: 37 29 2e 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 7).</td>..</tr>.
0710: 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 41 6c 6c 54 6f .<tr>..<td>AllTo
0720: 70 6f 6c 6f 67 69 63 61 6c 6c 53 6f 72 74 3c 2f pologicallSort</
0730: 74 64 3e 0d 0a 3c 74 64 3e 54 6f 70 6f 6c 6f 67 td>..<td>Topolog
0740: 69 63 61 6c 6c 79 20 73 6f 72 74 20 61 6c 6c 20 ically sort all
0750: 63 68 61 6e 67 65 73 65 74 73 3c 2f 74 64 3e 0d changesets</td>.
0760: 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f .<td>Ok</td>..</
0770: 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 49 tr>..<tr>..<td>I
0780: 6d 70 6f 72 74 3c 2f 74 64 3e 0d 0a 3c 74 64 3e mport</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 3c 2f 74 64 3e 0d 0a 3c d>Import</td>..<
07d0: 74 64 3e 49 6d 70 6f 72 74 20 63 68 61 6e 67 65 td>Import change
07e0: 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f sets</td>..<td>O
07f0: 6b 2e 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a k.</td>..</tr>..
0800: 3c 74 72 3e 0d 0a 3c 74 64 3e 49 6d 70 6f 72 74 <tr>..<td>Import
0810: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 49 6d 70 6f 72 </td>..<td>Impor
0820: 74 20 66 69 6e 61 6c 69 7a 61 74 69 6f 6e 20 28 t finalization (
0830: 66 6f 73 73 69 6c 20 72 65 62 75 69 6c 64 29 3c fossil rebuild)<
0840: 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 2e 3c 2f 74 /td>..<td>Ok.</t
0850: 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 d>..</tr>..</tab
0860: 6c 65 3e 0d 0a 3c 2f 70 3e 0d 0a 0d 0a 0d 0a 4e le>..</p>......N
0870: 6f 74 65 73 20 72 65 67 61 72 64 69 6e 67 20 74 otes regarding t
0880: 68 65 20 61 63 74 75 61 6c 20 69 6d 70 6f 72 74 he actual import
0890: 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 63 76 73 :..<ul>..<li>cvs
08a0: 32 73 76 6e 20 69 73 20 65 69 74 68 65 72 20 73 2svn is either s
08b0: 6c 6f 77 2c 20 6f 72 20 68 75 6e 67 72 79 20 66 low, or hungry f
08c0: 6f 72 20 64 69 73 6b 73 70 61 63 65 2e 20 54 68 or diskspace. Th
08d0: 65 20 72 65 61 73 6f 6e 3a 20 49 74 20 69 73 20 e reason: It is
08e0: 69 6d 70 6f 72 74 69 6e 67 20 63 68 61 6e 67 65 importing change
08f0: 73 65 74 20 62 79 20 63 68 61 6e 67 65 73 65 74 set by changeset
0900: 20 61 6e 64 20 73 6f 20 68 61 73 20 74 6f 20 65 and so has to e
0910: 69 74 68 65 72 20 72 65 67 65 6e 65 72 61 74 65 ither regenerate
0920: 20 74 68 65 20 6e 65 65 64 65 64 20 72 65 76 69 the needed revi
0930: 73 69 6f 6e 73 20 6f 66 20 74 68 65 20 66 69 6c sions of the fil
0940: 65 73 20 6f 6e 2d 64 65 6d 61 6e 64 20 6f 76 65 es on-demand ove
0950: 72 20 61 6e 64 20 6f 76 65 72 2c 20 6f 72 20 69 r and over, or i
0960: 74 20 63 61 63 68 65 73 20 74 68 65 20 6e 65 65 t caches the nee
0970: 64 65 64 20 72 65 76 69 73 69 6f 6e 73 20 77 68 ded revisions wh
0980: 65 6e 20 63 72 65 61 74 65 64 20 75 6e 74 69 6c en created until
0990: 20 74 68 65 20 6c 61 73 74 20 75 73 65 72 20 69 the last user i
09a0: 73 20 67 6f 6e 65 2e 0d 0a 3c 2f 6c 69 3e 0d 0a s gone...</li>..
09b0: 3c 6c 69 3e 57 65 20 63 61 6e 20 64 6f 20 62 65 <li>We can do be
09c0: 74 74 65 72 2c 20 69 66 20 77 65 20 67 65 74 20 tter, if we get
09d0: 68 65 6c 70 20 66 72 6f 6d 20 66 6f 73 73 69 6c help from fossil
09e0: 2e 20 57 65 20 77 6f 75 6c 64 20 6e 65 65 64 20 . We would need
09f0: 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 70 65 72 66 commands to perf
0a00: 6f 72 6d 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e orm the followin
0a10: 67 20 61 63 74 69 6f 6e 73 3a 0d 0a 3c 75 6c 3e g actions:..<ul>
0a20: 0d 0a 3c 6c 69 3e 20 49 6d 70 6f 72 74 20 61 20 ..<li> Import a
0a30: 66 69 6c 65 20 61 73 20 62 6c 6f 62 2c 20 72 65 file as blob, re
0a40: 74 75 72 6e 20 69 74 73 20 69 6e 74 65 72 6e 61 turn its interna
0a50: 6c 20 69 64 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c l id...</li>..<l
0a60: 69 3e 20 44 65 6c 74 69 66 79 20 61 20 6b 6e 6f i> Deltify a kno
0a70: 77 6e 20 66 69 6c 65 20 72 65 73 70 65 63 74 69 wn file respecti
0a80: 76 65 20 74 6f 20 61 20 73 65 63 6f 6e 64 20 6b ve to a second k
0a90: 6e 6f 77 6e 20 66 69 6c 65 2e 0d 0a 3c 2f 6c 69 nown file...</li
0aa0: 3e 0d 0a 3c 6c 69 3e 20 47 65 6e 65 72 61 74 65 >..<li> Generate
0ab0: 20 61 20 6d 61 6e 69 66 65 73 74 20 66 69 6c 65 a manifest file
0ac0: 20 66 6f 72 20 61 20 6c 69 73 74 20 6f 66 20 66 for a list of f
0ad0: 69 6c 65 73 20 28 70 61 74 68 73 2c 20 69 64 73 iles (paths, ids
0ae0: 29 2c 20 70 61 72 65 6e 74 20 6d 61 6e 69 66 65 ), parent manife
0af0: 73 74 20 72 65 66 65 72 65 6e 63 65 73 2c 20 75 st references, u
0b00: 73 65 72 2c 20 74 69 6d 65 73 74 61 6d 70 2c 20 ser, timestamp,
0b10: 6c 6f 67 20 6d 65 73 73 61 67 65 2e 20 43 6f 75 log message. Cou
0b20: 6c 64 20 62 65 20 73 69 67 6e 65 64 20 6f 72 20 ld be signed or
0b30: 6e 6f 74 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 2f 75 not...</li>..</u
0b40: 6c 3e 0d 0a 3c 62 72 3e 0d 0a 57 69 74 68 20 74 l>..<br>..With t
0b50: 68 65 73 65 20 61 63 74 69 6f 6e 73 20 28 70 6f hese actions (po
0b60: 73 73 69 62 6c 79 20 69 6e 20 63 6f 6d 62 69 6e ssibly in combin
0b70: 61 74 69 6f 6e 29 20 77 65 20 63 61 6e 20 69 6d ation) we can im
0b80: 70 6f 72 74 20 74 68 65 20 61 72 63 68 69 76 65 port the archive
0b90: 20 66 69 6c 65 73 20 66 69 72 73 74 2c 20 6e 65 files first, ne
0ba0: 65 64 69 6e 67 20 6f 6e 6c 79 20 73 70 61 63 65 eding only space
0bb0: 20 66 6f 72 20 74 68 65 20 72 65 76 69 73 69 6f for the revisio
0bc0: 6e 73 20 6f 66 20 61 20 73 69 6e 67 6c 65 20 66 ns of a single f
0bd0: 69 6c 65 20 28 62 6f 75 6e 64 65 64 20 62 79 20 ile (bounded by
0be0: 74 68 65 20 6c 61 72 67 65 73 74 20 66 69 6c 65 the largest file
0bf0: 20 69 6e 20 74 65 72 6d 73 20 6f 66 20 73 69 7a in terms of siz
0c00: 65 20 61 6e 64 20 68 69 73 74 6f 72 79 29 2c 20 e and history),
0c10: 77 69 74 68 20 74 68 65 69 72 20 64 65 6c 74 61 with their delta
0c20: 2d 6c 69 6e 6b 73 20 6d 69 72 72 6f 72 69 6e 67 -links mirroring
0c30: 20 74 68 65 20 52 43 53 20 73 74 72 75 63 74 75 the RCS structu
0c40: 72 65 2e 20 41 66 74 65 72 20 74 68 61 74 20 77 re. After that w
0c50: 65 20 63 61 6e 20 69 6e 64 65 70 65 6e 64 65 6e e can independen
0c60: 74 6c 79 20 67 65 6e 65 72 61 74 65 2c 20 69 6d tly generate, im
0c70: 70 6f 72 74 2c 20 61 6e 64 20 64 65 6c 74 69 66 port, and deltif
0c80: 79 20 74 68 65 20 6d 61 6e 69 66 65 73 74 73 20 y the manifests
0c90: 66 6f 72 20 63 68 61 6e 67 65 73 65 74 73 2e 20 for changesets.
0ca0: 54 6f 20 66 69 6e 61 6c 69 7a 65 20 77 65 20 73 To finalize we s
0cb0: 69 6d 70 6c 79 20 27 72 65 62 75 69 6c 64 27 20 imply 'rebuild'
0cc0: 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 2e 20 the repository.
0cd0: 54 68 69 73 20 73 68 6f 75 6c 64 20 62 65 20 66 This should be f
0ce0: 61 73 74 20 77 69 74 68 6f 75 74 20 6e 65 65 64 ast without need
0cf0: 69 6e 67 20 6d 75 63 68 20 74 65 6d 70 6f 72 61 ing much tempora
0d00: 72 79 20 64 69 73 6b 20 73 70 61 63 65 20 65 69 ry disk space ei
0d10: 74 68 65 72 2e 0d 0a 3c 62 72 3e 0d 0a 43 75 72 ther...<br>..Cur
0d20: 72 65 6e 74 6c 79 20 49 20 61 6d 20 74 68 69 6e rently I am thin
0d30: 6b 69 6e 67 20 61 62 6f 75 74 20 77 61 6e 74 69 king about wanti
0d40: 6e 67 20 61 20 63 6f 6d 6d 61 6e 64 0d 0a 3c 70 ng a command..<p
0d50: 72 65 3e 0d 0a 66 6f 73 73 69 6c 20 69 6d 70 6f re>..fossil impo
0d60: 72 74 2d 66 69 6c 65 73 20 53 50 45 43 46 49 4c rt-files SPECFIL
0d70: 45 0d 0a 3c 2f 70 72 65 3e 0d 0a 77 68 69 63 68 E..</pre>..which
0d80: 20 69 6d 70 6f 72 74 73 20 61 6e 64 20 64 65 6c imports and del
0d90: 74 69 66 69 65 73 20 66 69 6c 65 73 20 61 73 20 tifies files as
0da0: 62 6c 6f 62 20 70 65 72 20 74 68 65 20 53 50 45 blob per the SPE
0db0: 43 46 49 4c 45 2c 20 72 65 74 75 72 6e 69 6e 67 CFILE, returning
0dc0: 20 6f 6e 20 73 74 64 6f 75 74 20 74 68 65 20 61 on stdout the a
0dd0: 73 73 6f 63 69 61 74 65 64 20 6f 66 20 70 61 74 ssociated of pat
0de0: 68 73 20 61 6e 64 20 69 6e 74 65 72 6e 61 6c 20 hs and internal
0df0: 69 64 73 2e 20 45 78 61 6d 70 6c 65 20 53 50 45 ids. Example SPE
0e00: 43 46 49 4c 45 3a 0d 0a 3c 70 72 65 3e 0d 0a 46 CFILE:..<pre>..F
0e10: 20 70 61 74 68 31 0d 0a 44 20 70 61 74 68 32 20 path1..D path2
0e20: 70 61 74 68 31 0d 0a 2e 2e 2e 0d 0a 3c 2f 70 72 path1.......</pr
0e30: 65 3e 0d 0a 54 68 65 20 27 46 27 20 63 61 72 64 e>..The 'F' card
0e40: 20 74 65 6c 6c 73 20 69 74 20 74 6f 20 69 6d 70 tells it to imp
0e50: 6f 72 74 20 27 70 61 74 68 31 27 20 61 73 20 69 ort 'path1' as i
0e60: 73 2e 20 54 68 65 20 27 44 27 20 63 61 72 64 20 s. The 'D' card
0e70: 74 68 65 6e 20 74 65 6c 6c 73 20 69 74 20 74 6f then tells it to
0e80: 20 69 6d 70 6f 72 74 20 27 70 61 74 68 32 27 20 import 'path2'
0e90: 61 73 20 69 73 20 61 6e 64 20 74 68 65 6e 20 64 as is and then d
0ea0: 65 6c 74 69 66 79 20 27 70 61 74 68 31 27 20 69 eltify 'path1' i
0eb0: 6e 20 74 65 72 6d 73 20 6f 66 20 27 70 61 74 68 n terms of 'path
0ec0: 32 27 2e 20 41 6e 64 20 73 6f 20 6f 6e 2e 0d 0a 2'. And so on...
0ed0: 3c 62 72 3e 0d 0a 54 6f 20 69 6d 70 6f 72 74 20 <br>..To import
0ee0: 61 6e 20 52 43 53 20 61 72 63 68 69 76 65 20 77 an RCS archive w
0ef0: 65 20 6e 6f 77 20 6a 75 73 74 20 68 61 76 65 20 e now just have
0f00: 74 6f 20 67 65 6e 65 72 61 74 65 20 74 68 65 20 to generate the
0f10: 66 75 6c 6c 20 72 65 76 69 73 69 6f 6e 73 20 69 full revisions i
0f20: 6e 20 73 6f 6d 65 20 74 65 6d 70 64 69 72 2c 20 n some tempdir,
0f30: 74 68 65 6e 20 63 72 65 61 74 65 20 61 20 53 50 then create a SP
0f40: 45 43 20 73 68 6f 77 69 6e 67 20 74 68 65 20 64 EC showing the d
0f50: 65 6c 74 61 2d 6c 69 6e 6b 73 20 61 6e 64 20 6c elta-links and l
0f60: 65 74 20 66 6f 73 73 69 6c 20 68 61 76 65 20 74 et fossil have t
0f70: 68 69 73 2e 20 54 68 65 20 72 65 73 75 6c 74 69 his. The resulti
0f80: 6e 67 20 69 64 73 20 74 68 65 6e 20 67 6f 20 69 ng ids then go i
0f90: 6e 74 6f 20 74 68 65 20 69 6d 70 6f 72 74 65 72 nto the importer
0fa0: 20 73 74 61 74 65 20 66 6f 72 20 77 68 65 6e 20 state for when
0fb0: 77 65 20 67 65 6e 65 72 61 74 65 20 74 68 65 20 we generate the
0fc0: 6d 61 6e 69 66 65 73 74 73 2e 0d 0a 3c 62 72 3e manifests...<br>
0fd0: 0d 0a 54 6f 20 69 6d 70 6f 72 74 20 6d 61 6e 69 ..To import mani
0fe0: 66 65 73 74 73 20 77 65 20 6e 65 65 64 20 73 65 fests we need se
0ff0: 63 6f 6e 64 20 63 6f 6d 6d 61 6e 64 2c 20 77 68 cond command, wh
1000: 69 63 68 20 67 65 6e 65 72 61 74 65 73 20 69 74 ich generates it
1010: 20 66 72 6f 6d 20 63 68 61 6e 67 65 73 65 74 20 from changeset
1020: 64 61 74 61 2c 20 61 6e 64 20 69 6d 70 6f 72 74 data, and import
1030: 73 20 69 74 20 74 6f 6f 2e 0d 0a 3c 70 72 65 3e s it too...<pre>
1040: 0d 0a 66 6f 73 73 69 6c 20 69 6d 70 6f 72 74 2d ..fossil import-
1050: 6d 61 6e 69 66 65 73 74 20 75 73 65 72 20 74 69 manifest user ti
1060: 6d 65 73 74 61 6d 70 20 4d 45 53 53 41 47 45 46 mestamp MESSAGEF
1070: 49 4c 45 20 46 49 4c 45 46 49 4c 45 20 70 61 72 ILE FILEFILE par
1080: 65 6e 74 2e 2e 2e 0d 0a 3c 2f 70 72 65 3e 0d 0a ent.....</pre>..
1090: 54 68 65 20 27 6d 65 73 73 61 67 65 66 69 6c 65 The 'messagefile
10a0: 27 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 6c ' contains the l
10b0: 6f 67 20 6d 65 73 73 61 67 65 2c 20 74 68 65 20 og message, the
10c0: 27 66 69 6c 65 66 69 6c 65 27 20 6c 69 73 74 73 'filefile' lists
10d0: 20 74 68 65 20 72 65 76 69 73 69 6f 6e 73 20 69 the revisions i
10e0: 6e 20 74 68 65 20 6d 61 6e 69 66 65 73 74 20 62 n the manifest b
10f0: 79 20 69 64 2c 20 61 6e 64 20 77 69 74 68 20 70 y id, and with p
1100: 61 74 68 20 69 6e 20 74 68 65 20 77 6f 72 6b 73 ath in the works
1110: 70 61 63 65 2e 20 54 68 65 20 70 61 72 65 6e 74 pace. The parent
1120: 73 20 61 72 65 20 74 68 65 20 69 64 73 20 6f 66 s are the ids of
1130: 20 74 68 65 20 70 61 72 65 6e 74 20 6d 61 6e 69 the parent mani
1140: 66 65 73 74 73 2e 20 54 68 65 20 72 65 73 75 6c fests. The resul
1150: 74 20 6f 66 20 74 68 65 20 63 6f 6d 6d 61 6e 64 t of the command
1160: 20 69 73 20 74 68 65 20 69 64 20 6f 66 20 74 68 is the id of th
1170: 65 20 6e 65 77 20 6d 61 6e 69 66 65 73 74 2e 0d e new manifest..
1180: 0a 3c 62 72 3e 0d 0a 4e 6f 74 65 3a 20 57 65 20 .<br>..Note: We
1190: 68 61 76 65 20 61 6c 72 65 61 64 79 20 63 6f 6d have already com
11a0: 6d 61 6e 64 73 20 66 6f 72 20 74 68 65 20 70 75 mands for the pu
11b0: 74 20 61 6e 64 20 64 65 6c 74 69 66 79 20 6f 70 t and deltify op
11c0: 65 72 61 74 69 6f 6e 73 2c 20 61 6c 62 65 69 74 erations, albeit
11d0: 20 75 6e 64 6f 63 75 6d 65 6e 74 65 64 2c 20 69 undocumented, i
11e0: 6e 20 74 68 65 20 73 65 74 20 6f 66 20 74 65 73 n the set of tes
11f0: 74 20 63 6f 6d 6d 61 6e 64 73 2e 0d 0a 3c 2f 6c t commands...</l
1200: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 0d 0a 4d 69 73 i>..</ul>....Mis
1210: 63 65 6c 6c 61 6e 65 6f 75 73 3a 0d 0a 3c 75 6c cellaneous:..<ul
1220: 3e 0d 0a 3c 6c 69 3e 41 64 64 20 6f 70 74 69 6f >..<li>Add optio
1230: 6e 20 74 6f 20 61 6c 6c 6f 77 20 64 69 76 65 72 n to allow diver
1240: 74 69 6e 67 20 74 68 65 20 6c 6f 67 20 6f 75 74 ting the log out
1250: 70 75 74 20 69 6e 74 6f 20 61 20 66 69 6c 65 2c put into a file,
1260: 20 65 78 63 65 70 74 20 66 6f 72 20 74 68 65 20 except for the
1270: 70 72 6f 67 72 65 73 73 20 72 65 70 6f 72 74 69 progress reporti
1280: 6e 67 2e 20 52 65 73 75 6c 74 20 69 73 20 6e 69 ng. Result is ni
1290: 63 65 20 69 6e 74 65 72 61 63 74 69 76 65 20 6c ce interactive l
12a0: 6f 67 20 2b 20 70 72 6f 67 72 65 73 73 2c 20 61 og + progress, a
12b0: 6e 64 20 61 20 28 72 65 6c 61 74 69 76 65 6c 79 nd a (relatively
12c0: 29 20 73 6d 61 6c 6c 20 6c 6f 67 20 66 69 6c 65 ) small log file
12d0: 20 77 69 74 68 6f 75 74 20 61 6c 6c 20 74 68 65 without all the
12e0: 20 75 6e 77 61 6e 74 65 64 20 70 72 6f 67 72 65 unwanted progre
12f0: 73 73 20 6e 75 6d 62 65 72 73 2e 0d 0a 3c 2f 6c ss numbers...</l
1300: 69 3e 0d 0a 3c 6c 69 3e 47 6f 20 6f 76 65 72 20 i>..<li>Go over
1310: 74 68 65 20 53 51 4c 20 73 74 61 74 65 6d 65 6e the SQL statemen
1320: 74 73 20 61 6e 64 20 63 68 65 63 6b 20 74 68 61 ts and check tha
1330: 74 20 74 68 65 79 20 68 61 76 65 20 67 6f 6f 64 t they have good
1340: 20 71 75 65 72 79 20 70 6c 61 6e 73 0d 0a 3c 2f query plans..</
1350: 6c 69 3e 0d 0a 3c 6c 69 3e 47 6f 20 6f 76 65 72 li>..<li>Go over
1360: 20 74 68 65 20 53 51 4c 20 73 74 61 74 65 6d 65 the SQL stateme
1370: 6e 74 73 20 61 6e 64 20 61 64 64 20 63 6f 6d 6d nts and add comm
1380: 65 6e 74 73 20 77 68 65 72 65 20 74 68 65 79 20 ents where they
1390: 61 72 65 20 6e 6f 6e 2d 74 72 69 76 69 61 6c 2e are non-trivial.
13a0: 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 43 75 72 ..</li>..<li>Cur
13b0: 72 65 6e 74 6c 79 20 73 6f 6d 65 20 70 61 73 73 rently some pass
13c0: 65 73 20 74 61 6b 65 20 71 75 69 74 65 20 61 20 es take quite a
13d0: 62 69 74 20 6f 66 20 74 69 6d 65 20 77 68 65 6e bit of time when
13e0: 20 74 68 65 69 72 20 61 63 74 75 61 6c 20 6f 70 their actual op
13f0: 65 72 61 74 69 6f 6e 20 69 73 20 61 6c 72 65 61 eration is alrea
1400: 64 79 20 63 6f 6d 70 6c 65 74 65 2e 20 49 74 20 dy complete. It
1410: 73 65 65 6d 73 20 74 68 61 74 20 73 71 6c 69 74 seems that sqlit
1420: 65 20 69 73 20 68 65 61 76 69 6c 79 20 77 6f 72 e is heavily wor
1430: 6b 69 6e 67 20 6f 6e 20 63 6f 6d 6d 69 74 74 69 king on committi
1440: 6e 67 20 61 20 6c 6f 74 20 6f 66 20 63 68 61 6e ng a lot of chan
1450: 67 65 73 20 28 4d 6f 73 74 20 70 61 73 73 65 73 ges (Most passes
1460: 20 61 72 65 20 77 72 61 70 70 65 64 20 69 6e 74 are wrapped int
1470: 6f 20 61 20 73 69 6e 67 6c 65 20 74 72 61 6e 73 o a single trans
1480: 61 63 74 69 6f 6e 29 2e 20 43 6f 6e 73 69 64 65 action). Conside
1490: 72 20 77 61 79 73 20 6f 66 20 73 70 65 65 64 69 r ways of speedi
14a0: 6e 67 20 74 68 69 73 20 75 70 2e 0d 0a 3c 75 6c ng this up...<ul
14b0: 3e 0d 0a 3c 6c 69 3e 44 6f 20 6f 75 72 20 6f 77 >..<li>Do our ow
14c0: 6e 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 6d 61 n transaction ma
14d0: 6e 61 67 65 6d 65 6e 74 3f 20 53 6f 20 74 68 61 nagement? So tha
14e0: 74 20 77 65 20 63 61 6e 20 63 6f 6d 6d 69 74 20 t we can commit
14f0: 65 76 65 72 79 20 58 20 63 68 61 6e 67 65 73 3f every X changes?
1500: 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 53 68 ...</li>..<li>Sh
1510: 6f 75 6c 64 20 77 65 20 64 69 73 61 62 6c 65 20 ould we disable
1520: 73 79 6e 63 68 72 6f 6e 6f 75 73 20 6f 70 65 72 synchronous oper
1530: 61 74 69 6f 6e 3f 20 54 68 65 20 73 74 61 74 65 ation? The state
1540: 20 64 61 74 61 62 61 73 65 20 69 73 20 6e 6f 74 database is not
1550: 20 74 68 61 74 20 63 72 69 74 69 63 61 6c 2c 20 that critical,
1560: 69 2e 65 2e 20 69 74 20 63 61 6e 20 61 6c 77 61 i.e. it can alwa
1570: 79 73 20 62 65 20 72 65 67 65 6e 65 72 61 74 65 ys be regenerate
1580: 64 2e 20 4f 6e 20 74 68 65 20 6f 74 68 65 72 20 d. On the other
1590: 68 61 6e 64 2c 20 62 65 69 6e 67 20 61 62 6c 65 hand, being able
15a0: 20 74 6f 20 62 65 20 73 75 72 65 20 74 68 61 74 to be sure that
15b0: 20 77 65 20 63 61 6e 20 72 65 73 74 61 72 74 20 we can restart
15c0: 66 72 6f 6d 20 74 68 65 20 69 6e 74 65 72 72 75 from the interru
15d0: 70 74 65 64 20 70 61 73 73 20 69 73 20 6e 69 63 pted pass is nic
15e0: 65 2c 20 61 6e 64 20 6e 6f 74 20 70 6f 73 73 69 e, and not possi
15f0: 62 6c 65 20 69 66 20 77 65 20 67 6f 74 20 69 74 ble if we got it
1600: 20 63 6f 72 72 75 70 74 65 64 20 62 79 20 61 73 corrupted by as
1610: 79 6e 63 68 72 6f 6e 6f 75 73 20 6f 70 65 72 61 ynchronous opera
1620: 74 69 6f 6e 2e 20 3c 62 3e 54 61 62 6c 65 64 20 tion. <b>Tabled
1630: 66 6f 72 20 6e 6f 77 2c 20 74 68 69 73 20 69 73 for now, this is
1640: 20 6e 6f 74 20 79 65 74 20 63 72 69 74 69 63 61 not yet critica
1650: 6c 3c 2f 62 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 2f l</b>..</li>..</
1660: 75 6c 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 0a 5a 20 34 ul>..</ul>...Z 4
1670: 64 38 37 63 62 37 30 62 61 33 61 61 37 36 38 62 d87cb70ba3aa768b
1680: 66 66 32 37 64 39 66 64 62 64 64 63 35 66 65 0a ff27d9fdbddc5fe.