Hex Artifact Content
Not logged in

Artifact ffe422bb7a0a4b807739b1a03292e07d4e600286:

File ci_fossil.txt part of check-in [103c397e4b] - Updated my work list, added first notes about 'cvs import' functionality. by aku on 2007-08-28 03:34:12.

0000: 0a 54 6f 20 70 65 72 66 6f 72 6d 20 43 56 53 20  .To perform CVS 
0010: 69 6d 70 6f 72 74 73 20 66 6f 72 20 66 6f 73 73  imports for foss
0020: 69 6c 20 77 65 20 6e 65 65 64 20 61 74 20 6c 65  il we need at le
0030: 61 73 74 20 74 68 65 20 61 62 69 6c 69 74 79 20  ast the ability 
0040: 74 6f 0a 70 61 72 73 65 20 43 56 53 20 66 69 6c  to.parse CVS fil
0050: 65 73 2c 20 69 2e 65 2e 20 52 43 53 20 66 69 6c  es, i.e. RCS fil
0060: 65 73 2c 20 77 69 74 68 20 73 6c 69 67 68 74 20  es, with slight 
0070: 64 69 66 66 65 72 65 6e 63 65 73 2e 0a 0a 46 6f  differences...Fo
0080: 72 20 74 68 65 20 67 65 6e 65 72 61 6c 20 61 72  r the general ar
0090: 63 68 69 74 65 63 74 75 72 65 20 6f 66 20 74 68  chitecture of th
00a0: 65 20 69 6d 70 6f 72 74 20 66 61 63 69 6c 69 74  e import facilit
00b0: 79 20 77 65 20 68 61 76 65 20 74 77 6f 20 6d 61  y we have two ma
00c0: 6a 6f 72 0a 70 61 74 68 73 20 74 6f 20 63 68 6f  jor.paths to cho
00d0: 6f 73 65 20 62 65 74 77 65 65 6e 2e 0a 0a 4f 6e  ose between...On
00e0: 65 20 69 73 20 74 6f 20 75 73 65 20 61 6e 20 65  e is to use an e
00f0: 78 74 65 72 6e 61 6c 20 74 6f 6f 6c 20 77 68 69  xternal tool whi
0100: 63 68 20 70 72 6f 63 65 73 73 65 73 20 61 20 63  ch processes a c
0110: 76 73 20 72 65 70 6f 73 69 74 6f 72 79 20 61 6e  vs repository an
0120: 64 0a 64 72 69 76 65 73 20 66 6f 73 73 69 6c 20  d.drives fossil 
0130: 74 68 72 6f 75 67 68 20 69 74 73 20 43 4c 49 20  through its CLI 
0140: 74 6f 20 69 6e 73 65 72 74 20 74 68 65 20 66 6f  to insert the fo
0150: 75 6e 64 20 63 68 61 6e 67 65 73 65 74 73 2e 0a  und changesets..
0160: 0a 54 68 65 20 6f 74 68 65 72 20 69 73 20 74 6f  .The other is to
0170: 20 69 6e 74 65 67 72 61 74 65 20 74 68 65 20 77   integrate the w
0180: 68 6f 6c 65 20 66 61 63 69 6c 69 74 79 20 69 6e  hole facility in
0190: 74 6f 20 74 68 65 20 66 6f 73 73 69 6c 20 62 69  to the fossil bi
01a0: 6e 61 72 79 0a 69 74 73 65 6c 66 2e 0a 0a 49 20  nary.itself...I 
01b0: 64 69 73 6c 69 6b 65 20 74 68 65 20 73 65 63 6f  dislike the seco
01c0: 6e 64 20 63 68 6f 69 63 65 2e 20 49 74 20 6d 61  nd choice. It ma
01d0: 79 20 62 65 20 66 61 73 74 65 72 2c 20 61 73 20  y be faster, as 
01e0: 74 68 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69  the implementati
01f0: 6f 6e 0a 63 61 6e 20 75 73 65 20 61 6c 6c 20 69  on.can use all i
0200: 6e 74 65 72 6e 61 6c 20 66 75 6e 63 74 69 6f 6e  nternal function
0210: 61 6c 69 74 79 20 6f 66 20 66 6f 73 73 69 6c 20  ality of fossil 
0220: 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 20 69  to perform the i
0230: 6d 70 6f 72 74 2c 0a 68 6f 77 65 76 65 72 20 69  mport,.however i
0240: 74 20 77 69 6c 6c 20 61 6c 73 6f 20 62 6c 6f 61  t will also bloa
0250: 74 20 74 68 65 20 62 69 6e 61 72 79 20 77 69 74  t the binary wit
0260: 68 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20  h functionality 
0270: 6e 6f 74 20 6e 65 65 64 65 64 0a 6d 6f 73 74 20  not needed.most 
0280: 6f 66 20 74 68 65 20 74 69 6d 65 2e 20 57 68 69  of the time. Whi
0290: 63 68 20 62 65 63 6f 6d 65 73 20 65 73 70 65 63  ch becomes espec
02a0: 69 61 6c 6c 79 20 6f 62 76 69 6f 75 73 20 69 66  ially obvious if
02b0: 20 6d 6f 72 65 20 69 6d 70 6f 72 74 65 72 73 0a   more importers.
02c0: 61 72 65 20 74 6f 20 62 65 20 77 72 69 74 74 65  are to be writte
02d0: 6e 2c 20 6c 69 6b 65 20 66 6f 72 20 6d 6f 6e 6f  n, like for mono
02e0: 74 6f 6e 65 2c 20 62 61 7a 61 61 72 2c 20 6d 65  tone, bazaar, me
02f0: 72 63 75 72 69 61 6c 2c 20 62 69 74 6b 65 65 70  rcurial, bitkeep
0300: 65 72 2c 0a 67 69 74 2c 20 53 56 4e 2c 20 41 72  er,.git, SVN, Ar
0310: 63 2c 20 65 74 63 2e 20 4b 65 65 70 69 6e 67 20  c, etc. Keeping 
0320: 61 6c 6c 20 74 68 69 73 20 6f 75 74 20 6f 66 20  all this out of 
0330: 74 68 65 20 63 6f 72 65 20 66 6f 73 73 69 6c 20  the core fossil 
0340: 62 69 6e 61 72 79 20 69 73 0a 49 4d 48 4f 20 6d  binary is.IMHO m
0350: 6f 72 65 20 62 65 6e 65 66 69 63 69 61 6c 20 69  ore beneficial i
0360: 6e 20 74 68 65 20 6c 6f 6e 67 20 74 65 72 6d 2c  n the long term,
0370: 20 61 6c 73 6f 20 66 72 6f 6d 20 61 20 6d 61 69   also from a mai
0380: 6e 74 65 6e 61 6e 63 65 20 70 6f 69 6e 74 0a 6f  ntenance point.o
0390: 66 20 76 69 65 77 2e 20 54 68 65 20 74 6f 6f 6c  f view. The tool
03a0: 73 20 63 61 6e 20 65 76 6f 6c 76 65 20 73 65 70  s can evolve sep
03b0: 61 72 61 74 65 6c 79 2e 20 45 73 70 65 63 69 61  arately. Especia
03c0: 6c 6c 79 20 69 6d 70 6f 72 74 61 6e 74 20 66 6f  lly important fo
03d0: 72 20 43 56 53 0a 61 73 20 69 74 20 77 69 6c 6c  r CVS.as it will
03e0: 20 68 61 76 65 20 74 6f 20 64 65 61 6c 20 77 69   have to deal wi
03f0: 74 68 20 6c 6f 74 73 20 6f 66 20 62 72 6f 6b 65  th lots of broke
0400: 6e 20 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20  n repositories, 
0410: 61 6c 6c 0a 64 69 66 66 65 72 65 6e 74 2e 0a 0a  all.different...
0420: 48 6f 77 65 76 65 72 2c 20 6e 6f 74 68 69 6e 67  However, nothing
0430: 20 73 70 65 61 6b 73 20 61 67 61 69 6e 73 74 20   speaks against 
0440: 6c 6f 6f 6b 69 6e 67 20 66 6f 72 20 63 6f 6d 6d  looking for comm
0450: 6f 6e 20 70 61 72 74 73 20 69 6e 20 61 6c 6c 0a  on parts in all.
0460: 70 6f 73 73 69 62 6c 65 20 69 6d 70 6f 72 74 20  possible import 
0470: 74 6f 6f 6c 73 2c 20 61 6e 64 20 68 61 76 69 6e  tools, and havin
0480: 67 20 74 68 65 73 65 20 69 6e 20 74 68 65 20 66  g these in the f
0490: 6f 73 73 69 6c 20 63 6f 72 65 2c 20 61 73 20 61  ossil core, as a
04a0: 0a 67 65 6e 65 72 61 6c 20 62 61 63 6b 65 6e 64  .general backend
04b0: 20 61 6c 6c 20 69 6d 70 6f 72 74 65 72 20 6d 61   all importer ma
04c0: 79 20 75 73 65 2e 20 53 6f 6d 65 74 68 69 6e 67  y use. Something
04d0: 20 6c 69 6b 65 20 74 68 61 74 20 68 61 73 20 61   like that has a
04e0: 6c 72 65 61 64 79 0a 62 65 65 6e 20 70 72 6f 70  lready.been prop
04f0: 6f 73 65 64 3a 20 54 68 65 20 64 65 63 6f 6e 73  osed: The decons
0500: 74 72 75 63 74 7c 72 65 63 6f 6e 73 74 72 75 63  truct|reconstruc
0510: 74 20 6d 65 74 68 6f 64 73 2e 20 46 6f 72 20 75  t methods. For u
0520: 73 2c 20 61 63 74 75 61 6c 6c 79 0a 6f 6e 6c 79  s, actually.only
0530: 20 72 65 63 6f 6e 73 74 72 75 63 74 20 69 73 20   reconstruct is 
0540: 69 6d 70 6f 72 74 61 6e 74 2e 20 54 61 6b 69 6e  important. Takin
0550: 67 20 61 6e 20 75 6e 6f 72 64 65 72 65 64 20 63  g an unordered c
0560: 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 66 69 6c  ollection of fil
0570: 65 73 0a 28 64 61 74 61 2c 20 61 6e 64 20 6d 61  es.(data, and ma
0580: 6e 69 66 65 73 74 73 29 20 69 74 20 67 65 6e 65  nifests) it gene
0590: 72 61 74 65 73 20 61 20 70 72 6f 70 65 72 20 66  rates a proper f
05a0: 6f 73 73 69 6c 20 72 65 70 6f 73 69 74 6f 72 79  ossil repository
05b0: 2e 20 20 57 69 74 68 0a 74 68 61 74 20 6d 65 74  .  With.that met
05c0: 68 6f 64 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20  hod implemented 
05d0: 61 6c 6c 20 69 6d 70 6f 72 74 20 74 6f 6f 6c 73  all import tools
05e0: 20 6f 6e 6c 79 20 68 61 76 65 20 74 6f 20 67 65   only have to ge
05f0: 6e 65 72 61 74 65 20 74 68 65 0a 6e 65 63 65 73  nerate the.neces
0600: 73 61 72 79 20 63 6f 6c 6c 65 63 74 69 6f 6e 20  sary collection 
0610: 61 6e 64 20 74 68 65 6e 20 6c 65 61 76 65 20 74  and then leave t
0620: 68 65 20 6d 61 69 6e 20 77 6f 72 6b 20 6f 66 20  he main work of 
0630: 66 69 6c 6c 69 6e 67 20 74 68 65 0a 64 61 74 61  filling the.data
0640: 62 61 73 65 20 74 6f 20 66 6f 73 73 69 6c 20 69  base to fossil i
0650: 74 73 65 6c 66 2e 0a 0a 54 68 65 20 64 69 73 61  tself...The disa
0660: 64 76 61 6e 74 61 67 65 20 6f 66 20 74 68 69 73  dvantage of this
0670: 20 6d 65 74 68 6f 64 20 69 73 20 68 6f 77 65 76   method is howev
0680: 65 72 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20  er that it will 
0690: 67 6f 62 62 6c 65 20 75 70 20 61 0a 6c 6f 74 20  gobble up a.lot 
06a0: 6f 66 20 74 65 6d 70 6f 72 61 72 79 20 73 70 61  of temporary spa
06b0: 63 65 20 69 6e 20 74 68 65 20 66 69 6c 65 73 79  ce in the filesy
06c0: 73 74 65 6d 20 74 6f 20 68 6f 6c 64 20 61 6c 6c  stem to hold all
06d0: 20 75 6e 69 71 75 65 20 72 65 76 69 73 69 6f 6e   unique revision
06e0: 73 0a 6f 66 20 61 6c 6c 20 66 69 6c 65 73 20 69  s.of all files i
06f0: 6e 20 74 68 65 69 72 20 65 78 70 61 6e 64 65 64  n their expanded
0700: 20 66 6f 72 6d 2e 0a 0a 49 74 20 6d 69 67 68 74   form...It might
0710: 20 62 65 20 77 6f 72 74 68 77 68 69 6c 65 20 74   be worthwhile t
0720: 6f 20 63 6f 6e 73 69 64 65 72 20 61 6e 20 65 78  o consider an ex
0730: 74 65 6e 73 69 6f 6e 20 6f 66 20 27 72 65 63 6f  tension of 'reco
0740: 6e 73 74 72 75 63 74 27 20 77 68 69 63 68 0a 69  nstruct' which.i
0750: 73 20 61 62 6c 65 20 74 6f 20 69 6e 63 72 65 6d  s able to increm
0760: 65 6e 74 61 6c 6c 79 20 61 64 64 20 61 20 73 65  entally add a se
0770: 74 20 6f 66 20 66 69 6c 65 73 20 74 6f 20 61 6e  t of files to an
0780: 20 65 78 69 74 69 6e 67 20 66 6f 73 73 69 6c 0a   exiting fossil.
0790: 72 65 70 6f 73 69 74 6f 72 79 20 61 6c 72 65 61  repository alrea
07a0: 64 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 72 65  dy containing re
07b0: 76 69 73 69 6f 6e 73 2e 20 49 6e 20 74 68 61 74  visions. In that
07c0: 20 63 61 73 65 20 74 68 65 20 69 6d 70 6f 72 74   case the import
07d0: 20 74 6f 6f 6c 0a 63 61 6e 20 62 65 20 63 68 61   tool.can be cha
07e0: 6e 67 65 64 20 74 6f 20 69 6e 63 72 65 6d 65 6e  nged to incremen
07f0: 74 61 6c 6c 79 20 67 65 6e 65 72 61 74 65 20 74  tally generate t
0800: 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 66 6f  he collection fo
0810: 72 20 61 0a 70 61 72 74 69 63 75 6c 61 72 20 72  r a.particular r
0820: 65 76 69 73 69 6f 6e 2c 20 69 6d 70 6f 72 74 20  evision, import 
0830: 69 74 2c 20 61 6e 64 20 69 74 65 72 61 74 65 20  it, and iterate 
0840: 6f 76 65 72 20 61 6c 6c 20 72 65 76 69 73 69 6f  over all revisio
0850: 6e 73 20 69 6e 20 74 68 65 0a 6f 72 69 67 69 6e  ns in the.origin
0860: 20 72 65 70 6f 73 69 74 6f 72 79 2e 20 54 68 69   repository. Thi
0870: 73 20 69 73 20 6f 66 20 63 6f 75 72 73 65 20 61  s is of course a
0880: 6c 73 6f 20 64 65 70 65 6e 64 65 6e 74 20 6f 6e  lso dependent on
0890: 20 74 68 65 20 6f 72 69 67 69 6e 0a 72 65 70 6f   the origin.repo
08a0: 73 69 74 6f 72 79 20 69 74 73 65 6c 66 2c 20 68  sitory itself, h
08b0: 6f 77 20 67 6f 6f 64 20 69 74 20 73 75 70 70 6f  ow good it suppo
08c0: 72 74 73 20 73 75 63 68 20 69 6e 63 72 65 6d 65  rts such increme
08d0: 6e 74 61 6c 20 65 78 70 6f 72 74 2e 0a 0a 54 68  ntal export...Th
08e0: 69 73 20 61 6c 73 6f 20 6c 65 61 64 73 20 74 6f  is also leads to
08f0: 20 61 20 70 6f 73 73 69 62 6c 65 20 6d 65 74 68   a possible meth
0900: 6f 64 20 66 6f 72 20 70 65 72 66 6f 72 6d 69 6e  od for performin
0910: 67 20 74 68 65 20 69 6d 70 6f 72 74 20 75 73 69  g the import usi
0920: 6e 67 0a 6f 6e 6c 79 20 65 78 69 73 74 69 6e 67  ng.only existing
0930: 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 28   functionality (
0940: 27 72 65 63 6f 6e 73 74 72 75 63 74 27 20 68 61  'reconstruct' ha
0950: 73 20 6e 6f 74 20 62 65 65 6e 20 69 6d 70 6c 65  s not been imple
0960: 6d 65 6e 74 65 64 0a 79 65 74 29 2e 20 49 6e 73  mented.yet). Ins
0970: 74 65 61 64 20 67 65 6e 65 72 61 74 69 6e 67 20  tead generating 
0980: 61 6e 20 75 6e 6f 72 64 65 72 65 64 20 63 6f 6c  an unordered col
0990: 6c 65 63 74 69 6f 6e 20 66 6f 72 20 65 61 63 68  lection for each
09a0: 20 72 65 76 69 73 69 6f 6e 0a 67 65 6e 65 72 61   revision.genera
09b0: 74 65 20 61 20 70 72 6f 70 65 72 6c 79 20 73 65  te a properly se
09c0: 74 75 70 20 77 6f 72 6b 73 70 61 63 65 2c 20 73  tup workspace, s
09d0: 69 6d 70 6c 79 20 63 6f 6d 6d 69 74 20 69 74 2e  imply commit it.
09e0: 20 54 68 69 73 20 77 69 6c 6c 0a 72 65 71 75 69   This will.requi
09f0: 72 65 20 75 73 65 20 6f 66 20 72 6d 2c 20 61 64  re use of rm, ad
0a00: 64 20 61 6e 64 20 75 70 64 61 74 65 20 6d 65 74  d and update met
0a10: 68 6f 64 73 20 61 73 20 77 65 6c 6c 2c 20 74 6f  hods as well, to
0a20: 20 72 65 6d 6f 76 65 20 6f 6c 64 20 61 6e 64 0a   remove old and.
0a30: 65 6e 74 65 72 20 6e 65 77 20 66 69 6c 65 73 2c  enter new files,
0a40: 20 61 6e 64 20 70 6f 69 6e 74 20 74 68 65 20 66   and point the f
0a50: 6f 73 73 69 6c 20 72 65 70 6f 73 69 74 6f 72 79  ossil repository
0a60: 20 74 6f 20 74 68 65 20 63 6f 72 72 65 63 74 20   to the correct 
0a70: 70 61 72 65 6e 74 0a 72 65 76 69 73 69 6f 6e 20  parent.revision 
0a80: 66 72 6f 6d 20 74 68 65 20 6e 65 77 20 72 65 76  from the new rev
0a90: 69 73 69 6f 6e 20 69 73 20 64 65 72 69 76 65 64  ision is derived
0aa0: 2e 0a 0a 54 68 65 20 72 65 6c 61 74 69 76 65 20  ...The relative 
0ab0: 65 66 66 69 63 69 65 6e 63 79 20 28 69 6e 20 74  efficiency (in t
0ac0: 69 6d 65 29 20 6f 66 20 74 68 65 73 65 20 69 6e  ime) of these in
0ad0: 63 72 65 6d 65 6e 74 61 6c 20 6d 65 74 68 6f 64  cremental method
0ae0: 73 20 76 65 72 73 75 73 0a 69 6d 70 6f 72 74 69  s versus.importi
0af0: 6e 67 20 61 20 63 6f 6d 70 6c 65 74 65 20 63 6f  ng a complete co
0b00: 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 66 69 6c 65  llection of file
0b10: 73 20 65 6e 63 6f 64 69 6e 67 20 74 68 65 20 65  s encoding the e
0b20: 6e 74 69 72 65 20 6f 72 69 67 69 6e 0a 72 65 70  ntire origin.rep
0b30: 6f 73 69 74 6f 72 79 20 68 6f 77 65 76 65 72 20  ository however 
0b40: 69 73 20 6e 6f 74 20 63 6c 65 61 72 2e 0a 0a 2d  is not clear...-
0b50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0b60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0b70: 2d 0a 0a 72 65 63 6f 6e 73 74 72 75 63 74 0a 0a  -..reconstruct..
0b80: 49 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20  It is currently 
0b90: 6e 6f 74 20 63 6c 65 61 72 20 74 6f 20 6d 65 20  not clear to me 
0ba0: 77 68 65 6e 20 61 6e 64 20 68 6f 77 20 66 6f 73  when and how fos
0bb0: 73 69 6c 20 64 6f 65 73 0a 64 65 6c 74 61 2d 63  sil does.delta-c
0bc0: 6f 6d 70 72 65 73 73 69 6f 6e 2e 20 44 6f 65 73  ompression. Does
0bd0: 20 69 74 20 75 73 65 20 64 65 6c 74 61 73 2c 20   it use deltas, 
0be0: 6f 72 20 72 65 76 65 72 73 65 20 64 65 6c 74 61  or reverse delta
0bf0: 73 2c 20 6f 72 20 61 0a 63 6f 6d 62 69 6e 61 74  s, or a.combinat
0c00: 69 6f 6e 20 6f 66 20 62 6f 74 68 20 3f 20 41 6e  ion of both ? An
0c10: 64 20 77 68 65 6e 20 64 6f 65 73 20 69 74 20 67  d when does it g
0c20: 65 6e 65 72 61 74 65 20 74 68 65 20 64 65 6c 74  enerate the delt
0c30: 61 73 20 3f 0a 0a 54 68 65 20 74 72 69 76 69 61  as ?..The trivia
0c40: 6c 20 73 6f 6c 75 74 69 6f 6e 20 69 73 20 74 68  l solution is th
0c50: 61 74 20 69 74 20 75 73 65 73 20 64 65 6c 74 61  at it uses delta
0c60: 73 2c 20 69 2e 65 2e 20 74 68 65 20 66 69 72 73  s, i.e. the firs
0c70: 74 20 72 65 76 69 73 69 6f 6e 0a 6f 66 20 61 20  t revision.of a 
0c80: 66 69 6c 65 20 69 73 20 73 74 6f 72 65 64 20 77  file is stored w
0c90: 69 74 68 6f 75 74 20 64 65 6c 74 61 20 63 6f 6d  ithout delta com
0ca0: 70 72 65 73 73 69 6f 6e 20 61 6e 64 20 61 6c 6c  pression and all
0cb0: 20 66 75 74 75 72 65 20 76 65 72 73 69 6f 6e 73   future versions
0cc0: 0a 61 72 65 20 64 65 6c 74 61 73 20 66 72 6f 6d  .are deltas from
0cd0: 20 74 68 61 74 2c 20 61 6e 64 20 74 68 65 20 64   that, and the d
0ce0: 65 6c 74 61 20 69 73 20 67 65 6e 65 72 61 74 65  elta is generate
0cf0: 64 20 77 68 65 6e 20 74 68 65 20 6e 65 77 20 72  d when the new r
0d00: 65 76 69 73 69 6f 6e 0a 69 73 20 63 6f 6d 6d 69  evision.is commi
0d10: 74 74 65 64 2e 20 57 69 74 68 20 74 68 65 20 6f  tted. With the o
0d20: 62 76 69 6f 75 73 20 64 69 73 61 64 76 61 6e 74  bvious disadvant
0d30: 61 67 65 20 74 68 61 74 20 6e 65 77 65 72 20 72  age that newer r
0d40: 65 76 69 73 69 6f 6e 73 20 74 61 6b 65 0a 6d 6f  evisions take.mo
0d50: 72 65 20 61 6e 64 20 6d 6f 72 65 20 74 69 6d 65  re and more time
0d60: 20 74 6f 20 62 65 20 64 65 63 6f 6d 70 72 65 73   to be decompres
0d70: 73 65 64 20 61 73 20 74 68 65 20 73 65 74 20 6f  sed as the set o
0d80: 66 20 64 65 6c 74 61 73 20 74 6f 20 61 70 70 6c  f deltas to appl
0d90: 79 0a 67 72 6f 77 73 2e 0a 0a 41 6e 64 20 64 75  y.grows...And du
0da0: 72 69 6e 67 20 78 66 65 72 20 69 74 20 73 69 6d  ring xfer it sim
0db0: 70 6c 79 20 73 65 6e 64 73 20 74 68 65 20 64 65  ply sends the de
0dc0: 6c 74 61 73 20 61 73 20 69 73 2c 20 6d 61 6b 69  ltas as is, maki
0dd0: 6e 67 20 66 6f 72 20 65 61 73 79 0a 69 6e 74 65  ng for easy.inte
0de0: 67 72 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 72  gration on the r
0df0: 65 6d 6f 74 65 20 73 69 64 65 2e 0a 0a 48 6f 77  emote side...How
0e00: 65 76 65 72 20 72 65 63 6f 6e 73 74 72 75 63 74  ever reconstruct
0e10: 2c 20 74 68 61 74 20 6d 65 74 68 6f 64 20 73 65  , that method se
0e20: 65 73 20 69 6e 69 74 69 61 6c 6c 79 20 6f 6e 6c  es initially onl
0e30: 79 20 61 6e 20 75 6e 6f 72 64 65 72 65 64 0a 63  y an unordered.c
0e40: 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 66 69 6c  ollection of fil
0e50: 65 73 2c 20 73 6f 6d 65 20 6f 66 20 77 68 69 63  es, some of whic
0e60: 68 20 6d 61 79 20 62 65 20 6d 61 6e 69 66 65 73  h may be manifes
0e70: 74 73 2c 20 6f 74 68 65 72 73 20 61 72 65 20 64  ts, others are d
0e80: 61 74 61 0a 66 69 6c 65 73 2c 20 61 6e 64 20 69  ata.files, and i
0e90: 66 20 69 74 20 69 6d 70 6f 72 74 73 20 74 68 65  f it imports the
0ea0: 6d 20 69 6e 20 61 20 72 61 6e 64 6f 6d 20 6f 72  m in a random or
0eb0: 64 65 72 20 69 74 20 6d 69 67 68 74 20 66 69 6e  der it might fin
0ec0: 64 20 74 68 61 74 0a 66 69 6c 65 20 58 2c 20 77  d that.file X, w
0ed0: 68 69 63 68 20 77 61 73 20 69 6d 70 6f 72 74 65  hich was importe
0ee0: 64 20 66 69 72 73 74 20 61 6e 64 20 74 68 65 72  d first and ther
0ef0: 65 66 6f 72 65 20 68 61 73 20 6e 6f 20 64 65 6c  efore has no del
0f00: 74 61 0a 63 6f 6d 70 72 65 73 73 69 6f 6e 2c 20  ta.compression, 
0f10: 69 73 20 61 63 74 75 61 6c 6c 79 20 73 6f 6d 65  is actually some
0f20: 77 68 65 72 65 20 69 6e 20 74 68 65 20 6d 69 64  where in the mid
0f30: 64 6c 65 20 6f 66 20 61 20 6c 69 6e 65 20 6f 66  dle of a line of
0f40: 0a 72 65 76 69 73 69 6f 6e 73 2c 20 61 6e 64 20  .revisions, and 
0f50: 73 68 6f 75 6c 64 20 62 65 20 64 65 6c 74 61 2d  should be delta-
0f60: 63 6f 6d 70 72 65 73 73 65 64 2c 20 61 6e 64 20  compressed, and 
0f70: 74 68 65 6e 20 69 74 20 68 61 73 20 74 6f 20 66  then it has to f
0f80: 69 6e 64 20 6f 75 74 0a 74 68 65 20 70 72 65 64  ind out.the pred
0f90: 65 63 65 73 73 6f 72 20 61 6e 64 20 64 6f 20 74  ecessor and do t
0fa0: 68 65 20 63 6f 6d 70 72 65 73 73 69 6f 6e 2c 20  he compression, 
0fb0: 65 74 63 2e 0a 0a 53 6f 20 64 65 70 65 6e 64 69  etc...So dependi
0fc0: 6e 67 20 6f 6e 20 68 6f 77 20 74 68 65 20 69 6e  ng on how the in
0fd0: 74 65 72 6e 61 6c 20 6c 6f 67 69 63 20 6f 66 20  ternal logic of 
0fe0: 64 65 6c 74 61 2d 63 6f 6d 70 72 65 73 73 69 6f  delta-compressio
0ff0: 6e 20 69 73 20 64 6f 6e 65 0a 72 65 63 6f 6e 73  n is done.recons
1000: 74 72 75 63 74 20 6d 69 67 68 74 20 6e 65 65 64  truct might need
1010: 20 6d 6f 72 65 20 6c 6f 67 69 63 20 74 6f 20 68   more logic to h
1020: 65 6c 70 20 74 68 65 20 6c 6f 77 65 72 20 6c 65  elp the lower le
1030: 76 65 6c 20 61 63 68 69 65 76 65 20 67 6f 6f 64  vel achieve good
1040: 0a 63 6f 6d 70 72 65 73 73 69 6f 6e 2e 0a 0a 4c  .compression...L
1050: 69 6b 65 2c 20 69 6e 20 61 20 66 69 72 73 74 20  ike, in a first 
1060: 70 61 73 73 20 64 65 74 65 72 6d 69 6e 65 20 77  pass determine w
1070: 68 69 63 68 20 66 69 6c 65 73 20 61 72 65 20 6d  hich files are m
1080: 61 6e 69 66 65 73 74 73 2c 20 61 6e 64 20 72 65  anifests, and re
1090: 61 64 0a 65 6e 6f 75 67 68 20 6f 66 20 74 68 65  ad.enough of the
10a0: 6d 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 74  m to determine t
10b0: 68 65 69 72 20 70 61 72 65 6e 74 2f 63 68 69 6c  heir parent/chil
10c0: 64 20 73 74 72 75 63 74 75 72 65 2c 20 61 6e 64  d structure, and
10d0: 20 69 6e 20 61 0a 73 65 63 6f 6e 64 20 70 61 73   in a.second pas
10e0: 73 20 61 63 74 75 61 6c 6c 79 20 69 6d 70 6f 72  s actually impor
10f0: 74 73 20 74 68 65 6d 2c 20 69 6e 20 74 6f 70 6f  ts them, in topo
1100: 6c 6f 67 69 63 61 6c 20 6f 72 64 65 72 2c 20 77  logical order, w
1110: 69 74 68 20 61 6c 6c 0a 72 65 6c 65 76 61 6e 74  ith all.relevant
1120: 20 6e 6f 6e 2d 6d 61 6e 69 66 65 73 74 20 66 69   non-manifest fi
1130: 6c 65 73 20 66 6f 72 20 61 20 6d 61 6e 69 66 65  les for a manife
1140: 73 74 20 69 6d 70 6f 72 74 65 64 20 61 73 20 74  st imported as t
1150: 68 61 74 20 74 69 6d 65 0a 74 6f 6f 2e 20 57 69  hat time.too. Wi
1160: 74 68 20 74 68 61 74 20 74 68 65 20 75 6e 64 65  th that the unde
1170: 72 6c 79 69 6e 67 20 65 6e 67 69 6e 65 20 77 6f  rlying engine wo
1180: 75 6c 64 20 73 65 65 20 74 68 65 20 66 69 6c 65  uld see the file
1190: 73 20 62 61 73 69 63 61 6c 6c 79 20 69 6e 0a 74  s basically in.t
11a0: 68 65 20 73 61 6d 65 20 6f 72 64 65 72 20 61 73  he same order as
11b0: 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 61 20   generated by a 
11c0: 72 65 67 75 6c 61 72 20 73 65 72 69 65 73 20 6f  regular series o
11d0: 66 20 63 6f 6d 6d 69 74 73 2e 0a 0a 50 72 6f 62  f commits...Prob
11e0: 6c 65 6d 73 20 66 6f 72 20 72 65 63 6f 6e 73 74  lems for reconst
11f0: 72 75 63 74 3a 20 46 69 6c 65 73 20 72 65 66 65  ruct: Files refe
1200: 72 65 6e 63 65 64 2c 20 62 75 74 20 6e 6f 74 20  renced, but not 
1210: 70 72 65 73 65 6e 74 2c 20 61 6e 64 2c 0a 63 6f  present, and,.co
1220: 6e 76 65 72 73 65 6c 79 2c 20 66 69 6c 65 73 20  nversely, files 
1230: 70 72 65 73 65 6e 74 2c 20 62 75 74 20 6e 6f 74  present, but not
1240: 20 72 65 66 65 72 65 6e 63 65 64 2e 20 54 68 69   referenced. Thi
1250: 73 20 63 61 6e 20 64 6f 6e 65 20 61 73 20 70 61  s can done as pa
1260: 72 74 0a 6f 66 20 74 68 65 20 73 65 63 6f 6e 64  rt.of the second
1270: 20 70 61 73 73 2c 20 61 62 6f 72 74 69 6e 67 20   pass, aborting 
1280: 77 68 65 6e 20 61 20 6d 69 73 73 69 6e 67 20 66  when a missing f
1290: 69 6c 65 20 69 73 20 65 6e 63 6f 75 6e 74 65 72  ile is encounter
12a0: 65 64 2c 20 77 69 74 68 0a 28 75 6e 29 6d 61 72  ed, with.(un)mar
12b0: 6b 69 6e 67 20 6f 66 20 75 73 65 64 20 66 69 6c  king of used fil
12c0: 65 73 2c 20 61 6e 64 20 61 74 20 74 68 65 20 65  es, and at the e
12d0: 6e 64 20 77 65 20 6b 6e 6f 77 20 74 68 65 20 75  nd we know the u
12e0: 6e 75 73 65 64 0a 66 69 6c 65 73 2e 20 43 6f 75  nused.files. Cou
12f0: 6c 64 20 61 6c 73 6f 20 62 65 20 61 20 73 65 70  ld also be a sep
1300: 61 72 61 74 65 20 70 61 73 73 20 62 65 74 77 65  arate pass betwe
1310: 65 6e 20 66 69 72 73 74 20 61 6e 64 20 73 65 63  en first and sec
1320: 6f 6e 64 2e 0a                                   ond..