Artifact aaab800d384d0f1232ee6ec15473a9f6d20c48ac:
File
www/pop.wiki
part of check-in
[d87ca60c58]
- initial ports of static .html to static /doc .wiki
by
stephan on
2008-05-15 20:25:46.
Also file
www/pop.wiki
part of check-in
[f94f7e5f49]
- Merge the fork back together.
by
drh on
2008-05-16 00:27:49.
0000: 3c 68 31 3e 50 72 69 6e 63 69 70 6c 65 73 20 4f <h1>Principles O
0010: 66 20 4f 70 65 72 61 74 69 6f 6e 3c 2f 68 31 3e f Operation</h1>
0020: 0a 0a 3c 70 3e 0a 54 68 69 73 20 70 61 67 65 20 ..<p>.This page
0030: 61 74 74 65 6d 70 74 73 20 74 6f 20 64 65 66 69 attempts to defi
0040: 6e 65 20 74 68 65 20 66 6f 75 6e 64 61 74 69 6f ne the foundatio
0050: 6e 61 6c 20 70 72 69 6e 63 69 70 61 6c 73 20 75 nal principals u
0060: 70 6f 6e 0a 77 68 69 63 68 20 46 6f 73 73 69 6c pon.which Fossil
0070: 20 69 73 20 62 75 69 6c 74 2e 0a 3c 2f 70 3e 0a is built..</p>.
0080: 0a 3c 75 6c 3e 0a 3c 6c 69 3e 3c 70 3e 41 20 70 .<ul>.<li><p>A p
0090: 72 6f 6a 65 63 74 20 63 6f 6e 73 69 73 74 73 20 roject consists
00a0: 6f 66 20 73 6f 75 72 63 65 20 66 69 6c 65 73 2c of source files,
00b0: 20 77 69 6b 69 20 70 61 67 65 73 2c 20 61 6e 64 wiki pages, and
00c0: 20 0a 74 72 6f 75 62 6c 65 20 74 69 63 6b 65 74 .trouble ticket
00d0: 73 2c 20 61 6e 64 20 63 6f 6e 74 72 6f 6c 20 66 s, and control f
00e0: 69 6c 65 73 20 28 63 6f 6c 6c 65 63 74 69 76 65 iles (collective
00f0: 6c 79 20 22 61 72 74 69 66 61 63 74 73 22 29 2e ly "artifacts").
0100: 0a 41 6c 6c 20 68 69 73 74 6f 72 69 63 61 6c 20 .All historical
0110: 63 6f 70 69 65 73 20 6f 66 20 61 6c 6c 20 61 72 copies of all ar
0120: 74 69 66 61 63 74 73 0a 61 72 65 20 73 61 76 65 tifacts.are save
0130: 64 2e 20 20 54 68 65 20 70 72 6f 6a 65 63 74 20 d. The project
0140: 6d 61 69 6e 74 61 69 6e 73 20 61 6e 20 61 75 64 maintains an aud
0150: 69 74 0a 74 72 61 69 6c 2e 3c 2f 70 3e 3c 2f 6c it.trail.</p></l
0160: 69 3e 0a 0a 3c 6c 69 3e 3c 70 3e 41 20 70 72 6f i>..<li><p>A pro
0170: 6a 65 63 74 20 72 65 73 69 64 65 73 20 69 6e 20 ject resides in
0180: 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 72 65 70 6f one or more repo
0190: 73 69 74 6f 72 69 65 73 2e 20 20 45 61 63 68 0a sitories. Each.
01a0: 72 65 70 6f 73 69 74 6f 72 79 20 69 73 20 61 64 repository is ad
01b0: 6d 69 6e 69 73 74 65 72 65 64 20 61 6e 64 20 6f ministered and o
01c0: 70 65 72 61 74 65 73 20 69 6e 64 65 70 65 6e 64 perates independ
01d0: 65 6e 74 6c 79 20 0a 6f 66 20 74 68 65 20 6f 74 ently .of the ot
01e0: 68 65 72 73 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 0a hers.</p></li>..
01f0: 3c 6c 69 3e 3c 70 3e 45 61 63 68 20 72 65 70 6f <li><p>Each repo
0200: 73 69 74 6f 72 79 20 68 61 73 20 62 6f 74 68 20 sitory has both
0210: 67 6c 6f 62 61 6c 20 61 6e 64 20 6c 6f 63 61 6c global and local
0220: 20 73 74 61 74 65 2e 20 20 54 68 65 0a 67 6c 6f state. The.glo
0230: 62 61 6c 20 73 74 61 74 65 20 69 73 20 63 6f 6d bal state is com
0240: 6d 6f 6e 20 74 6f 20 61 6c 6c 20 72 65 70 6f 73 mon to all repos
0250: 69 74 6f 72 69 65 73 20 28 6f 72 20 61 74 20 6c itories (or at l
0260: 65 61 73 74 0a 68 61 73 20 74 68 65 20 70 6f 74 east.has the pot
0270: 65 6e 74 69 61 6c 20 74 6f 20 62 65 20 73 68 61 ential to be sha
0280: 72 65 64 20 69 6e 20 63 6f 6d 6d 6f 6e 20 77 68 red in common wh
0290: 65 6e 20 74 68 65 0a 72 65 70 6f 73 69 74 6f 72 en the.repositor
02a0: 69 65 73 20 61 72 65 20 66 75 6c 6c 79 20 73 79 ies are fully sy
02b0: 6e 63 68 72 6f 6e 69 7a 65 64 29 2e 20 20 54 68 nchronized). Th
02c0: 65 20 6c 6f 63 61 6c 20 73 74 61 74 65 0a 66 6f e local state.fo
02d0: 72 20 65 61 63 68 20 72 65 70 6f 73 69 74 6f 72 r each repositor
02e0: 79 20 69 73 20 70 72 69 76 61 74 65 20 74 6f 20 y is private to
02f0: 74 68 61 74 20 72 65 70 6f 73 69 74 6f 72 79 2e that repository.
0300: 0a 54 68 65 20 67 6c 6f 62 61 6c 20 73 74 61 74 .The global stat
0310: 65 20 72 65 70 72 65 73 65 6e 74 73 20 74 68 65 e represents the
0320: 20 63 6f 6e 74 65 6e 74 20 6f 66 20 74 68 65 20 content of the
0330: 70 72 6f 6a 65 63 74 2e 0a 54 68 65 20 6c 6f 63 project..The loc
0340: 61 6c 20 73 74 61 74 65 20 69 64 65 6e 74 69 66 al state identif
0350: 69 65 73 20 74 68 65 20 61 75 74 68 6f 72 69 7a ies the authoriz
0360: 65 64 20 75 73 65 72 73 20 61 6e 64 0a 61 63 63 ed users and.acc
0370: 65 73 73 20 70 6f 6c 69 63 69 65 73 20 66 6f 72 ess policies for
0380: 20 61 20 70 61 72 74 69 63 75 6c 61 72 20 72 65 a particular re
0390: 70 6f 73 69 74 6f 72 79 2e 3c 2f 70 3e 3c 2f 6c pository.</p></l
03a0: 69 3e 0a 0a 3c 6c 69 3e 3c 70 3e 54 68 65 20 67 i>..<li><p>The g
03b0: 6c 6f 62 61 6c 20 73 74 61 74 65 20 6f 66 20 61 lobal state of a
03c0: 20 72 65 70 6f 73 69 74 6f 72 79 20 69 73 20 61 repository is a
03d0: 6e 20 75 6e 6f 72 64 65 72 65 64 0a 63 6f 6c 6c n unordered.coll
03e0: 65 63 74 69 6f 6e 20 6f 66 20 61 72 74 69 66 61 ection of artifa
03f0: 63 74 73 2e 20 20 45 61 63 68 20 61 72 74 69 66 cts. Each artif
0400: 61 63 74 20 69 73 20 6e 61 6d 65 64 20 62 79 20 act is named by
0410: 0a 69 74 73 20 53 48 41 31 20 68 61 73 68 20 65 .its SHA1 hash e
0420: 6e 63 6f 64 65 64 20 69 6e 20 6c 6f 77 65 72 63 ncoded in lowerc
0430: 61 73 65 20 68 65 78 61 64 65 63 69 6d 61 6c 2e ase hexadecimal.
0440: 0a 49 6e 20 6d 61 6e 79 20 63 6f 6e 74 65 78 74 .In many context
0450: 73 2c 20 74 68 65 20 6e 61 6d 65 20 63 61 6e 20 s, the name can
0460: 62 65 0a 61 62 62 72 65 76 69 61 74 65 64 20 74 be.abbreviated t
0470: 6f 20 61 20 75 6e 69 71 75 65 20 70 72 65 66 69 o a unique prefi
0480: 78 2e 20 20 41 20 66 69 76 65 2d 20 6f 72 20 73 x. A five- or s
0490: 69 78 2d 63 68 61 72 61 63 74 65 72 0a 70 72 65 ix-character.pre
04a0: 66 69 78 20 75 73 75 61 6c 6c 79 20 73 75 66 66 fix usually suff
04b0: 69 63 65 73 20 74 6f 20 75 6e 69 71 75 65 6c 79 ices to uniquely
04c0: 20 69 64 65 6e 74 69 66 79 20 61 20 66 69 6c 65 identify a file
04d0: 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e .</p></li>..<li>
04e0: 3c 70 3e 42 65 63 61 75 73 65 20 61 72 74 69 66 <p>Because artif
04f0: 61 63 74 73 20 61 72 65 20 6e 61 6d 65 64 20 62 acts are named b
0500: 79 20 74 68 65 69 72 20 53 48 41 31 20 68 61 73 y their SHA1 has
0510: 68 2c 20 61 6c 6c 20 61 72 74 69 66 61 63 74 73 h, all artifacts
0520: 0a 61 72 65 20 69 6d 6d 75 74 61 62 6c 65 2e 20 .are immutable.
0530: 20 41 6e 79 20 63 68 61 6e 67 65 20 74 6f 20 74 Any change to t
0540: 68 65 20 63 6f 6e 74 65 6e 74 20 6f 66 20 61 20 he content of a
0550: 61 72 74 69 66 61 63 74 20 61 6c 73 6f 20 0a 63 artifact also .c
0560: 68 61 6e 67 65 73 20 74 68 65 20 68 61 73 68 20 hanges the hash
0570: 74 68 61 74 20 66 6f 72 6d 73 20 74 68 65 20 61 that forms the a
0580: 72 74 69 66 61 63 74 73 20 6e 61 6d 65 2c 20 74 rtifacts name, t
0590: 68 75 73 0a 63 72 65 61 74 69 6e 67 20 61 20 6e hus.creating a n
05a0: 65 77 20 61 72 74 69 66 61 63 74 2e 20 20 42 6f ew artifact. Bo
05b0: 74 68 20 74 68 65 20 6f 6c 64 20 6f 72 69 67 69 th the old origi
05c0: 6e 61 6c 20 76 65 72 73 69 6f 6e 20 6f 66 20 74 nal version of t
05d0: 68 65 0a 61 72 74 69 66 61 63 74 20 61 6e 64 20 he.artifact and
05e0: 74 68 65 20 6e 65 77 20 63 68 61 6e 67 65 20 61 the new change a
05f0: 72 65 20 70 72 65 73 65 72 76 65 64 20 75 6e 64 re preserved und
0600: 65 72 20 64 69 66 66 65 72 65 6e 74 20 6e 61 6d er different nam
0610: 65 73 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 0a 3c 6c es.</p></li>..<l
0620: 69 3e 3c 70 3e 49 74 20 69 73 20 74 68 65 6f 72 i><p>It is theor
0630: 65 74 69 63 61 6c 6c 79 20 70 6f 73 73 69 62 6c etically possibl
0640: 65 20 66 6f 72 20 74 77 6f 20 61 72 74 69 66 61 e for two artifa
0650: 63 74 73 20 77 69 74 68 20 64 69 66 66 65 72 65 cts with differe
0660: 6e 74 0a 63 6f 6e 74 65 6e 74 20 74 6f 20 73 68 nt.content to sh
0670: 61 72 65 20 74 68 65 20 73 61 6d 65 20 68 61 73 are the same has
0680: 68 2e 20 20 42 75 74 20 66 69 6e 64 69 6e 67 20 h. But finding
0690: 74 77 6f 20 73 75 63 68 0a 61 72 74 69 66 61 63 two such.artifac
06a0: 74 73 20 69 73 20 73 6f 20 69 6e 63 72 65 64 69 ts is so incredi
06b0: 62 6c 79 20 64 69 66 66 69 63 75 6c 74 20 61 6e bly difficult an
06c0: 64 20 75 6e 6c 69 6b 65 6c 79 20 74 68 61 74 20 d unlikely that
06d0: 77 65 0a 63 6f 6e 73 69 64 65 72 20 69 74 20 74 we.consider it t
06e0: 6f 20 62 65 20 61 6e 20 69 6d 70 6f 73 73 69 62 o be an impossib
06f0: 69 6c 69 74 79 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a ility.</p></li>.
0700: 0a 3c 6c 69 3e 3c 70 3e 54 68 65 20 73 69 67 6e .<li><p>The sign
0710: 61 74 75 72 65 20 6f 66 20 61 6e 20 61 72 74 69 ature of an arti
0720: 66 61 63 74 20 69 73 20 74 68 65 20 53 48 41 31 fact is the SHA1
0730: 20 68 61 73 68 20 6f 66 20 74 68 65 20 0a 61 72 hash of the .ar
0740: 74 69 66 61 63 74 20 69 74 73 65 6c 66 2c 20 65 tifact itself, e
0750: 78 61 63 74 6c 79 20 61 73 20 69 74 20 77 6f 75 xactly as it wou
0760: 6c 64 20 61 70 70 65 61 72 20 69 6e 20 61 20 64 ld appear in a d
0770: 69 73 6b 20 66 69 6c 65 2e 20 20 4e 6f 20 70 72 isk file. No pr
0780: 65 66 69 78 0a 6f 72 20 6d 65 74 61 2d 69 6e 66 efix.or meta-inf
0790: 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 74 ormation about t
07a0: 68 65 20 61 72 74 69 66 61 63 74 20 69 73 20 61 he artifact is a
07b0: 64 64 65 64 20 62 65 66 6f 72 65 20 63 6f 6d 70 dded before comp
07c0: 75 74 69 6e 67 0a 74 68 65 20 68 61 73 68 2e 20 uting.the hash.
07d0: 20 53 6f 20 79 6f 75 20 63 61 6e 0a 61 6c 77 61 So you can.alwa
07e0: 79 73 20 66 69 6e 64 20 74 68 65 20 53 48 41 31 ys find the SHA1
07f0: 20 73 69 67 6e 61 74 75 72 65 20 6f 66 20 61 20 signature of a
0800: 66 69 6c 65 20 62 79 20 75 73 69 6e 67 20 74 68 file by using th
0810: 65 0a 22 73 68 61 31 73 75 6d 22 20 63 6f 6d 6d e."sha1sum" comm
0820: 61 6e 64 2d 6c 69 6e 65 20 75 74 69 6c 69 74 79 and-line utility
0830: 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e .</p></li>..<li>
0840: 3c 70 3e 54 68 65 20 61 72 74 69 66 61 63 74 73 <p>The artifacts
0850: 20 74 68 61 74 20 63 6f 6d 70 72 69 73 65 20 74 that comprise t
0860: 68 65 20 67 6c 6f 62 61 6c 20 73 74 61 74 65 20 he global state
0870: 6f 66 20 61 20 72 65 70 6f 73 69 74 6f 72 79 0a of a repository.
0880: 61 72 65 20 74 68 65 20 63 6f 6d 70 6c 65 74 65 are the complete
0890: 20 67 6c 6f 62 61 6c 20 73 74 61 74 65 20 6f 66 global state of
08a0: 20 74 68 61 74 20 72 65 70 6f 73 69 74 6f 72 79 that repository
08b0: 2e 20 20 54 68 65 20 53 51 4c 69 74 65 0a 64 61 . The SQLite.da
08c0: 74 61 62 61 73 65 20 74 68 61 74 20 68 6f 6c 64 tabase that hold
08d0: 73 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 s the repository
08e0: 20 63 6f 6e 74 61 69 6e 73 20 61 64 64 69 74 69 contains additi
08f0: 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e onal information
0900: 0a 61 62 6f 75 74 20 6c 69 6e 6b 61 67 65 73 20 .about linkages
0910: 62 65 74 77 65 65 6e 20 61 72 74 69 66 61 63 74 between artifact
0920: 73 2c 20 62 75 74 20 61 6c 6c 20 6f 66 20 74 68 s, but all of th
0930: 61 74 20 61 64 64 65 64 20 69 6e 66 6f 72 6d 61 at added informa
0940: 74 69 6f 6e 0a 63 61 6e 20 62 65 20 64 69 73 63 tion.can be disc
0950: 61 72 64 65 64 20 61 6e 64 20 72 65 63 6f 6e 73 arded and recons
0960: 74 72 75 63 74 65 64 20 62 79 20 72 65 73 63 61 tructed by resca
0970: 6e 6e 69 6e 67 20 74 68 65 20 63 6f 6e 74 65 6e nning the conten
0980: 74 0a 61 72 74 69 66 61 63 74 73 2e 3c 2f 70 3e t.artifacts.</p>
0990: 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e 3c 70 3e 54 77 </li>..<li><p>Tw
09a0: 6f 20 72 65 70 6f 73 69 74 6f 72 69 65 73 20 66 o repositories f
09b0: 6f 72 20 74 68 65 20 73 61 6d 65 20 70 72 6f 6a or the same proj
09c0: 65 63 74 20 63 61 6e 20 73 79 6e 63 68 72 6f 6e ect can synchron
09d0: 69 7a 65 0a 74 68 65 69 72 20 67 6c 6f 62 61 6c ize.their global
09e0: 20 73 74 61 74 65 73 20 73 69 6d 70 6c 79 20 62 states simply b
09f0: 79 20 73 68 61 72 69 6e 67 20 61 72 74 69 66 61 y sharing artifa
0a00: 63 74 73 2e 20 20 54 68 65 20 6c 6f 63 61 6c 0a cts. The local.
0a10: 73 74 61 74 65 20 6f 66 20 72 65 70 6f 73 69 74 state of reposit
0a20: 6f 72 69 65 73 20 69 73 20 6e 6f 74 20 6e 6f 72 ories is not nor
0a30: 6d 61 6c 6c 79 20 73 79 6e 63 68 72 6f 6e 69 7a mally synchroniz
0a40: 65 64 20 6f 72 0a 73 68 61 72 65 64 2e 3c 2f 70 ed or.shared.</p
0a50: 3e 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e 3c 70 3e 45 ></li>..<li><p>E
0a60: 76 65 72 79 20 62 61 73 65 6c 69 6e 65 20 68 61 very baseline ha
0a70: 73 20 61 20 73 70 65 63 69 61 6c 20 66 69 6c 65 s a special file
0a80: 20 61 74 20 74 68 65 20 74 6f 70 2d 6c 65 76 65 at the top-leve
0a90: 6c 0a 6e 61 6d 65 64 20 22 6d 61 6e 69 66 65 73 l.named "manifes
0aa0: 74 22 20 77 68 69 63 68 20 69 73 20 61 6e 20 69 t" which is an i
0ab0: 6e 64 65 78 20 6f 66 20 61 6c 6c 20 6f 74 68 65 ndex of all othe
0ac0: 72 20 66 69 6c 65 73 20 69 6e 0a 74 68 61 74 20 r files in.that
0ad0: 62 61 73 65 6c 69 6e 65 2e 20 20 54 68 65 20 6d baseline. The m
0ae0: 61 6e 69 66 65 73 74 20 69 73 20 61 75 74 6f 6d anifest is autom
0af0: 61 74 69 63 61 6c 6c 79 20 63 72 65 61 74 65 64 atically created
0b00: 20 61 6e 64 0a 6d 61 69 6e 74 61 69 6e 65 64 20 and.maintained
0b10: 62 79 20 74 68 65 20 73 79 73 74 65 6d 2e 3c 2f by the system.</
0b20: 70 3e 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e 3c 70 3e p></li>..<li><p>
0b30: 54 68 65 20 3c 61 20 68 72 65 66 3d 22 66 69 6c The <a href="fil
0b40: 65 66 6f 72 6d 61 74 2e 68 74 6d 6c 22 3e 66 69 eformat.html">fi
0b50: 6c 65 20 66 6f 72 6d 61 74 73 3c 2f 61 3e 0a 75 le formats</a>.u
0b60: 73 65 64 20 62 79 20 46 6f 73 73 69 6c 20 61 72 sed by Fossil ar
0b70: 65 20 61 6c 6c 20 76 65 72 79 20 73 69 6d 70 6c e all very simpl
0b80: 65 20 73 6f 20 74 68 61 74 20 77 69 74 68 20 61 e so that with a
0b90: 63 63 65 73 73 0a 74 6f 20 74 68 65 20 6f 72 69 ccess.to the ori
0ba0: 67 69 6e 61 6c 20 63 6f 6e 74 65 6e 74 20 66 69 ginal content fi
0bb0: 6c 65 73 2c 20 6f 6e 65 20 63 61 6e 20 65 61 73 les, one can eas
0bc0: 69 6c 79 20 72 65 63 6f 6e 73 74 72 75 63 74 0a ily reconstruct.
0bd0: 74 68 65 20 63 6f 6e 74 65 6e 74 20 6f 66 20 61 the content of a
0be0: 20 62 61 73 65 6c 69 6e 65 20 77 69 74 68 6f 75 baseline withou
0bf0: 74 20 74 68 65 20 6e 65 65 64 20 66 6f 72 20 61 t the need for a
0c00: 6e 79 0a 73 70 65 63 69 61 6c 20 74 6f 6f 6c 73 ny.special tools
0c10: 20 6f 72 20 73 6f 66 74 77 61 72 65 2e 3c 2f 70 or software.</p
0c20: 3e 3c 2f 6c 69 3e 0a ></li>.