Hex Artifact Content
Not logged in

Artifact 19e8a2e348d8264b00f028a5a9eb8ef43031350e:

File www/selfcheck.wiki part of check-in [c8893c69ac] - Documentation updates. by drh on 2008-10-05 01:03:25.

0000: 3c 6e 6f 77 69 6b 69 3e 0a 3c 68 31 20 61 6c 69  <nowiki>.<h1 ali
0010: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0a 46 6f 73  gn="center">.Fos
0020: 73 69 6c 20 52 65 70 6f 73 69 74 6f 72 79 20 49  sil Repository I
0030: 6e 74 65 67 72 69 74 79 20 53 65 6c 66 2d 43 68  ntegrity Self-Ch
0040: 65 63 6b 73 0a 3c 2f 68 31 3e 0a 0a 3c 70 3e 0a  ecks.</h1>..<p>.
0050: 45 76 65 6e 20 74 68 6f 75 67 68 20 66 6f 73 73  Even though foss
0060: 69 6c 20 69 73 20 61 20 72 65 6c 61 74 69 76 65  il is a relative
0070: 6c 79 20 6e 65 77 20 70 72 6f 6a 65 63 74 20 61  ly new project a
0080: 6e 64 20 73 74 69 6c 6c 20 63 6f 6e 74 61 69 6e  nd still contain
0090: 73 0a 6d 61 6e 79 20 62 75 67 73 2c 20 69 74 20  s.many bugs, it 
00a0: 69 73 20 64 65 73 69 67 6e 65 64 20 77 69 74 68  is designed with
00b0: 20 66 65 61 74 75 72 65 73 20 74 6f 20 67 69 76   features to giv
00c0: 65 20 69 74 20 61 20 68 69 67 68 20 6c 65 76 65  e it a high leve
00d0: 6c 0a 6f 66 20 69 6e 74 65 67 72 69 74 79 20 73  l.of integrity s
00e0: 6f 20 74 68 61 74 20 79 6f 75 20 63 61 6e 20 68  o that you can h
00f0: 61 76 65 20 63 6f 6e 66 69 64 65 6e 63 65 20 74  ave confidence t
0100: 68 61 74 20 79 6f 75 20 77 69 6c 6c 20 6e 6f 74  hat you will not
0110: 0a 6c 6f 73 65 20 79 6f 75 72 20 66 69 6c 65 73  .lose your files
0120: 2e 20 20 54 68 69 73 20 6e 6f 74 65 20 64 65 73  .  This note des
0130: 63 72 69 62 65 73 20 74 68 65 20 64 65 66 65 6e  cribes the defen
0140: 73 69 76 65 20 6d 65 61 73 75 72 65 73 20 74 68  sive measures th
0150: 61 74 0a 66 6f 73 73 69 6c 20 75 73 65 73 20 74  at.fossil uses t
0160: 6f 20 68 65 6c 70 20 70 72 65 76 65 6e 74 20 66  o help prevent f
0170: 69 6c 65 20 6c 6f 73 73 20 64 75 65 20 74 6f 20  ile loss due to 
0180: 62 75 67 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 3c  bugs..</p>..<p><
0190: 69 3e 46 6f 6c 6c 6f 77 2d 75 70 20 61 73 20 6f  i>Follow-up as o
01a0: 66 20 32 30 30 37 2d 31 31 2d 32 34 3a 3c 2f 69  f 2007-11-24:</i
01b0: 3e 0a 3c 69 3e 52 65 69 74 65 72 61 74 65 64 20  >.<i>Reiterated 
01c0: 6f 6e 20 32 30 30 38 2d 30 35 2d 31 36 20 61 6e  on 2008-05-16 an
01d0: 64 20 61 67 61 69 6e 20 6f 6e 20 32 30 30 38 2d  d again on 2008-
01e0: 31 30 2d 30 34 3a 3c 2f 69 3e 0a 46 6f 73 73 69  10-04:</i>.Fossi
01f0: 6c 20 68 61 73 20 62 65 65 6e 20 68 6f 73 74 69  l has been hosti
0200: 6e 67 20 69 74 73 65 6c 66 20 61 6e 64 20 6d 61  ng itself and ma
0210: 6e 79 20 6f 74 68 65 72 20 70 72 6f 6a 65 63 74  ny other project
0220: 73 20 66 6f 72 0a 6d 6f 6e 74 68 73 20 6e 6f 77  s for.months now
0230: 2e 20 20 4d 61 6e 79 20 62 75 67 73 20 68 61 76  .  Many bugs hav
0240: 65 20 62 65 65 6e 20 65 6e 63 6f 75 6e 74 65 72  e been encounter
0250: 65 64 2e 20 20 42 75 74 2c 20 74 68 61 6e 6b 73  ed.  But, thanks
0260: 20 69 6e 20 6c 61 72 67 65 0a 70 61 72 74 20 74   in large.part t
0270: 6f 20 74 68 65 20 64 65 66 65 6e 73 69 76 65 20  o the defensive 
0280: 6d 65 61 73 75 72 65 73 20 64 65 73 63 72 69 62  measures describ
0290: 65 64 20 68 65 72 65 2c 20 6e 6f 20 64 61 74 61  ed here, no data
02a0: 20 68 61 73 20 62 65 65 6e 0a 6c 6f 73 74 2e 20   has been.lost. 
02b0: 20 54 68 65 20 69 6e 74 65 67 72 69 74 79 20 63   The integrity c
02c0: 68 65 63 6b 73 20 61 72 65 20 64 6f 69 6e 67 20  hecks are doing 
02d0: 74 68 65 69 72 20 6a 6f 62 20 77 65 6c 6c 2e 3c  their job well.<
02e0: 2f 70 3e 0a 0a 3c 68 32 3e 41 74 6f 6d 69 63 20  /p>..<h2>Atomic 
02f0: 43 68 65 63 6b 2d 69 6e 73 20 57 69 74 68 20 52  Check-ins With R
0300: 6f 6c 6c 62 61 63 6b 3c 2f 68 32 3e 0a 0a 3c 70  ollback</h2>..<p
0310: 3e 0a 54 68 65 20 66 6f 73 73 69 6c 20 72 65 70  >.The fossil rep
0320: 6f 73 69 74 6f 72 79 20 69 73 20 61 6e 0a 3c 61  ository is an.<a
0330: 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77   href="http://ww
0340: 77 2e 73 71 6c 69 74 65 2e 6f 72 67 2f 22 3e 53  w.sqlite.org/">S
0350: 51 4c 69 74 65 20 76 65 72 73 69 6f 6e 20 33 3c  QLite version 3<
0360: 2f 61 3e 20 64 61 74 61 62 61 73 65 20 66 69 6c  /a> database fil
0370: 65 2e 20 20 0a 53 51 4c 69 74 65 20 69 73 20 76  e.  .SQLite is v
0380: 65 72 79 20 6d 61 74 75 72 65 20 61 6e 64 20 73  ery mature and s
0390: 74 61 62 6c 65 20 61 6e 64 20 68 61 73 20 62 65  table and has be
03a0: 65 6e 20 69 6e 20 77 69 64 65 2d 73 70 72 65 61  en in wide-sprea
03b0: 64 20 75 73 65 20 66 6f 72 20 6d 61 6e 79 0a 79  d use for many.y
03c0: 65 61 72 73 2c 20 73 6f 20 77 65 20 61 72 65 20  ears, so we are 
03d0: 63 6f 6e 66 69 64 65 6e 74 20 69 74 20 77 69 6c  confident it wil
03e0: 6c 20 6e 6f 74 20 63 61 75 73 65 20 72 65 70 6f  l not cause repo
03f0: 73 69 74 6f 72 79 0a 63 6f 72 72 75 70 74 69 6f  sitory.corruptio
0400: 6e 2e 20 20 53 51 4c 69 74 65 0a 64 61 74 61 62  n.  SQLite.datab
0410: 61 73 65 73 20 64 6f 20 6e 6f 74 20 63 6f 72 72  ases do not corr
0420: 75 70 74 20 65 76 65 6e 20 69 66 20 61 20 70 72  upt even if a pr
0430: 6f 67 72 61 6d 20 6f 72 20 73 79 73 74 65 6d 20  ogram or system 
0440: 63 72 61 73 68 20 6f 72 20 70 6f 77 65 72 0a 66  crash or power.f
0450: 61 69 6c 75 72 65 20 6f 63 63 75 72 73 20 69 6e  ailure occurs in
0460: 20 74 68 65 20 6d 69 64 64 6c 65 20 6f 66 20 74   the middle of t
0470: 68 65 20 75 70 64 61 74 65 2e 20 20 49 66 20 73  he update.  If s
0480: 6f 6d 65 20 6b 69 6e 64 20 6f 66 20 63 72 61 73  ome kind of cras
0490: 68 0a 64 6f 65 73 20 6f 63 63 75 72 20 69 6e 20  h.does occur in 
04a0: 74 68 65 20 6d 69 64 64 6c 65 20 6f 66 20 61 20  the middle of a 
04b0: 63 68 61 6e 67 65 2c 20 74 68 65 6e 20 61 6c 6c  change, then all
04c0: 20 74 68 65 20 63 68 61 6e 67 65 73 20 61 72 65   the changes are
04d0: 20 72 6f 6c 6c 65 64 0a 62 61 63 6b 20 74 68 65   rolled.back the
04e0: 20 6e 65 78 74 20 74 69 6d 65 20 74 68 61 74 20   next time that 
04f0: 74 68 65 20 64 61 74 61 62 61 73 65 20 69 73 20  the database is 
0500: 61 63 63 65 73 73 65 64 2e 0a 3c 2f 70 3e 0a 0a  accessed..</p>..
0510: 3c 70 3e 0a 41 20 63 68 65 63 6b 2d 69 6e 20 6f  <p>.A check-in o
0520: 70 65 72 61 74 69 6f 6e 20 69 6e 20 66 6f 73 73  peration in foss
0530: 69 6c 20 6d 61 6b 65 73 20 6d 61 6e 79 20 63 68  il makes many ch
0540: 61 6e 67 65 73 20 74 6f 20 74 68 65 20 72 65 70  anges to the rep
0550: 6f 73 69 74 6f 72 79 0a 64 61 74 61 62 61 73 65  ository.database
0560: 2e 20 20 42 75 74 20 61 6c 6c 20 74 68 65 73 65  .  But all these
0570: 20 63 68 61 6e 67 65 73 20 68 61 70 70 65 6e 20   changes happen 
0580: 77 69 74 68 69 6e 20 61 20 73 69 6e 67 6c 65 20  within a single 
0590: 74 72 61 6e 73 61 63 74 69 6f 6e 2e 0a 49 66 20  transaction..If 
05a0: 73 6f 6d 65 74 68 69 6e 67 20 67 6f 65 73 20 77  something goes w
05b0: 72 6f 6e 67 20 69 6e 20 74 68 65 20 6d 69 64 64  rong in the midd
05c0: 6c 65 20 6f 66 20 74 68 65 20 63 6f 6d 6d 69 74  le of the commit
05d0: 2c 20 74 68 65 6e 20 74 68 65 20 74 72 61 6e 73  , then the trans
05e0: 61 63 74 69 6f 6e 0a 69 73 20 72 6f 6c 6c 65 64  action.is rolled
05f0: 20 62 61 63 6b 20 61 6e 64 20 74 68 65 20 64 61   back and the da
0600: 74 61 62 61 73 65 20 69 73 20 75 6e 63 68 61 6e  tabase is unchan
0610: 67 65 64 2e 0a 3c 2f 70 3e 0a 0a 3c 68 32 3e 56  ged..</p>..<h2>V
0620: 65 72 69 66 69 63 61 74 69 6f 6e 20 4f 66 20 44  erification Of D
0630: 65 6c 74 61 20 45 6e 63 6f 64 69 6e 67 73 20 50  elta Encodings P
0640: 72 69 6f 72 20 54 6f 20 54 72 61 6e 73 61 63 74  rior To Transact
0650: 69 6f 6e 20 43 6f 6d 6d 69 74 3c 2f 68 32 3e 0a  ion Commit</h2>.
0660: 0a 3c 70 3e 0a 54 68 65 20 63 6f 6e 74 65 6e 74  .<p>.The content
0670: 20 66 69 6c 65 73 20 74 68 61 74 20 63 6f 6d 70   files that comp
0680: 72 69 73 65 20 74 68 65 20 67 6c 6f 62 61 6c 20  rise the global 
0690: 73 74 61 74 65 20 6f 66 20 61 20 66 6f 73 73 69  state of a fossi
06a0: 6c 20 72 65 73 70 6f 73 69 74 6f 72 79 0a 61 72  l respository.ar
06b0: 65 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 20  e stored in the 
06c0: 72 65 70 6f 73 69 74 6f 72 79 20 61 73 20 61 20  repository as a 
06d0: 74 72 65 65 2e 20 20 54 68 65 20 6c 65 61 76 65  tree.  The leave
06e0: 73 20 6f 66 20 74 68 65 20 74 72 65 65 20 61 72  s of the tree ar
06f0: 65 0a 73 74 6f 72 65 64 20 61 73 20 7a 6c 69 62  e.stored as zlib
0700: 2d 63 6f 6d 70 72 65 73 73 65 64 20 42 4c 4f 42  -compressed BLOB
0710: 73 2e 20 20 49 6e 74 65 72 69 6f 72 20 6e 6f 64  s.  Interior nod
0720: 65 73 20 61 72 65 20 64 65 6c 74 61 73 20 66 72  es are deltas fr
0730: 6f 6d 20 74 68 65 69 72 0a 64 65 63 65 6e 64 61  om their.decenda
0740: 6e 74 73 2e 20 20 41 20 6c 6f 74 20 6f 66 20 65  nts.  A lot of e
0750: 6e 63 6f 64 69 6e 67 20 69 73 20 67 6f 69 6e 67  ncoding is going
0760: 20 6f 6e 2e 20 20 54 68 65 72 65 20 69 73 0a 7a   on.  There is.z
0770: 6c 69 62 2d 63 6f 6d 70 72 65 73 73 69 6f 6e 20  lib-compression 
0780: 77 68 69 63 68 20 69 73 20 72 65 6c 61 74 69 76  which is relativ
0790: 65 6c 79 20 77 65 6c 6c 2d 74 65 73 74 65 64 20  ely well-tested 
07a0: 62 75 74 20 73 74 69 6c 6c 20 6d 69 67 68 74 0a  but still might.
07b0: 63 61 75 73 65 20 63 6f 72 72 75 70 74 69 6f 6e  cause corruption
07c0: 20 69 66 20 75 73 65 64 20 69 6d 70 72 6f 70 65   if used imprope
07d0: 72 6c 79 2e 20 20 41 6e 64 20 74 68 65 72 65 20  rly.  And there 
07e0: 69 73 20 74 68 65 20 72 65 6c 61 74 69 76 65 6c  is the relativel
07f0: 79 0a 6e 65 77 20 64 65 6c 74 61 2d 65 6e 63 6f  y.new delta-enco
0800: 64 69 6e 67 20 6d 65 63 68 61 6e 69 73 6d 20 64  ding mechanism d
0810: 65 73 69 67 6e 65 64 20 65 78 70 72 65 73 73 6c  esigned expressl
0820: 79 20 66 6f 72 20 66 6f 73 73 69 6c 2e 20 20 57  y for fossil.  W
0830: 65 20 77 61 6e 74 0a 74 6f 20 6d 61 6b 65 20 73  e want.to make s
0840: 75 72 65 20 74 68 61 74 20 62 75 67 73 20 69 6e  ure that bugs in
0850: 20 74 68 65 73 65 20 65 6e 63 6f 64 69 6e 67 20   these encoding 
0860: 6d 65 63 68 61 6e 69 73 6d 73 20 64 6f 20 6e 6f  mechanisms do no
0870: 74 20 6c 65 61 64 20 74 6f 0a 6c 6f 73 73 20 6f  t lead to.loss o
0880: 66 20 64 61 74 61 2e 0a 3c 2f 70 3e 0a 0a 3c 70  f data..</p>..<p
0890: 3e 0a 54 6f 20 69 6e 63 72 65 61 73 65 20 6f 75  >.To increase ou
08a0: 72 20 63 6f 6e 66 69 64 65 6e 63 65 20 74 68 61  r confidence tha
08b0: 74 20 65 76 65 72 79 74 68 69 6e 67 20 69 6e 20  t everything in 
08c0: 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 20 69  the repository i
08d0: 73 0a 72 65 63 6f 76 65 72 61 62 6c 65 2c 20 66  s.recoverable, f
08e0: 6f 73 73 69 6c 20 6d 61 6b 65 73 20 73 75 72 65  ossil makes sure
08f0: 20 69 74 20 63 61 6e 20 65 78 74 72 61 63 74 20   it can extract 
0900: 61 6e 20 65 78 61 63 74 20 72 65 70 6c 69 63 61  an exact replica
0910: 74 65 0a 6f 66 20 65 76 65 72 79 20 63 6f 6e 74  te.of every cont
0920: 65 6e 74 20 66 69 6c 65 20 74 68 61 74 20 69 74  ent file that it
0930: 20 63 68 61 6e 67 65 73 20 6a 75 73 74 20 70 72   changes just pr
0940: 69 6f 72 20 74 6f 20 74 72 61 6e 73 61 63 74 69  ior to transacti
0950: 6f 6e 0a 63 6f 6d 6d 69 74 2e 20 20 53 6f 20 64  on.commit.  So d
0960: 75 72 69 6e 67 20 74 68 65 20 63 6f 75 72 73 65  uring the course
0970: 20 6f 66 20 63 68 65 63 6b 2d 69 6e 20 28 6f 72   of check-in (or
0980: 20 6f 74 68 65 72 20 72 65 70 6f 73 69 74 6f 72   other repositor
0990: 79 0a 6f 70 65 72 61 74 69 6f 6e 29 20 6d 61 6e  y.operation) man
09a0: 79 20 64 69 66 66 65 72 65 6e 74 20 66 69 6c 65  y different file
09b0: 73 0a 69 6e 20 74 68 65 20 72 65 70 6f 73 69 74  s.in the reposit
09c0: 6f 72 79 20 6d 69 67 68 74 20 62 65 20 6d 6f 64  ory might be mod
09d0: 69 66 69 65 64 2e 20 20 53 6f 6d 65 20 66 69 6c  ified.  Some fil
09e0: 65 73 20 61 72 65 20 73 69 6d 70 6c 79 0a 63 6f  es are simply.co
09f0: 6d 70 72 65 73 73 65 64 2e 20 20 4f 74 68 65 72  mpressed.  Other
0a00: 20 66 69 6c 65 73 20 61 72 65 20 64 65 6c 74 61   files are delta
0a10: 20 65 6e 63 6f 64 65 64 20 61 6e 64 20 74 68 65   encoded and the
0a20: 6e 20 63 6f 6d 70 72 65 73 73 65 64 2e 0a 57 68  n compressed..Wh
0a30: 69 6c 65 20 61 6c 6c 20 74 68 69 73 20 69 73 20  ile all this is 
0a40: 67 6f 69 6e 67 20 6f 6e 2c 20 66 6f 73 73 69 6c  going on, fossil
0a50: 20 6d 61 6b 65 73 20 61 20 72 65 63 6f 72 64 20   makes a record 
0a60: 6f 66 20 65 76 65 72 79 20 66 69 6c 65 0a 74 68  of every file.th
0a70: 61 74 20 69 73 20 65 6e 63 6f 64 65 64 20 61 6e  at is encoded an
0a80: 64 20 74 68 65 20 53 48 41 31 20 68 61 73 68 20  d the SHA1 hash 
0a90: 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20  of the original 
0aa0: 63 6f 6e 74 65 6e 74 20 6f 66 20 74 68 61 74 0a  content of that.
0ab0: 66 69 6c 65 2e 20 20 54 68 65 6e 20 6a 75 73 74  file.  Then just
0ac0: 20 62 65 66 6f 72 65 20 74 72 61 6e 73 61 63 74   before transact
0ad0: 69 6f 6e 20 63 6f 6d 6d 69 74 2c 20 66 6f 73 73  ion commit, foss
0ae0: 69 6c 20 72 65 2d 65 78 74 72 61 63 74 73 0a 74  il re-extracts.t
0af0: 68 65 20 6f 72 69 67 69 6e 61 6c 20 63 6f 6e 74  he original cont
0b00: 65 6e 74 20 6f 66 20 61 6c 6c 20 66 69 6c 65 73  ent of all files
0b10: 20 74 68 61 74 20 77 65 72 65 20 77 72 69 74 74   that were writt
0b20: 65 6e 2c 20 63 6f 6d 70 75 74 65 73 0a 74 68 65  en, computes.the
0b30: 20 53 48 41 31 20 63 68 65 63 6b 73 75 6d 20 61   SHA1 checksum a
0b40: 67 61 69 6e 2c 20 61 6e 64 20 76 65 72 69 66 69  gain, and verifi
0b50: 65 73 20 74 68 61 74 20 74 68 65 20 63 68 65 63  es that the chec
0b60: 6b 73 75 6d 73 20 6d 61 74 63 68 2e 0a 49 66 20  ksums match..If 
0b70: 61 6e 79 74 68 69 6e 67 20 64 6f 65 73 20 6e 6f  anything does no
0b80: 74 20 6d 61 74 63 68 20 75 70 2c 20 61 6e 20 65  t match up, an e
0b90: 72 72 6f 72 0a 6d 65 73 73 61 67 65 20 69 73 20  rror.message is 
0ba0: 70 72 69 6e 74 65 64 20 61 6e 64 20 74 68 65 20  printed and the 
0bb0: 74 72 61 6e 73 61 63 74 69 6f 6e 20 72 6f 6c 6c  transaction roll
0bc0: 73 20 62 61 63 6b 2e 0a 3c 2f 70 3e 0a 0a 3c 70  s back..</p>..<p
0bd0: 3e 0a 53 6f 2c 20 69 6e 20 6f 74 68 65 72 20 77  >.So, in other w
0be0: 6f 72 64 73 2c 20 66 6f 73 73 69 6c 20 61 6c 77  ords, fossil alw
0bf0: 61 79 73 20 63 68 65 63 6b 73 20 74 6f 20 6d 61  ays checks to ma
0c00: 6b 65 20 73 75 72 65 20 69 74 20 63 61 6e 0a 72  ke sure it can.r
0c10: 65 2d 65 78 74 72 61 63 74 20 61 20 66 69 6c 65  e-extract a file
0c20: 20 62 65 66 6f 72 65 20 69 74 20 63 6f 6d 6d 69   before it commi
0c30: 74 73 20 61 20 63 68 61 6e 67 65 20 74 6f 20 74  ts a change to t
0c40: 68 61 74 20 66 69 6c 65 2e 0a 48 65 6e 63 65 20  hat file..Hence 
0c50: 62 75 67 73 20 69 6e 20 66 6f 73 73 69 6c 20 61  bugs in fossil a
0c60: 72 65 20 75 6e 6c 69 6b 65 6c 79 20 74 6f 20 63  re unlikely to c
0c70: 6f 72 72 75 70 74 20 74 68 65 20 72 65 70 6f 73  orrupt the repos
0c80: 69 74 6f 72 79 20 69 6e 0a 61 20 77 61 79 20 74  itory in.a way t
0c90: 68 61 74 20 70 72 65 76 65 6e 74 73 20 75 73 20  hat prevents us 
0ca0: 66 72 6f 6d 20 65 78 74 72 61 63 74 69 6e 67 20  from extracting 
0cb0: 68 69 73 74 6f 72 69 63 61 6c 20 76 65 72 73 69  historical versi
0cc0: 6f 6e 73 20 6f 66 20 0a 66 69 6c 65 73 2e 0a 3c  ons of .files..<
0cd0: 2f 70 3e 0a 0a 3c 68 32 3e 43 68 65 63 6b 73 75  /p>..<h2>Checksu
0ce0: 6d 20 4f 76 65 72 20 41 6c 6c 20 46 69 6c 65 73  m Over All Files
0cf0: 20 49 6e 20 41 20 42 61 73 65 6c 69 6e 65 3c 2f   In A Baseline</
0d00: 68 32 3e 0a 0a 3c 70 3e 0a 4d 61 6e 69 66 65 73  h2>..<p>.Manifes
0d10: 74 20 61 72 74 69 66 61 63 74 73 20 74 68 61 74  t artifacts that
0d20: 20 64 65 66 69 6e 65 20 61 20 62 61 73 65 6c 69   define a baseli
0d30: 6e 65 20 68 61 76 65 20 74 77 6f 20 66 69 65 6c  ne have two fiel
0d40: 64 73 20 28 74 68 65 0a 52 2d 63 61 72 64 20 61  ds (the.R-card a
0d50: 6e 64 20 5a 2d 63 61 72 64 29 20 74 68 61 74 20  nd Z-card) that 
0d60: 72 65 63 6f 72 64 20 4d 44 35 20 68 61 73 68 73  record MD5 hashs
0d70: 20 6f 66 20 74 68 65 20 6d 61 6e 69 66 65 73 74   of the manifest
0d80: 20 69 74 73 65 6c 66 0a 61 6e 64 20 6f 66 20 61   itself.and of a
0d90: 6c 6c 20 6f 74 68 65 72 20 66 69 6c 65 73 20 69  ll other files i
0da0: 6e 20 74 68 65 20 6d 61 6e 69 66 65 73 74 2e 20  n the manifest. 
0db0: 20 50 72 69 6f 72 20 74 6f 20 61 6e 79 20 63 68   Prior to any ch
0dc0: 65 63 6b 2d 69 6e 0a 63 6f 6d 6d 69 74 2c 20 74  eck-in.commit, t
0dd0: 68 65 73 65 20 63 68 65 63 6b 73 75 6d 73 20 61  hese checksums a
0de0: 72 65 20 76 65 72 69 66 69 65 64 20 74 6f 20 65  re verified to e
0df0: 6e 73 75 72 65 20 74 68 61 74 20 74 68 65 20 62  nsure that the b
0e00: 61 73 65 6c 69 6e 65 0a 63 68 65 63 6b 65 64 20  aseline.checked 
0e10: 69 6e 20 61 67 72 65 65 73 20 65 78 61 63 74 6c  in agrees exactl
0e20: 79 20 77 69 74 68 20 77 68 61 74 20 69 73 20 6f  y with what is o
0e30: 6e 20 64 69 73 6b 2e 20 20 53 69 6d 69 6c 61 72  n disk.  Similar
0e40: 6c 79 2c 0a 74 68 65 20 72 65 70 6f 73 69 74 6f  ly,.the reposito
0e50: 72 79 20 63 68 65 63 6b 73 75 6d 20 69 73 20 76  ry checksum is v
0e60: 65 72 69 66 69 65 64 20 61 66 74 65 72 20 61 20  erified after a 
0e70: 63 68 65 63 6b 6f 75 74 20 74 6f 20 6d 61 6b 65  checkout to make
0e80: 0a 73 75 72 65 20 74 68 61 74 20 74 68 65 20 65  .sure that the e
0e90: 6e 74 69 72 65 20 72 65 70 6f 73 69 74 6f 72 79  ntire repository
0ea0: 20 77 61 73 20 63 68 65 63 6b 65 64 20 6f 75 74   was checked out
0eb0: 20 63 6f 72 72 65 63 74 6c 79 2e 0a 4e 6f 74 65   correctly..Note
0ec0: 20 74 68 61 74 20 74 68 65 73 65 20 61 64 64 65   that these adde
0ed0: 64 20 63 68 65 63 6b 73 20 75 73 65 20 61 20 64  d checks use a d
0ee0: 69 66 66 65 72 65 6e 74 20 68 61 73 68 20 28 4d  ifferent hash (M
0ef0: 44 35 20 69 6e 73 74 65 61 64 0a 6f 66 20 53 48  D5 instead.of SH
0f00: 41 31 29 20 69 6e 20 6f 72 64 65 72 20 74 6f 20  A1) in order to 
0f10: 61 76 6f 69 64 20 63 6f 6d 6d 6f 6e 2d 6d 6f 64  avoid common-mod
0f20: 65 20 66 61 69 6c 75 72 65 73 20 69 6e 20 74 68  e failures in th
0f30: 65 20 68 61 73 68 0a 61 6c 67 6f 72 69 74 68 6d  e hash.algorithm
0f40: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2e   implementation.
0f50: 0a 3c 2f 70 3e 0a                                .</p>.