Hex Artifact Content
Not logged in

Artifact 1f8711cf17b684cf2893bdcde310ae1601e2d181:

Wiki page [Import CVS Repositories] by aku on 2007-12-05 02:40:49.

0000: 44 20 32 30 30 37 2d 31 32 2d 30 35 54 30 32 3a  D 2007-12-05T02:
0010: 34 30 3a 34 39 0a 4c 20 49 6d 70 6f 72 74 5c 73  40:49.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 61 33 36 66 37 63 62 39 62 63 63 33  s.P a36f7cb9bcc3
0040: 38 64 66 63 62 33 35 32 31 62 30 62 61 63 65 65  8dfcb3521b0bacee
0050: 63 32 32 64 30 65 39 38 33 30 64 32 0a 55 20 61  c22d0e9830d2.U a
0060: 6b 75 0a 57 20 35 36 36 36 0a 53 70 69 72 69 74  ku.W 5666.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 3c 74 61 62 6c 65 20  Status:..<table 
0260: 61 6c 69 67 6e 3d 6c 65 66 74 20 62 6f 72 64 65  align=left borde
0270: 72 3d 31 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 3e  r=1>..<tr>..<th>
0280: 50 61 73 73 3c 2f 74 68 3e 0d 0a 3c 74 68 3e 44  Pass</th>..<th>D
0290: 65 73 63 72 69 70 74 69 6f 6e 3c 2f 74 68 3e 0d  escription</th>.
02a0: 0a 3c 74 68 3e 4e 6f 74 65 73 3c 2f 74 68 3e 0d  .<th>Notes</th>.
02b0: 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74  .</tr>..<tr>..<t
02c0: 64 3e 43 6f 6c 6c 65 63 74 41 72 3c 2f 74 64 3e  d>CollectAr</td>
02d0: 0d 0a 3c 74 64 3e 43 6f 6c 6c 65 63 74 20 61 72  ..<td>Collect ar
02e0: 63 68 69 76 65 73 3c 2f 74 64 3e 0d 0a 3c 74 64  chives</td>..<td
02f0: 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d  >Ok</td>..</tr>.
0300: 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 43 6f 6c 6c 65  .<tr>..<td>Colle
0310: 63 74 52 65 76 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  ctRev</td>..<td>
0320: 43 6f 6c 6c 65 63 74 20 72 65 76 69 73 69 6f 6e  Collect revision
0330: 73 2c 20 74 61 67 73 2c 20 62 72 61 6e 63 68 65  s, tags, branche
0340: 73 20 28 66 69 6c 65 20 6c 65 76 65 6c 29 3c 2f  s (file level)</
0350: 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 3e  td>..<td>Ok</td>
0360: 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c  ..</tr>..<tr>..<
0370: 74 64 3e 43 6f 6c 6c 61 74 65 53 79 6d 62 6f 6c  td>CollateSymbol
0380: 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 43 6f 6c 6c  s</td>..<td>Coll
0390: 61 74 65 20 73 79 6d 62 6f 6c 20 28 70 72 6f 6a  ate symbol (proj
03a0: 65 63 74 20 6c 65 76 65 6c 29 20 66 72 6f 6d 20  ect level) from 
03b0: 74 68 65 20 66 69 6c 65 20 6c 65 76 65 6c 20 64  the file level d
03c0: 61 74 61 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b  ata</td>..<td>Ok
03d0: 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74  </td>..</tr>..<t
03e0: 72 3e 0d 0a 3c 74 64 3e 46 69 6c 74 65 72 53 79  r>..<td>FilterSy
03f0: 6d 62 6f 6c 73 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  mbols</td>..<td>
0400: 46 69 6c 74 65 72 20 73 79 6d 62 6f 6c 73 2c 20  Filter symbols, 
0410: 65 78 63 6c 75 64 65 20 73 79 6d 62 6f 6c 73 20  exclude symbols 
0420: 61 6e 64 20 6c 69 6e 65 73 20 6f 66 20 64 65 76  and lines of dev
0430: 65 6c 6f 70 6d 65 6e 74 3c 2f 74 64 3e 0d 0a 3c  elopment</td>..<
0440: 74 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72  td>Ok</td>..</tr
0450: 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 49 6e 69  >..<tr>..<td>Ini
0460: 74 43 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64  tCsets</td>..<td
0470: 3e 43 72 65 61 74 65 20 69 6e 69 74 69 61 6c 20  >Create initial 
0480: 63 68 61 6e 67 65 73 65 74 73 3c 2f 74 64 3e 0d  changesets</td>.
0490: 0a 3c 74 64 3e 4f 6b 2e 20 3c 62 3e 4d 65 6d 6f  .<td>Ok. <b>Memo
04a0: 72 79 20 48 6f 67 2c 20 53 6c 6f 77 20 63 6f 6d  ry Hog, Slow com
04b0: 6d 69 74 3c 2f 62 3e 3c 2f 74 64 3e 0d 0a 3c 2f  mit</b></td>..</
04c0: 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 43  tr>..<tr>..<td>C
04d0: 73 65 74 44 65 70 73 3c 2f 74 64 3e 0d 0a 3c 74  setDeps</td>..<t
04e0: 64 3e 43 6f 6d 70 75 74 65 20 63 68 61 6e 67 65  d>Compute change
04f0: 73 65 74 20 64 65 70 65 6e 64 65 6e 63 69 65 73  set dependencies
0500: 20 66 72 6f 6d 20 72 65 76 69 73 69 6f 6e 20 64   from revision d
0510: 65 70 65 6e 64 65 6e 63 69 65 73 3c 2f 74 64 3e  ependencies</td>
0520: 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c  ..<td>Ok</td>..<
0530: 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e  /tr>..<tr>..<td>
0540: 50 61 73 73 20 42 72 65 61 6b 52 65 76 43 73 65  Pass BreakRevCse
0550: 74 43 79 63 6c 65 73 3c 2f 74 64 3e 0d 0a 3c 74  tCycles</td>..<t
0560: 64 3e 42 72 65 61 6b 20 63 79 63 6c 65 73 20 61  d>Break cycles a
0570: 6d 6f 6e 67 20 72 65 76 69 73 69 6f 6e 20 63 68  mong revision ch
0580: 61 6e 67 65 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c  angesets</td>..<
0590: 74 64 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72  td>Ok</td>..</tr
05a0: 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 52 65 76  >..<tr>..<td>Rev
05b0: 54 6f 70 6f 6c 6f 67 69 63 61 6c 53 6f 72 74 3c  TopologicalSort<
05c0: 2f 74 64 3e 0d 0a 3c 74 64 3e 54 6f 70 6f 6c 6f  /td>..<td>Topolo
05d0: 67 69 63 61 6c 6c 79 20 73 6f 72 74 20 72 65 76  gically sort rev
05e0: 69 73 69 6f 6e 20 63 68 61 6e 67 65 73 65 74 73  ision changesets
05f0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74  </td>..<td>Ok</t
0600: 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d  d>..</tr>..<tr>.
0610: 0a 3c 74 64 3e 42 72 65 61 6b 53 79 6d 43 73 65  .<td>BreakSymCse
0620: 74 43 79 63 6c 65 73 3c 2f 74 64 3e 0d 0a 3c 74  tCycles</td>..<t
0630: 64 3e 42 72 65 61 6b 20 63 79 63 6c 65 73 20 61  d>Break cycles a
0640: 6d 6f 6e 67 20 73 79 6d 62 6f 6c 20 63 68 61 6e  mong symbol chan
0650: 67 65 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c 74 64  gesets</td>..<td
0660: 3e 4f 6b 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d  >Ok</td>..</tr>.
0670: 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 42 72 65 61 6b  .<tr>..<td>Break
0680: 41 6c 6c 43 73 65 74 43 79 63 6c 65 73 3c 2f 74  AllCsetCycles</t
0690: 64 3e 0d 0a 3c 74 64 3e 42 72 65 61 6b 20 63 79  d>..<td>Break cy
06a0: 63 6c 65 73 20 6f 76 65 72 20 61 6c 6c 20 63 68  cles over all ch
06b0: 61 6e 67 65 73 65 74 73 3c 2f 74 64 3e 0d 0a 3c  angesets</td>..<
06c0: 74 64 3e 3c 62 3e 4d 61 79 20 73 74 69 6c 6c 20  td><b>May still 
06d0: 63 68 61 6e 67 65 20 74 68 65 20 6f 72 64 65 72  change the order
06e0: 20 6f 66 20 72 65 76 69 73 69 6f 6e 20 63 68 61   of revision cha
06f0: 6e 67 65 73 65 74 73 20 6f 76 65 72 20 74 68 65  ngesets over the
0700: 20 72 65 73 75 6c 74 20 6f 66 20 70 61 73 73 20   result of pass 
0710: 37 2e 3c 2f 62 3e 3c 2f 74 64 3e 0d 0a 3c 2f 74  7.</b></td>..</t
0720: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 41 6c  r>..<tr>..<td>Al
0730: 6c 54 6f 70 6f 6c 6f 67 69 63 61 6c 6c 53 6f 72  lTopologicallSor
0740: 74 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 54 6f 70 6f  t</td>..<td>Topo
0750: 6c 6f 67 69 63 61 6c 6c 79 20 73 6f 72 74 20 61  logically sort a
0760: 6c 6c 20 63 68 61 6e 67 65 73 65 74 73 3c 2f 74  ll changesets</t
0770: 64 3e 0d 0a 3c 74 64 3e 4f 6b 3c 2f 74 64 3e 0d  d>..<td>Ok</td>.
0780: 0a 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e  .</tr>..</table>
0790: 0d 0a 0d 0a 0d 0a 50 61 73 73 65 73 20 74 6f 20  ......Passes to 
07a0: 64 6f 3a 0d 0a 20 20 2a 20 20 50 75 74 20 63 68  do:..  *  Put ch
07b0: 61 6e 67 65 73 65 74 20 6f 72 64 65 72 20 66 72  angeset order fr
07c0: 6f 6d 20 74 68 65 20 74 6f 70 2e 73 6f 72 74 20  om the top.sort 
07d0: 70 61 73 73 65 73 20 61 6e 64 20 74 72 65 65 20  passes and tree 
07e0: 6f 66 20 73 79 6d 62 6f 6c 73 20 66 72 6f 6d 20  of symbols from 
07f0: 74 68 65 20 63 6f 6c 6c 7c 46 69 6c 74 65 72 53  the coll|FilterS
0800: 79 6d 20 70 61 73 73 65 73 20 74 6f 67 65 74 68  ym passes togeth
0810: 65 72 20 69 6e 74 6f 20 61 20 74 72 65 65 20 6f  er into a tree o
0820: 66 20 63 68 61 6e 67 65 73 65 74 73 2e 20 4e 6f  f changesets. No
0830: 74 65 20 74 68 61 74 20 69 74 20 6d 69 67 68 74  te that it might
0840: 20 6e 6f 74 20 62 65 20 61 20 74 72 65 65 20 69   not be a tree i
0850: 66 20 74 68 65 72 65 20 69 73 20 61 6e 20 4e 54  f there is an NT
0860: 44 42 20 61 72 6f 75 6e 64 2e 0d 0a 20 20 2a 20  DB around...  * 
0870: 20 50 65 72 66 6f 72 6d 20 74 68 65 20 61 63 74   Perform the act
0880: 75 61 6c 20 69 6d 70 6f 72 74 2e 0d 0a 0d 0a 4e  ual import.....N
0890: 6f 74 65 73 20 72 65 67 61 72 64 69 6e 67 20 74  otes regarding t
08a0: 68 65 20 61 63 74 75 61 6c 20 69 6d 70 6f 72 74  he actual import
08b0: 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 63 76 73  :..<ul>..<li>cvs
08c0: 32 73 76 6e 20 69 73 20 65 69 74 68 65 72 20 73  2svn is either s
08d0: 6c 6f 77 2c 20 6f 72 20 68 75 6e 67 72 79 20 66  low, or hungry f
08e0: 6f 72 20 64 69 73 6b 73 70 61 63 65 2e 20 54 68  or diskspace. Th
08f0: 65 20 72 65 61 73 6f 6e 3a 20 49 74 20 69 73 20  e reason: It is 
0900: 69 6d 70 6f 72 74 69 6e 67 20 63 68 61 6e 67 65  importing change
0910: 73 65 74 20 62 79 20 63 68 61 6e 67 65 73 65 74  set by changeset
0920: 20 61 6e 64 20 73 6f 20 68 61 73 20 74 6f 20 65   and so has to e
0930: 69 74 68 65 72 20 72 65 67 65 6e 65 72 61 74 65  ither regenerate
0940: 20 74 68 65 20 6e 65 65 64 65 64 20 72 65 76 69   the needed revi
0950: 73 69 6f 6e 73 20 6f 66 20 74 68 65 20 66 69 6c  sions of the fil
0960: 65 73 20 6f 6e 2d 64 65 6d 61 6e 64 20 6f 76 65  es on-demand ove
0970: 72 20 61 6e 64 20 6f 76 65 72 2c 20 6f 72 20 69  r and over, or i
0980: 74 20 63 61 63 68 65 73 20 74 68 65 20 6e 65 65  t caches the nee
0990: 64 65 64 20 72 65 76 69 73 69 6f 6e 73 20 77 68  ded revisions wh
09a0: 65 6e 20 63 72 65 61 74 65 64 20 75 6e 74 69 6c  en created until
09b0: 20 74 68 65 20 6c 61 73 74 20 75 73 65 72 20 69   the last user i
09c0: 73 20 67 6f 6e 65 2e 0d 0a 3c 2f 6c 69 3e 0d 0a  s gone...</li>..
09d0: 3c 6c 69 3e 57 65 20 63 61 6e 20 64 6f 20 62 65  <li>We can do be
09e0: 74 74 65 72 2c 20 69 66 20 77 65 20 67 65 74 20  tter, if we get 
09f0: 68 65 6c 70 20 66 72 6f 6d 20 66 6f 73 73 69 6c  help from fossil
0a00: 2e 20 57 65 20 77 6f 75 6c 64 20 6e 65 65 64 20  . We would need 
0a10: 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 70 65 72 66  commands to perf
0a20: 6f 72 6d 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  orm the followin
0a30: 67 20 61 63 74 69 6f 6e 73 3a 0d 0a 3c 75 6c 3e  g actions:..<ul>
0a40: 0d 0a 3c 6c 69 3e 20 49 6d 70 6f 72 74 20 61 20  ..<li> Import a 
0a50: 66 69 6c 65 20 61 73 20 62 6c 6f 62 2c 20 72 65  file as blob, re
0a60: 74 75 72 6e 20 69 74 73 20 69 6e 74 65 72 6e 61  turn its interna
0a70: 6c 20 69 64 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c  l id...</li>..<l
0a80: 69 3e 20 44 65 6c 74 69 66 79 20 61 20 6b 6e 6f  i> Deltify a kno
0a90: 77 6e 20 66 69 6c 65 20 72 65 73 70 65 63 74 69  wn file respecti
0aa0: 76 65 20 74 6f 20 61 20 73 65 63 6f 6e 64 20 6b  ve to a second k
0ab0: 6e 6f 77 6e 20 66 69 6c 65 2e 0d 0a 3c 2f 6c 69  nown file...</li
0ac0: 3e 0d 0a 3c 6c 69 3e 20 47 65 6e 65 72 61 74 65  >..<li> Generate
0ad0: 20 61 20 6d 61 6e 69 66 65 73 74 20 66 69 6c 65   a manifest file
0ae0: 20 66 6f 72 20 61 20 6c 69 73 74 20 6f 66 20 66   for a list of f
0af0: 69 6c 65 73 20 28 70 61 74 68 73 2c 20 69 64 73  iles (paths, ids
0b00: 29 2c 20 70 61 72 65 6e 74 20 6d 61 6e 69 66 65  ), parent manife
0b10: 73 74 20 72 65 66 65 72 65 6e 63 65 73 2c 20 75  st references, u
0b20: 73 65 72 2c 20 74 69 6d 65 73 74 61 6d 70 2c 20  ser, timestamp, 
0b30: 6c 6f 67 20 6d 65 73 73 61 67 65 2e 20 43 6f 75  log message. Cou
0b40: 6c 64 20 62 65 20 73 69 67 6e 65 64 20 6f 72 20  ld be signed or 
0b50: 6e 6f 74 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 2f 75  not...</li>..</u
0b60: 6c 3e 0d 0a 3c 62 72 3e 0d 0a 57 69 74 68 20 74  l>..<br>..With t
0b70: 68 65 73 65 20 61 63 74 69 6f 6e 73 20 28 70 6f  hese actions (po
0b80: 73 73 69 62 6c 65 20 69 6e 20 63 6f 6d 62 69 6e  ssible in combin
0b90: 61 74 69 6f 6e 29 20 77 65 20 63 61 6e 20 69 6d  ation) we can im
0ba0: 70 6f 72 74 20 74 68 65 20 61 72 63 68 69 76 65  port the archive
0bb0: 20 66 69 6c 65 73 20 66 69 72 73 74 2c 20 6e 65   files first, ne
0bc0: 65 64 69 6e 67 20 6f 6e 6c 79 20 73 70 61 63 65  eding only space
0bd0: 20 66 6f 72 20 74 68 65 20 72 65 76 69 73 69 6f   for the revisio
0be0: 6e 73 20 6f 66 20 61 20 73 69 6e 67 6c 65 20 66  ns of a single f
0bf0: 69 6c 65 20 28 62 6f 75 6e 64 65 64 20 62 79 20  ile (bounded by 
0c00: 74 68 65 20 6c 61 72 67 65 73 74 20 66 69 6c 65  the largest file
0c10: 20 69 6e 20 74 65 72 6d 73 20 6f 66 20 73 69 7a   in terms of siz
0c20: 65 20 61 6e 64 20 68 69 73 74 6f 72 79 29 2c 20  e and history), 
0c30: 77 69 74 68 20 74 68 65 69 72 20 64 65 6c 74 61  with their delta
0c40: 2d 6c 69 6e 6b 73 20 6d 69 72 72 6f 72 69 6e 67  -links mirroring
0c50: 20 74 68 65 20 52 43 53 20 73 74 72 75 63 74 75   the RCS structu
0c60: 72 65 2e 20 41 66 74 65 72 20 74 68 61 74 20 77  re. After that w
0c70: 65 20 63 61 6e 20 69 6e 64 65 70 65 6e 64 65 6e  e can independen
0c80: 74 6c 79 20 67 65 6e 65 72 61 74 65 2c 20 69 6d  tly generate, im
0c90: 70 6f 72 74 2c 20 61 6e 64 20 64 65 6c 74 69 66  port, and deltif
0ca0: 79 20 74 68 65 20 6d 61 6e 69 66 65 73 74 73 20  y the manifests 
0cb0: 66 6f 72 20 63 68 61 6e 67 65 73 65 74 73 2e 20  for changesets. 
0cc0: 74 6f 20 66 69 6e 61 6c 69 7a 65 20 77 65 20 73  to finalize we s
0cd0: 69 6d 70 6c 79 20 27 72 65 62 75 69 6c 64 27 20  imply 'rebuild' 
0ce0: 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 2e 20  the repository. 
0cf0: 54 68 69 73 20 73 68 6f 75 6c 64 20 62 65 20 66  This should be f
0d00: 61 73 74 20 77 69 74 68 6f 75 74 20 6e 65 65 64  ast without need
0d10: 69 6e 67 20 6d 75 63 68 20 74 65 6d 70 6f 72 61  ing much tempora
0d20: 72 79 20 64 69 73 6b 20 73 70 61 63 65 20 65 69  ry disk space ei
0d30: 74 68 65 72 2e 0d 0a 3c 62 72 3e 0d 0a 43 75 72  ther...<br>..Cur
0d40: 72 65 6e 74 6c 79 20 49 20 61 6d 20 74 68 69 6e  rently I am thin
0d50: 6b 69 6e 67 20 61 62 6f 75 74 20 77 61 6e 74 69  king about wanti
0d60: 6e 67 20 61 20 63 6f 6d 6d 61 6e 64 0d 0a 3c 70  ng a command..<p
0d70: 72 65 3e 0d 0a 66 6f 73 73 69 6c 20 69 6d 70 6f  re>..fossil impo
0d80: 72 74 2d 66 69 6c 65 73 20 53 50 45 43 46 49 4c  rt-files SPECFIL
0d90: 45 0d 0a 3c 2f 70 72 65 3e 0d 0a 77 68 69 63 68  E..</pre>..which
0da0: 20 69 6d 70 6f 72 74 73 20 61 6e 64 20 64 65 6c   imports and del
0db0: 74 69 66 69 65 73 20 66 69 6c 65 73 20 61 73 20  tifies files as 
0dc0: 62 6c 6f 62 20 70 65 72 20 74 68 65 20 53 50 45  blob per the SPE
0dd0: 43 46 49 4c 45 2c 20 72 65 74 75 72 6e 69 6e 67  CFILE, returning
0de0: 20 6f 6e 20 73 74 64 6f 75 74 20 74 68 65 20 61   on stdout the a
0df0: 73 73 6f 63 69 61 74 65 64 20 6f 66 20 70 61 74  ssociated of pat
0e00: 68 73 20 61 6e 64 20 69 6e 74 65 72 6e 61 6c 20  hs and internal 
0e10: 69 64 73 2e 20 45 78 61 6d 70 6c 65 20 53 50 45  ids. Example SPE
0e20: 43 46 49 4c 45 3a 0d 0a 3c 70 72 65 3e 0d 0a 46  CFILE:..<pre>..F
0e30: 20 70 61 74 68 31 0d 0a 44 20 70 61 74 68 32 20   path1..D path2 
0e40: 70 61 74 68 31 0d 0a 2e 2e 2e 0d 0a 3c 2f 70 72  path1.......</pr
0e50: 65 3e 0d 0a 54 68 65 20 27 46 27 20 63 61 72 64  e>..The 'F' card
0e60: 20 74 65 6c 6c 73 20 69 74 20 74 6f 20 69 6d 70   tells it to imp
0e70: 6f 72 74 20 27 70 61 74 68 31 27 20 61 73 20 69  ort 'path1' as i
0e80: 73 2e 20 54 68 65 20 27 44 27 20 63 61 72 64 20  s. The 'D' card 
0e90: 74 68 65 6e 20 74 65 6c 6c 73 20 69 74 20 74 6f  then tells it to
0ea0: 20 69 6d 70 6f 72 74 20 27 70 61 74 68 32 27 20   import 'path2' 
0eb0: 61 73 20 69 73 20 61 6e 64 20 74 68 65 6e 20 64  as is and then d
0ec0: 65 6c 74 69 66 79 20 27 70 61 74 68 31 27 20 69  eltify 'path1' i
0ed0: 6e 20 74 65 72 6d 73 20 6f 66 20 27 70 61 74 68  n terms of 'path
0ee0: 32 27 2e 20 41 6e 64 20 73 6f 20 6f 6e 2e 0d 0a  2'. And so on...
0ef0: 3c 62 72 3e 0d 0a 54 6f 20 69 6d 70 6f 72 74 20  <br>..To import 
0f00: 61 6e 20 52 43 53 20 61 72 63 68 69 76 65 20 77  an RCS archive w
0f10: 65 20 6e 6f 77 20 6a 75 73 74 20 68 61 76 65 20  e now just have 
0f20: 74 6f 20 67 65 6e 65 72 61 74 65 20 74 68 65 20  to generate the 
0f30: 66 75 6c 6c 20 72 65 76 69 73 69 6f 6e 73 20 69  full revisions i
0f40: 6e 20 73 6f 6d 65 20 74 65 6d 70 64 69 72 2c 20  n some tempdir, 
0f50: 74 68 65 6e 20 63 72 65 61 74 65 20 61 20 53 50  then create a SP
0f60: 45 43 20 73 68 6f 77 69 6e 67 20 74 68 65 20 64  EC showing the d
0f70: 65 6c 74 61 2d 6c 69 6e 6b 73 20 61 6e 64 20 6c  elta-links and l
0f80: 65 74 20 66 6f 73 73 69 6c 20 68 61 76 65 20 74  et fossil have t
0f90: 68 69 73 2e 20 54 68 65 20 72 65 73 75 6c 74 69  his. The resulti
0fa0: 6e 67 20 69 64 73 20 74 68 65 6e 20 67 6f 20 69  ng ids then go i
0fb0: 6e 74 6f 20 74 68 65 20 69 6d 70 6f 72 74 65 72  nto the importer
0fc0: 20 73 74 61 74 65 20 66 6f 72 20 77 68 65 6e 20   state for when 
0fd0: 77 65 20 67 65 6e 65 72 61 74 65 20 74 68 65 20  we generate the 
0fe0: 6d 61 6e 69 66 65 73 74 73 2e 0d 0a 3c 62 72 3e  manifests...<br>
0ff0: 0d 0a 54 6f 20 69 6d 70 6f 72 74 20 6d 61 6e 69  ..To import mani
1000: 66 65 73 74 73 20 77 65 20 6e 65 65 64 20 73 65  fests we need se
1010: 63 6f 6e 64 20 63 6f 6d 6d 61 6e 64 2c 20 77 68  cond command, wh
1020: 69 63 68 20 67 65 6e 65 72 61 74 65 73 20 69 74  ich generates it
1030: 20 66 72 6f 6d 20 63 68 61 6e 67 65 73 65 74 20   from changeset 
1040: 64 61 74 61 2c 20 61 6e 64 20 69 6d 70 6f 72 74  data, and import
1050: 73 20 69 74 20 74 6f 6f 2e 0d 0a 3c 70 72 65 3e  s it too...<pre>
1060: 0d 0a 66 6f 73 73 69 6c 20 69 6d 70 6f 72 74 2d  ..fossil import-
1070: 6d 61 6e 69 66 65 73 74 20 75 73 65 72 20 74 69  manifest user ti
1080: 6d 65 73 74 61 6d 70 20 4d 45 53 53 41 47 45 46  mestamp MESSAGEF
1090: 49 4c 45 20 46 49 4c 45 46 49 4c 45 20 70 61 72  ILE FILEFILE par
10a0: 65 6e 74 2e 2e 2e 0d 0a 3c 2f 70 72 65 3e 0d 0a  ent.....</pre>..
10b0: 54 68 65 20 27 6d 65 73 73 61 67 65 66 69 6c 65  The 'messagefile
10c0: 27 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 6c  ' contains the l
10d0: 6f 67 20 6d 65 73 73 61 67 65 2c 20 74 68 65 20  og message, the 
10e0: 27 66 69 6c 65 66 69 6c 65 27 20 6c 69 73 74 73  'filefile' lists
10f0: 20 74 68 65 20 72 65 76 69 73 69 6f 6e 73 20 69   the revisions i
1100: 6e 20 74 68 65 20 6d 61 6e 69 66 65 73 74 20 62  n the manifest b
1110: 79 20 69 64 2c 20 61 6e 64 20 77 69 74 68 20 70  y id, and with p
1120: 61 74 68 20 69 6e 20 74 68 65 20 77 6f 72 6b 73  ath in the works
1130: 70 61 63 65 2e 20 54 68 65 20 70 61 72 65 6e 74  pace. The parent
1140: 73 20 61 72 65 20 74 68 65 20 69 64 73 20 6f 66  s are the ids of
1150: 20 74 68 65 20 70 61 72 65 6e 74 20 6d 61 6e 69   the parent mani
1160: 66 65 73 74 73 2e 20 54 68 65 20 72 65 73 75 6c  fests. The resul
1170: 74 20 6f 66 20 74 68 65 20 63 6f 6d 6d 61 6e 64  t of the command
1180: 20 69 73 20 74 68 65 20 69 64 20 6f 66 20 74 68   is the id of th
1190: 65 20 6e 65 77 20 6d 61 6e 69 66 65 73 74 2e 0d  e new manifest..
11a0: 0a 3c 62 72 3e 0d 0a 4e 6f 74 65 3a 20 57 65 20  .<br>..Note: We 
11b0: 68 61 76 65 20 61 6c 72 65 61 64 79 20 63 6f 6d  have already com
11c0: 6d 61 6e 64 73 20 66 6f 72 20 74 68 65 20 70 75  mands for the pu
11d0: 74 20 61 6e 64 20 64 65 6c 74 69 66 79 20 6f 70  t and deltify op
11e0: 65 72 61 74 69 6f 6e 73 2c 20 61 6c 62 65 69 74  erations, albeit
11f0: 20 75 6e 64 6f 63 75 6d 65 6e 74 65 64 2c 20 69   undocumented, i
1200: 6e 20 74 68 65 20 73 65 74 20 6f 66 20 74 65 73  n the set of tes
1210: 74 20 63 6f 6d 6d 61 6e 64 73 2e 0d 0a 3c 2f 6c  t commands...</l
1220: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 0d 0a 4d 69 73  i>..</ul>....Mis
1230: 63 65 6c 6c 61 6e 65 6f 75 73 3a 0d 0a 3c 75 6c  cellaneous:..<ul
1240: 3e 0d 0a 3c 6c 69 3e 41 64 64 20 6f 70 74 69 6f  >..<li>Add optio
1250: 6e 20 74 6f 20 61 6c 6c 6f 77 20 64 69 76 65 72  n to allow diver
1260: 74 69 6e 67 20 74 68 65 20 6c 6f 67 20 6f 75 74  ting the log out
1270: 70 75 74 20 69 6e 74 6f 20 61 20 66 69 6c 65 2c  put into a file,
1280: 20 65 78 63 65 70 74 20 66 6f 72 20 74 68 65 20   except for the 
1290: 70 72 6f 67 72 65 73 73 20 72 65 70 6f 72 74 69  progress reporti
12a0: 6e 67 2e 20 52 65 73 75 6c 74 20 69 73 20 6e 69  ng. Result is ni
12b0: 63 65 20 69 6e 74 65 72 61 63 74 69 76 65 20 6c  ce interactive l
12c0: 6f 67 20 2b 20 70 72 6f 67 72 65 73 73 2c 20 61  og + progress, a
12d0: 6e 64 20 61 20 28 72 65 6c 61 74 69 76 65 6c 79  nd a (relatively
12e0: 29 20 73 6d 61 6c 6c 20 6c 6f 67 20 66 69 6c 65  ) small log file
12f0: 20 77 69 74 68 6f 75 74 20 61 6c 6c 20 74 68 65   without all the
1300: 20 75 6e 77 61 6e 74 65 64 20 70 72 6f 67 72 65   unwanted progre
1310: 73 73 20 6e 75 6d 62 65 72 73 2e 0d 0a 3c 2f 6c  ss numbers...</l
1320: 69 3e 0d 0a 3c 6c 69 3e 47 6f 20 6f 76 65 72 20  i>..<li>Go over 
1330: 74 68 65 20 53 51 4c 20 73 74 61 74 65 6d 65 6e  the SQL statemen
1340: 74 73 20 61 6e 64 20 63 68 65 63 6b 20 74 68 61  ts and check tha
1350: 74 20 74 68 65 79 20 68 61 76 65 20 67 6f 6f 64  t they have good
1360: 20 71 75 65 72 79 20 70 6c 61 6e 73 0d 0a 3c 2f   query plans..</
1370: 6c 69 3e 0d 0a 3c 6c 69 3e 47 6f 20 6f 76 65 72  li>..<li>Go over
1380: 20 74 68 65 20 53 51 4c 20 73 74 61 74 65 6d 65   the SQL stateme
1390: 6e 74 73 20 61 6e 64 20 61 64 64 20 63 6f 6d 6d  nts and add comm
13a0: 65 6e 74 73 20 77 68 65 72 65 20 74 68 65 79 20  ents where they 
13b0: 61 72 65 20 6e 6f 6e 2d 74 72 69 76 69 61 6c 2e  are non-trivial.
13c0: 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 43 75 72  ..</li>..<li>Cur
13d0: 72 65 6e 74 6c 79 20 73 6f 6d 65 20 70 61 73 73  rently some pass
13e0: 65 73 20 74 61 6b 65 20 71 75 69 74 65 20 61 20  es take quite a 
13f0: 62 69 74 20 6f 66 20 74 69 6d 65 20 77 68 65 6e  bit of time when
1400: 20 74 68 65 69 72 20 61 63 74 75 61 6c 20 6f 70   their actual op
1410: 65 72 61 74 69 6f 6e 20 69 73 20 61 6c 72 65 61  eration is alrea
1420: 64 79 20 63 6f 6d 70 6c 65 74 65 2e 20 49 74 20  dy complete. It 
1430: 73 65 65 6d 73 20 74 68 61 74 20 73 71 6c 69 74  seems that sqlit
1440: 65 20 69 73 20 68 65 61 76 69 6c 79 20 77 6f 72  e is heavily wor
1450: 6b 69 6e 67 20 6f 6e 20 63 6f 6d 6d 69 74 74 69  king on committi
1460: 6e 67 20 61 20 6c 6f 74 20 6f 66 20 63 68 61 6e  ng a lot of chan
1470: 67 65 73 20 28 4d 6f 73 74 20 70 61 73 73 65 73  ges (Most passes
1480: 20 61 72 65 20 77 72 61 70 70 65 64 20 69 6e 74   are wrapped int
1490: 6f 20 61 20 73 69 6e 67 6c 65 20 74 72 61 6e 73  o a single trans
14a0: 61 63 74 69 6f 6e 29 2e 20 43 6f 6e 73 69 64 65  action). Conside
14b0: 72 20 77 61 79 73 20 6f 66 20 73 70 65 65 64 69  r ways of speedi
14c0: 6e 67 20 74 68 69 73 20 75 70 2e 0d 0a 3c 75 6c  ng this up...<ul
14d0: 3e 0d 0a 3c 6c 69 3e 44 6f 20 6f 75 72 20 6f 77  >..<li>Do our ow
14e0: 6e 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 6d 61  n transaction ma
14f0: 6e 61 67 65 6d 65 6e 74 3f 20 53 6f 20 74 68 61  nagement? So tha
1500: 74 20 77 65 20 63 61 6e 20 63 6f 6d 6d 69 74 20  t we can commit 
1510: 65 76 65 72 79 20 58 20 63 68 61 6e 67 65 73 3f  every X changes?
1520: 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 53 68  ...</li>..<li>Sh
1530: 6f 75 6c 64 20 77 65 20 64 69 73 61 62 6c 65 20  ould we disable 
1540: 73 79 6e 63 68 72 6f 6e 6f 75 73 20 6f 70 65 72  synchronous oper
1550: 61 74 69 6f 6e 3f 20 54 68 65 20 73 74 61 74 65  ation? The state
1560: 20 64 61 74 61 62 61 73 65 20 69 73 20 6e 6f 74   database is not
1570: 20 74 68 61 74 20 63 72 69 74 69 63 61 6c 2c 20   that critical, 
1580: 69 2e 65 2e 20 69 74 20 63 61 6e 20 61 6c 77 61  i.e. it can alwa
1590: 79 73 20 62 65 20 72 65 67 65 6e 65 72 61 74 65  ys be regenerate
15a0: 64 2e 20 4f 6e 20 74 68 65 20 6f 74 68 65 72 20  d. On the other 
15b0: 68 61 6e 64 2c 20 62 65 69 6e 67 20 61 62 6c 65  hand, being able
15c0: 20 74 6f 20 62 65 20 73 75 72 65 20 74 68 61 74   to be sure that
15d0: 20 77 65 20 63 61 6e 20 72 65 73 74 61 72 74 20   we can restart 
15e0: 66 72 6f 6d 20 74 68 65 20 69 6e 74 65 72 72 75  from the interru
15f0: 70 74 65 64 20 70 61 73 73 20 69 73 20 6e 69 63  pted pass is nic
1600: 65 2c 20 61 6e 64 20 6e 6f 74 20 70 6f 73 73 69  e, and not possi
1610: 62 6c 65 20 69 66 20 77 65 20 67 6f 74 20 69 74  ble if we got it
1620: 20 63 6f 72 72 75 70 74 65 64 20 62 79 20 61 73   corrupted by as
1630: 79 6e 63 68 72 6f 6e 6f 75 73 20 6f 70 65 72 61  ynchronous opera
1640: 74 69 6f 6e 2e 20 3c 62 3e 54 61 62 6c 65 64 20  tion. <b>Tabled 
1650: 66 6f 72 20 6e 6f 77 2c 20 74 68 69 73 20 69 73  for now, this is
1660: 20 6e 6f 74 20 79 65 74 20 63 72 69 74 69 63 61   not yet critica
1670: 6c 3c 2f 62 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 2f  l</b>..</li>..</
1680: 75 6c 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 0a 5a 20 39  ul>..</ul>...Z 9
1690: 34 30 64 36 39 61 38 30 63 61 63 32 36 61 64 33  40d69a80cac26ad3
16a0: 38 64 37 35 33 66 32 34 62 62 31 63 65 37 34 0a  8d753f24bb1ce74.