Artifact 61460bdeef3b73412df106bf50672f5bb99a4d5f:
File
www/selfcheck.wiki
part of check-in
[16094f7ebc]
- Resolve broken hyperlinks and other minor cleanup in the documentation.
by
drh on
2008-05-16 15:31:05.
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 3a 3c 2f on 2008-05-16:</
01d0: 69 3e 0a 46 6f 73 73 69 6c 20 68 61 73 20 62 65 i>.Fossil has be
01e0: 65 6e 20 68 6f 73 74 69 6e 67 20 69 74 73 65 6c en hosting itsel
01f0: 66 20 61 6e 64 20 6d 61 6e 79 20 6f 74 68 65 72 f and many other
0200: 20 70 72 6f 6a 65 63 74 73 20 66 6f 72 0a 6d 6f projects for.mo
0210: 6e 74 68 73 20 6e 6f 77 2e 20 20 4d 61 6e 79 20 nths now. Many
0220: 62 75 67 73 20 68 61 76 65 20 62 65 65 6e 20 65 bugs have been e
0230: 6e 63 6f 75 6e 74 65 72 65 64 2e 20 20 42 75 74 ncountered. But
0240: 2c 20 74 68 61 6e 6b 73 20 69 6e 20 6c 61 72 67 , thanks in larg
0250: 65 0a 70 61 72 74 20 74 6f 20 74 68 65 20 64 65 e.part to the de
0260: 66 65 6e 73 69 76 65 20 6d 65 61 73 75 72 65 73 fensive measures
0270: 20 64 65 73 63 72 69 62 65 64 20 68 65 72 65 2c described here,
0280: 20 6e 6f 20 64 61 74 61 20 68 61 73 20 62 65 65 no data has bee
0290: 6e 0a 6c 6f 73 74 2e 20 20 54 68 65 20 69 6e 74 n.lost. The int
02a0: 65 67 72 69 74 79 20 63 68 65 63 6b 73 20 61 72 egrity checks ar
02b0: 65 20 64 6f 69 6e 67 20 74 68 65 69 72 20 6a 6f e doing their jo
02c0: 62 20 77 65 6c 6c 2e 3c 2f 70 3e 0a 0a 3c 68 32 b well.</p>..<h2
02d0: 3e 41 74 6f 6d 69 63 20 43 68 65 63 6b 2d 69 6e >Atomic Check-in
02e0: 73 20 57 69 74 68 20 52 6f 6c 6c 62 61 63 6b 3c s With Rollback<
02f0: 2f 68 32 3e 0a 0a 3c 70 3e 0a 54 68 65 20 66 6f /h2>..<p>.The fo
0300: 73 73 69 6c 20 72 65 70 6f 73 69 74 6f 72 79 20 ssil repository
0310: 69 73 20 61 6e 0a 3c 61 20 68 72 65 66 3d 22 68 is an.<a href="h
0320: 74 74 70 3a 2f 2f 77 77 77 2e 73 71 6c 69 74 65 ttp://www.sqlite
0330: 2e 6f 72 67 2f 22 3e 53 51 4c 69 74 65 20 76 65 .org/">SQLite ve
0340: 72 73 69 6f 6e 20 33 3c 2f 61 3e 20 64 61 74 61 rsion 3</a> data
0350: 62 61 73 65 20 66 69 6c 65 2e 20 20 0a 53 51 4c base file. .SQL
0360: 69 74 65 20 69 73 20 76 65 72 79 20 6d 61 74 75 ite is very matu
0370: 72 65 20 61 6e 64 20 73 74 61 62 6c 65 20 61 6e re and stable an
0380: 64 20 68 61 73 20 62 65 65 6e 20 69 6e 20 77 69 d has been in wi
0390: 64 65 2d 73 70 72 65 61 64 20 75 73 65 20 66 6f de-spread use fo
03a0: 72 20 6d 61 6e 79 0a 79 65 61 72 73 2c 20 73 6f r many.years, so
03b0: 20 77 65 20 61 72 65 20 63 6f 6e 66 69 64 65 6e we are confiden
03c0: 74 20 69 74 20 77 69 6c 6c 20 6e 6f 74 20 63 61 t it will not ca
03d0: 75 73 65 20 72 65 70 6f 73 69 74 6f 72 79 0a 63 use repository.c
03e0: 6f 72 72 75 70 74 69 6f 6e 2e 20 20 53 51 4c 69 orruption. SQLi
03f0: 74 65 0a 64 61 74 61 62 61 73 65 73 20 64 6f 20 te.databases do
0400: 6e 6f 74 20 63 6f 72 72 75 70 74 20 65 76 65 6e not corrupt even
0410: 20 69 66 20 61 20 70 72 6f 67 72 61 6d 20 6f 72 if a program or
0420: 20 73 79 73 74 65 6d 20 63 72 61 73 68 20 6f 72 system crash or
0430: 20 70 6f 77 65 72 0a 66 61 69 6c 75 72 65 20 6f power.failure o
0440: 63 63 75 72 73 20 69 6e 20 74 68 65 20 6d 69 64 ccurs in the mid
0450: 64 6c 65 20 6f 66 20 74 68 65 20 75 70 64 61 74 dle of the updat
0460: 65 2e 20 20 49 66 20 73 6f 6d 65 20 6b 69 6e 64 e. If some kind
0470: 20 6f 66 20 63 72 61 73 68 0a 64 6f 65 73 20 6f of crash.does o
0480: 63 63 75 72 20 69 6e 20 74 68 65 20 6d 69 64 64 ccur in the midd
0490: 6c 65 20 6f 66 20 61 20 63 68 61 6e 67 65 2c 20 le of a change,
04a0: 74 68 65 6e 20 61 6c 6c 20 74 68 65 20 63 68 61 then all the cha
04b0: 6e 67 65 73 20 61 72 65 20 72 6f 6c 6c 65 64 0a nges are rolled.
04c0: 62 61 63 6b 20 74 68 65 20 6e 65 78 74 20 74 69 back the next ti
04d0: 6d 65 20 74 68 61 74 20 74 68 65 20 64 61 74 61 me that the data
04e0: 62 61 73 65 20 69 73 20 61 63 63 65 73 73 65 64 base is accessed
04f0: 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 41 20 63 68 ..</p>..<p>.A ch
0500: 65 63 6b 2d 69 6e 20 6f 70 65 72 61 74 69 6f 6e eck-in operation
0510: 20 69 6e 20 66 6f 73 73 69 6c 20 6d 61 6b 65 73 in fossil makes
0520: 20 6d 61 6e 79 20 63 68 61 6e 67 65 73 20 74 6f many changes to
0530: 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 0a the repository.
0540: 64 61 74 61 62 61 73 65 2e 20 20 42 75 74 20 61 database. But a
0550: 6c 6c 20 74 68 65 73 65 20 63 68 61 6e 67 65 73 ll these changes
0560: 20 68 61 70 70 65 6e 20 77 69 74 68 69 6e 20 61 happen within a
0570: 20 73 69 6e 67 6c 65 20 74 72 61 6e 73 61 63 74 single transact
0580: 69 6f 6e 2e 0a 49 66 20 73 6f 6d 65 74 68 69 6e ion..If somethin
0590: 67 20 67 6f 65 73 20 77 72 6f 6e 67 20 69 6e 20 g goes wrong in
05a0: 74 68 65 20 6d 69 64 64 6c 65 20 6f 66 20 74 68 the middle of th
05b0: 65 20 63 6f 6d 6d 69 74 2c 20 74 68 65 6e 20 74 e commit, then t
05c0: 68 65 20 74 72 61 6e 73 61 63 74 69 6f 6e 0a 69 he transaction.i
05d0: 73 20 72 6f 6c 6c 65 64 20 62 61 63 6b 20 61 6e s rolled back an
05e0: 64 20 74 68 65 20 64 61 74 61 62 61 73 65 20 69 d the database i
05f0: 73 20 75 6e 63 68 61 6e 67 65 64 2e 0a 3c 2f 70 s unchanged..</p
0600: 3e 0a 0a 3c 68 32 3e 56 65 72 69 66 69 63 61 74 >..<h2>Verificat
0610: 69 6f 6e 20 4f 66 20 44 65 6c 74 61 20 45 6e 63 ion Of Delta Enc
0620: 6f 64 69 6e 67 73 20 50 72 69 6f 72 20 54 6f 20 odings Prior To
0630: 54 72 61 6e 73 61 63 74 69 6f 6e 20 43 6f 6d 6d Transaction Comm
0640: 69 74 3c 2f 68 32 3e 0a 0a 3c 70 3e 0a 54 68 65 it</h2>..<p>.The
0650: 20 63 6f 6e 74 65 6e 74 20 66 69 6c 65 73 20 74 content files t
0660: 68 61 74 20 63 6f 6d 70 72 69 73 65 20 74 68 65 hat comprise the
0670: 20 67 6c 6f 62 61 6c 20 73 74 61 74 65 20 6f 66 global state of
0680: 20 61 20 66 6f 73 73 69 6c 20 72 65 73 70 6f 73 a fossil respos
0690: 69 74 6f 72 79 0a 61 72 65 20 73 74 6f 72 65 64 itory.are stored
06a0: 20 69 6e 20 74 68 65 20 72 65 70 6f 73 69 74 6f in the reposito
06b0: 72 79 20 61 73 20 61 20 74 72 65 65 2e 20 20 54 ry as a tree. T
06c0: 68 65 20 6c 65 61 76 65 73 20 6f 66 20 74 68 65 he leaves of the
06d0: 20 74 72 65 65 20 61 72 65 0a 73 74 6f 72 65 64 tree are.stored
06e0: 20 61 73 20 7a 6c 69 62 2d 63 6f 6d 70 72 65 73 as zlib-compres
06f0: 73 65 64 20 42 4c 4f 42 73 2e 20 20 49 6e 74 65 sed BLOBs. Inte
0700: 72 69 6f 72 20 6e 6f 64 65 73 20 61 72 65 20 64 rior nodes are d
0710: 65 6c 74 61 73 20 66 72 6f 6d 20 74 68 65 69 72 eltas from their
0720: 0a 64 65 63 65 6e 64 61 6e 74 73 2e 20 20 41 20 .decendants. A
0730: 6c 6f 74 20 6f 66 20 65 6e 63 6f 64 69 6e 67 20 lot of encoding
0740: 69 73 20 67 6f 69 6e 67 20 6f 6e 2e 20 20 54 68 is going on. Th
0750: 65 72 65 20 69 73 0a 7a 6c 69 62 2d 63 6f 6d 70 ere is.zlib-comp
0760: 72 65 73 73 69 6f 6e 20 77 68 69 63 68 20 69 73 ression which is
0770: 20 72 65 6c 61 74 69 76 65 6c 79 20 77 65 6c 6c relatively well
0780: 2d 74 65 73 74 65 64 20 62 75 74 20 73 74 69 6c -tested but stil
0790: 6c 20 6d 69 67 68 74 0a 63 61 75 73 65 20 63 6f l might.cause co
07a0: 72 72 75 70 74 69 6f 6e 20 69 66 20 75 73 65 64 rruption if used
07b0: 20 69 6d 70 72 6f 70 65 72 6c 79 2e 20 20 41 6e improperly. An
07c0: 64 20 74 68 65 72 65 20 69 73 20 74 68 65 20 72 d there is the r
07d0: 65 6c 61 74 69 76 65 6c 79 0a 6e 65 77 20 64 65 elatively.new de
07e0: 6c 74 61 2d 65 6e 63 6f 64 69 6e 67 20 6d 65 63 lta-encoding mec
07f0: 68 61 6e 69 73 6d 20 64 65 73 69 67 6e 65 64 20 hanism designed
0800: 65 78 70 72 65 73 73 6c 79 20 66 6f 72 20 66 6f expressly for fo
0810: 73 73 69 6c 2e 20 20 57 65 20 77 61 6e 74 0a 74 ssil. We want.t
0820: 6f 20 6d 61 6b 65 20 73 75 72 65 20 74 68 61 74 o make sure that
0830: 20 62 75 67 73 20 69 6e 20 74 68 65 73 65 20 65 bugs in these e
0840: 6e 63 6f 64 69 6e 67 20 6d 65 63 68 61 6e 69 73 ncoding mechanis
0850: 6d 73 20 64 6f 20 6e 6f 74 20 6c 65 61 64 20 74 ms do not lead t
0860: 6f 0a 6c 6f 73 73 20 6f 66 20 64 61 74 61 2e 0a o.loss of data..
0870: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 6f 20 69 6e 63 </p>..<p>.To inc
0880: 72 65 61 73 65 20 6f 75 72 20 63 6f 6e 66 69 64 rease our confid
0890: 65 6e 63 65 20 74 68 61 74 20 65 76 65 72 79 74 ence that everyt
08a0: 68 69 6e 67 20 69 6e 20 74 68 65 20 72 65 70 6f hing in the repo
08b0: 73 69 74 6f 72 79 20 69 73 0a 72 65 63 6f 76 65 sitory is.recove
08c0: 72 61 62 6c 65 2c 20 66 6f 73 73 69 6c 20 6d 61 rable, fossil ma
08d0: 6b 65 73 20 73 75 72 65 20 69 74 20 63 61 6e 20 kes sure it can
08e0: 65 78 74 72 61 63 74 20 61 6e 20 65 78 61 63 74 extract an exact
08f0: 20 72 65 70 6c 69 63 61 74 65 0a 6f 66 20 65 76 replicate.of ev
0900: 65 72 79 20 63 6f 6e 74 65 6e 74 20 66 69 6c 65 ery content file
0910: 20 74 68 61 74 20 69 74 20 63 68 61 6e 67 65 73 that it changes
0920: 20 6a 75 73 74 20 70 72 69 6f 72 20 74 6f 20 74 just prior to t
0930: 72 61 6e 73 61 63 74 69 6f 6e 0a 63 6f 6d 6d 69 ransaction.commi
0940: 74 2e 20 20 53 6f 20 64 75 72 69 6e 67 20 74 68 t. So during th
0950: 65 20 63 6f 75 72 73 65 20 6f 66 20 63 68 65 63 e course of chec
0960: 6b 2d 69 6e 20 28 6f 72 20 6f 74 68 65 72 20 72 k-in (or other r
0970: 65 70 6f 73 69 74 6f 72 79 0a 6f 70 65 72 61 74 epository.operat
0980: 69 6f 6e 29 20 6d 61 6e 79 20 64 69 66 66 65 72 ion) many differ
0990: 65 6e 74 20 66 69 6c 65 73 0a 69 6e 20 74 68 65 ent files.in the
09a0: 20 72 65 70 6f 73 69 74 6f 72 79 20 6d 69 67 68 repository migh
09b0: 74 20 62 65 20 6d 6f 64 69 66 69 65 64 2e 20 20 t be modified.
09c0: 53 6f 6d 65 20 66 69 6c 65 73 20 61 72 65 20 73 Some files are s
09d0: 69 6d 70 6c 79 0a 63 6f 6d 70 72 65 73 73 65 64 imply.compressed
09e0: 2e 20 20 4f 74 68 65 72 20 66 69 6c 65 73 20 61 . Other files a
09f0: 72 65 20 64 65 6c 74 61 20 65 6e 63 6f 64 65 64 re delta encoded
0a00: 20 61 6e 64 20 74 68 65 6e 20 63 6f 6d 70 72 65 and then compre
0a10: 73 73 65 64 2e 0a 57 68 69 6c 65 20 61 6c 6c 20 ssed..While all
0a20: 74 68 69 73 20 69 73 20 67 6f 69 6e 67 20 6f 6e this is going on
0a30: 2c 20 66 6f 73 73 69 6c 20 6d 61 6b 65 73 20 61 , fossil makes a
0a40: 20 72 65 63 6f 72 64 20 6f 66 20 65 76 65 72 79 record of every
0a50: 20 66 69 6c 65 0a 74 68 61 74 20 69 73 20 65 6e file.that is en
0a60: 63 6f 64 65 64 20 61 6e 64 20 74 68 65 20 53 48 coded and the SH
0a70: 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 6f A1 hash of the o
0a80: 72 69 67 69 6e 61 6c 20 63 6f 6e 74 65 6e 74 20 riginal content
0a90: 6f 66 20 74 68 61 74 0a 66 69 6c 65 2e 20 20 54 of that.file. T
0aa0: 68 65 6e 20 6a 75 73 74 20 62 65 66 6f 72 65 20 hen just before
0ab0: 74 72 61 6e 73 61 63 74 69 6f 6e 20 63 6f 6d 6d transaction comm
0ac0: 69 74 2c 20 66 6f 73 73 69 6c 20 72 65 2d 65 78 it, fossil re-ex
0ad0: 74 72 61 63 74 73 0a 74 68 65 20 6f 72 69 67 69 tracts.the origi
0ae0: 6e 61 6c 20 63 6f 6e 74 65 6e 74 20 6f 66 20 61 nal content of a
0af0: 6c 6c 20 66 69 6c 65 73 20 74 68 61 74 20 77 65 ll files that we
0b00: 72 65 20 77 72 69 74 74 65 6e 2c 20 63 6f 6d 70 re written, comp
0b10: 75 74 65 73 0a 74 68 65 20 53 48 41 31 20 63 68 utes.the SHA1 ch
0b20: 65 63 6b 73 75 6d 20 61 67 61 69 6e 2c 20 61 6e ecksum again, an
0b30: 64 20 76 65 72 69 66 69 65 73 20 74 68 61 74 20 d verifies that
0b40: 74 68 65 20 63 68 65 63 6b 73 75 6d 73 20 6d 61 the checksums ma
0b50: 74 63 68 2e 0a 49 66 20 61 6e 79 74 68 69 6e 67 tch..If anything
0b60: 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 does not match
0b70: 75 70 2c 20 61 6e 20 65 72 72 6f 72 0a 6d 65 73 up, an error.mes
0b80: 73 61 67 65 20 69 73 20 70 72 69 6e 74 65 64 20 sage is printed
0b90: 61 6e 64 20 74 68 65 20 74 72 61 6e 73 61 63 74 and the transact
0ba0: 69 6f 6e 20 72 6f 6c 6c 73 20 62 61 63 6b 2e 0a ion rolls back..
0bb0: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 53 6f 2c 20 69 6e </p>..<p>.So, in
0bc0: 20 6f 74 68 65 72 20 77 6f 72 64 73 2c 20 66 6f other words, fo
0bd0: 73 73 69 6c 20 61 6c 77 61 79 73 20 63 68 65 63 ssil always chec
0be0: 6b 73 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 ks to make sure
0bf0: 69 74 20 63 61 6e 0a 72 65 2d 65 78 74 72 61 63 it can.re-extrac
0c00: 74 20 61 20 66 69 6c 65 20 62 65 66 6f 72 65 20 t a file before
0c10: 69 74 20 63 6f 6d 6d 69 74 73 20 61 20 63 68 61 it commits a cha
0c20: 6e 67 65 20 74 6f 20 74 68 61 74 20 66 69 6c 65 nge to that file
0c30: 2e 0a 48 65 6e 63 65 20 62 75 67 73 20 69 6e 20 ..Hence bugs in
0c40: 66 6f 73 73 69 6c 20 61 72 65 20 75 6e 6c 69 6b fossil are unlik
0c50: 65 6c 79 20 74 6f 20 63 6f 72 72 75 70 74 20 74 ely to corrupt t
0c60: 68 65 20 72 65 70 6f 73 69 74 6f 72 79 20 69 6e he repository in
0c70: 0a 61 20 77 61 79 20 74 68 61 74 20 70 72 65 76 .a way that prev
0c80: 65 6e 74 73 20 75 73 20 66 72 6f 6d 20 65 78 74 ents us from ext
0c90: 72 61 63 74 69 6e 67 20 68 69 73 74 6f 72 69 63 racting historic
0ca0: 61 6c 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 0a al versions of .
0cb0: 66 69 6c 65 73 2e 0a 3c 2f 70 3e 0a 0a 3c 68 32 files..</p>..<h2
0cc0: 3e 43 68 65 63 6b 73 75 6d 20 4f 76 65 72 20 41 >Checksum Over A
0cd0: 6c 6c 20 46 69 6c 65 73 20 49 6e 20 41 20 42 61 ll Files In A Ba
0ce0: 73 65 6c 69 6e 65 3c 2f 68 32 3e 0a 0a 3c 70 3e seline</h2>..<p>
0cf0: 0a 4d 61 6e 69 66 65 73 74 20 61 72 74 69 66 61 .Manifest artifa
0d00: 63 74 73 20 74 68 61 74 20 64 65 66 69 6e 65 20 cts that define
0d10: 61 20 62 61 73 65 6c 69 6e 65 20 68 61 76 65 20 a baseline have
0d20: 74 77 6f 20 66 69 65 6c 64 73 20 28 74 68 65 0a two fields (the.
0d30: 52 2d 63 61 72 64 20 61 6e 64 20 5a 2d 63 61 72 R-card and Z-car
0d40: 64 29 20 74 68 61 74 20 72 65 63 6f 72 64 20 4d d) that record M
0d50: 44 35 20 68 61 73 68 73 20 6f 66 20 74 68 65 20 D5 hashs of the
0d60: 6d 61 6e 69 66 65 73 74 20 69 74 73 65 6c 66 0a manifest itself.
0d70: 61 6e 64 20 6f 66 20 61 6c 6c 20 6f 74 68 65 72 and of all other
0d80: 20 66 69 6c 65 73 20 69 6e 20 74 68 65 20 6d 61 files in the ma
0d90: 6e 69 66 65 73 74 2e 20 20 50 72 69 6f 72 20 74 nifest. Prior t
0da0: 6f 20 61 6e 79 20 63 68 65 63 6b 2d 69 6e 0a 63 o any check-in.c
0db0: 6f 6d 6d 69 74 2c 20 74 68 65 73 65 20 63 68 65 ommit, these che
0dc0: 63 6b 73 75 6d 73 20 61 72 65 20 76 65 72 69 66 cksums are verif
0dd0: 69 65 64 20 74 6f 20 65 6e 73 75 72 65 20 74 68 ied to ensure th
0de0: 61 74 20 74 68 65 20 62 61 73 65 6c 69 6e 65 0a at the baseline.
0df0: 63 68 65 63 6b 65 64 20 69 6e 20 61 67 72 65 65 checked in agree
0e00: 73 20 65 78 61 63 74 6c 79 20 77 69 74 68 20 77 s exactly with w
0e10: 68 61 74 20 69 73 20 6f 6e 20 64 69 73 6b 2e 20 hat is on disk.
0e20: 20 53 69 6d 69 6c 61 72 6c 79 2c 0a 74 68 65 20 Similarly,.the
0e30: 72 65 70 6f 73 69 74 6f 72 79 20 63 68 65 63 6b repository check
0e40: 73 75 6d 20 69 73 20 76 65 72 69 66 69 65 64 20 sum is verified
0e50: 61 66 74 65 72 20 61 20 63 68 65 63 6b 6f 75 74 after a checkout
0e60: 20 74 6f 20 6d 61 6b 65 0a 73 75 72 65 20 74 68 to make.sure th
0e70: 61 74 20 74 68 65 20 65 6e 74 69 72 65 20 72 65 at the entire re
0e80: 70 6f 73 69 74 6f 72 79 20 77 61 73 20 63 68 65 pository was che
0e90: 63 6b 65 64 20 6f 75 74 20 63 6f 72 72 65 63 74 cked out correct
0ea0: 6c 79 2e 0a 4e 6f 74 65 20 74 68 61 74 20 74 68 ly..Note that th
0eb0: 65 73 65 20 61 64 64 65 64 20 63 68 65 63 6b 73 ese added checks
0ec0: 20 75 73 65 20 61 20 64 69 66 66 65 72 65 6e 74 use a different
0ed0: 20 68 61 73 68 20 28 4d 44 35 20 69 6e 73 74 65 hash (MD5 inste
0ee0: 61 64 0a 6f 66 20 53 48 41 31 29 20 69 6e 20 6f ad.of SHA1) in o
0ef0: 72 64 65 72 20 74 6f 20 61 76 6f 69 64 20 63 6f rder to avoid co
0f00: 6d 6d 6f 6e 2d 6d 6f 64 65 20 66 61 69 6c 75 72 mmon-mode failur
0f10: 65 73 20 69 6e 20 74 68 65 20 68 61 73 68 0a 61 es in the hash.a
0f20: 6c 67 6f 72 69 74 68 6d 20 69 6d 70 6c 65 6d 65 lgorithm impleme
0f30: 6e 74 61 74 69 6f 6e 2e 0a 3c 2f 70 3e 0a ntation..</p>.