Hex Artifact Content
Not logged in

Artifact fb37090eee982e9c64850beae7d33c5a4bd2d7aa:

File www/branching.wiki part of check-in [5e4b1632bc] - Fix incorrect check-in numbers (referring to Figure 5) in the branching tutorial by eric on 2009-01-26 19:41:49.

0000: 3c 68 31 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <h1 align="cente
0010: 72 22 3e 0a 42 72 61 6e 63 68 69 6e 67 2c 20 46  r">.Branching, F
0020: 6f 72 6b 69 6e 67 2c 20 4d 65 72 67 69 6e 67 2c  orking, Merging,
0030: 20 61 6e 64 20 54 61 67 67 69 6e 67 0a 3c 2f 68   and Tagging.</h
0040: 31 3e 0a 0a 49 6e 20 61 20 73 69 6d 70 6c 65 20  1>..In a simple 
0050: 61 6e 64 20 70 65 72 66 65 63 74 20 77 6f 72 6c  and perfect worl
0060: 64 2c 20 74 68 65 20 64 65 76 65 6c 6f 70 6d 65  d, the developme
0070: 6e 74 20 6f 66 20 61 20 70 72 6f 6a 65 63 74 20  nt of a project 
0080: 77 6f 75 6c 64 20 70 72 6f 63 65 65 64 0a 6c 69  would proceed.li
0090: 6e 65 61 72 6c 79 2c 20 61 73 20 73 68 6f 77 6e  nearly, as shown
00a0: 20 69 6e 20 66 69 67 75 72 65 20 31 2e 0a 0a 3c   in figure 1...<
00b0: 63 65 6e 74 65 72 3e 3c 74 61 62 6c 65 20 62 6f  center><table bo
00c0: 72 64 65 72 3d 31 20 63 65 6c 6c 70 61 64 64 69  rder=1 cellpaddi
00d0: 6e 67 3d 31 30 20 68 73 70 61 63 65 3d 31 30 20  ng=10 hspace=10 
00e0: 76 73 70 61 63 65 3d 31 30 3e 0a 3c 74 72 3e 3c  vspace=10>.<tr><
00f0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
0100: 22 3e 0a 3c 69 6d 67 20 73 72 63 3d 22 62 72 61  ">.<img src="bra
0110: 6e 63 68 30 31 2e 67 69 66 22 20 77 69 64 74 68  nch01.gif" width
0120: 3d 32 38 30 20 68 65 69 67 68 74 3d 36 38 3e 3c  =280 height=68><
0130: 62 72 3e 0a 46 69 67 75 72 65 20 31 0a 3c 2f 74  br>.Figure 1.</t
0140: 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 3c  d></tr></table><
0150: 2f 63 65 6e 74 65 72 3e 0a 0a 45 61 63 68 20 63  /center>..Each c
0160: 69 72 63 6c 65 20 72 65 70 72 65 73 65 6e 74 73  ircle represents
0170: 20 61 20 63 68 65 63 6b 2d 69 6e 2e 20 20 46 6f   a check-in.  Fo
0180: 72 20 74 68 65 20 73 61 6b 65 20 6f 66 20 63 6c  r the sake of cl
0190: 61 72 69 74 79 2c 20 74 68 65 20 63 68 65 63 6b  arity, the check
01a0: 2d 69 6e 73 0a 61 72 65 20 67 69 76 65 6e 20 73  -ins.are given s
01b0: 6d 61 6c 6c 20 63 6f 6e 73 65 63 75 74 69 76 65  mall consecutive
01c0: 20 6e 75 6d 62 65 72 73 2e 20 20 49 6e 20 61 20   numbers.  In a 
01d0: 72 65 61 6c 20 73 79 73 74 65 6d 2c 20 6f 66 20  real system, of 
01e0: 63 6f 75 72 73 65 2c 20 74 68 65 0a 63 68 65 63  course, the.chec
01f0: 6b 2d 69 6e 20 6e 75 6d 62 65 72 73 20 77 6f 75  k-in numbers wou
0200: 6c 64 20 62 65 20 34 30 2d 63 68 61 72 61 63 74  ld be 40-charact
0210: 65 72 20 53 48 41 31 20 68 61 73 68 65 73 20 73  er SHA1 hashes s
0220: 69 6e 63 65 20 69 74 20 69 73 20 6e 6f 74 20 70  ince it is not p
0230: 6f 73 73 69 62 6c 65 0a 74 6f 20 61 6c 6c 6f 63  ossible.to alloc
0240: 61 74 65 20 63 6f 6c 6c 69 73 69 6f 6e 2d 66 72  ate collision-fr
0250: 65 65 20 73 65 71 75 65 6e 74 69 61 6c 20 6e 75  ee sequential nu
0260: 6d 62 65 72 73 20 69 73 20 61 20 64 69 73 74 72  mbers is a distr
0270: 69 62 75 74 65 64 20 73 79 73 74 65 6d 2e 0a 42  ibuted system..B
0280: 75 74 20 73 65 71 75 65 6e 74 69 61 6c 20 6e 75  ut sequential nu
0290: 6d 62 65 72 73 20 61 72 65 20 65 61 73 69 65 72  mbers are easier
02a0: 20 74 6f 20 72 65 61 64 2c 20 73 6f 20 77 65 20   to read, so we 
02b0: 77 69 6c 6c 20 73 75 62 73 74 69 74 75 74 65 20  will substitute 
02c0: 74 68 65 6d 20 66 6f 72 0a 74 68 65 20 34 30 2d  them for.the 40-
02d0: 63 68 61 72 61 63 74 65 72 20 53 48 41 31 20 68  character SHA1 h
02e0: 61 73 68 65 73 20 69 6e 20 74 68 69 73 20 64 6f  ashes in this do
02f0: 63 75 6d 65 6e 74 2e 0a 0a 54 68 65 20 61 72 72  cument...The arr
0300: 6f 77 73 20 69 6e 20 66 69 67 75 72 65 20 31 20  ows in figure 1 
0310: 73 68 6f 77 20 65 76 6f 6c 75 74 69 6f 6e 20 6f  show evolution o
0320: 66 20 74 68 65 20 70 72 6f 6a 65 63 74 2e 20 20  f the project.  
0330: 54 68 65 20 69 6e 69 74 69 61 6c 0a 63 68 65 63  The initial.chec
0340: 6b 2d 69 6e 20 69 73 20 31 2e 20 20 43 68 65 63  k-in is 1.  Chec
0350: 6b 2d 69 6e 20 32 20 69 73 20 64 65 72 69 76 65  k-in 2 is derive
0360: 64 20 66 72 6f 6d 20 31 2e 20 20 49 6e 20 6f 74  d from 1.  In ot
0370: 68 65 72 20 77 6f 72 64 73 2c 20 63 68 65 63 6b  her words, check
0380: 2d 69 6e 20 32 0a 77 61 73 20 63 72 65 61 74 65  -in 2.was create
0390: 64 20 62 79 20 6d 61 6b 69 6e 67 20 65 64 69 74  d by making edit
03a0: 73 20 74 6f 20 63 68 65 63 6b 2d 69 6e 20 31 20  s to check-in 1 
03b0: 61 6e 64 20 74 68 65 6e 20 63 6f 6d 6d 69 74 74  and then committ
03c0: 69 6e 67 20 74 68 6f 73 65 20 65 64 69 74 73 2e  ing those edits.
03d0: 0a 57 65 20 73 61 79 20 74 68 61 74 20 32 20 69  .We say that 2 i
03e0: 73 20 61 20 3c 69 3e 63 68 69 6c 64 3c 2f 69 3e  s a <i>child</i>
03f0: 20 6f 66 20 31 0a 61 6e 64 20 74 68 61 74 20 31   of 1.and that 1
0400: 20 69 73 20 61 20 3c 69 3e 70 61 72 65 6e 74 3c   is a <i>parent<
0410: 2f 69 3e 20 6f 66 20 32 2e 20 20 0a 43 68 65 63  /i> of 2.  .Chec
0420: 6b 2d 69 6e 20 33 20 69 73 20 64 65 72 69 76 65  k-in 3 is derive
0430: 64 20 66 72 6f 6d 20 63 68 65 63 6b 2d 69 6e 20  d from check-in 
0440: 32 2c 20 6d 61 6b 69 6e 67 0a 33 20 61 20 63 68  2, making.3 a ch
0450: 69 6c 64 20 6f 66 20 32 2e 20 20 57 65 20 73 61  ild of 2.  We sa
0460: 79 20 74 68 61 74 20 33 20 69 73 20 61 20 3c 69  y that 3 is a <i
0470: 3e 64 65 73 63 65 6e 64 61 6e 74 3c 2f 69 3e 20  >descendant</i> 
0480: 6f 66 20 62 6f 74 68 20 31 20 61 6e 64 20 32 20  of both 1 and 2 
0490: 61 6e 64 20 74 68 61 74 20 31 0a 61 6e 64 20 32  and that 1.and 2
04a0: 20 61 72 65 20 62 6f 74 68 20 3c 69 3e 61 6e 63   are both <i>anc
04b0: 65 73 74 6f 72 73 3c 2f 69 3e 20 6f 66 20 33 2e  estors</i> of 3.
04c0: 20 20 0a 0a 57 65 20 63 61 6c 6c 20 74 68 65 20    ..We call the 
04d0: 67 72 61 70 68 20 6f 66 20 63 68 65 63 6b 2d 69  graph of check-i
04e0: 6e 73 20 61 20 3c 69 3e 74 72 65 65 3c 2f 69 3e  ns a <i>tree</i>
04f0: 2e 20 20 43 68 65 63 6b 2d 69 6e 20 31 20 69 73  .  Check-in 1 is
0500: 20 74 68 65 20 3c 69 3e 72 6f 6f 74 3c 2f 69 3e   the <i>root</i>
0510: 0a 73 69 6e 63 65 20 69 74 20 68 61 73 20 6e 6f  .since it has no
0520: 20 61 6e 63 65 73 74 6f 72 73 2e 20 20 43 68 65   ancestors.  Che
0530: 63 6b 2d 69 6e 20 34 20 69 73 20 61 20 3c 69 3e  ck-in 4 is a <i>
0540: 6c 65 61 66 3c 2f 69 3e 20 6f 66 20 74 68 65 20  leaf</i> of the 
0550: 74 72 65 65 20 73 69 6e 63 65 0a 69 74 20 68 61  tree since.it ha
0560: 73 20 6e 6f 20 64 65 73 63 65 6e 64 61 6e 74 73  s no descendants
0570: 2e 20 20 28 57 65 20 77 69 6c 6c 20 67 69 76 65  .  (We will give
0580: 20 61 20 6d 6f 72 65 20 70 72 65 63 69 73 65 20   a more precise 
0590: 69 6e 20 74 68 65 20 64 65 66 69 6e 69 74 69 6f  in the definitio
05a0: 6e 20 6f 66 0a 22 6c 65 61 66 22 20 6c 61 74 65  n of."leaf" late
05b0: 72 2e 29 0a 0a 41 6c 61 73 2c 20 72 65 61 6c 69  r.)..Alas, reali
05c0: 74 79 20 6f 66 74 65 6e 20 69 6e 74 65 72 66 65  ty often interfe
05d0: 72 65 73 20 77 69 74 68 20 74 68 65 20 73 69 6d  res with the sim
05e0: 70 6c 65 20 6c 69 6e 65 61 72 20 64 65 76 65 6c  ple linear devel
05f0: 6f 70 6d 65 6e 74 20 6f 66 20 61 0a 70 72 6f 6a  opment of a.proj
0600: 65 63 74 2e 20 20 53 75 70 70 6f 73 65 20 74 77  ect.  Suppose tw
0610: 6f 20 70 72 6f 67 72 61 6d 6d 65 72 73 20 6d 61  o programmers ma
0620: 6b 65 20 69 6e 64 65 70 65 6e 64 65 6e 74 20 6d  ke independent m
0630: 6f 64 69 66 69 63 61 74 69 6f 6e 73 20 74 6f 20  odifications to 
0640: 63 68 65 63 6b 2d 69 6e 20 32 2e 0a 41 66 74 65  check-in 2..Afte
0650: 72 20 62 6f 74 68 20 63 68 61 6e 67 65 73 20 61  r both changes a
0660: 72 65 20 63 68 65 63 6b 65 64 20 69 6e 2c 20 77  re checked in, w
0670: 65 20 68 61 76 65 20 61 20 63 68 65 63 6b 2d 69  e have a check-i
0680: 6e 20 67 72 61 70 68 20 74 68 61 74 20 6c 6f 6f  n graph that loo
0690: 6b 73 20 0a 6c 69 6b 65 20 66 69 67 75 72 65 20  ks .like figure 
06a0: 32 3a 0a 0a 3c 63 65 6e 74 65 72 3e 3c 74 61 62  2:..<center><tab
06b0: 6c 65 20 62 6f 72 64 65 72 3d 31 20 63 65 6c 6c  le border=1 cell
06c0: 70 61 64 64 69 6e 67 3d 31 30 20 68 73 70 61 63  padding=10 hspac
06d0: 65 3d 31 30 20 76 73 70 61 63 65 3d 31 30 3e 0a  e=10 vspace=10>.
06e0: 3c 74 72 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  <tr><td align="c
06f0: 65 6e 74 65 72 22 3e 0a 3c 69 6d 67 20 73 72 63  enter">.<img src
0700: 3d 22 62 72 61 6e 63 68 30 32 2e 67 69 66 22 20  ="branch02.gif" 
0710: 77 69 64 74 68 3d 32 31 30 20 68 65 69 67 68 74  width=210 height
0720: 3d 31 34 30 3e 3c 62 72 3e 0a 46 69 67 75 72 65  =140><br>.Figure
0730: 20 32 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74   2.</td></tr></t
0740: 61 62 6c 65 3e 3c 2f 63 65 6e 74 65 72 3e 0a 0a  able></center>..
0750: 54 68 65 20 67 72 61 70 68 20 69 6e 20 66 69 67  The graph in fig
0760: 75 72 65 20 32 20 68 61 73 20 74 77 6f 20 6c 65  ure 2 has two le
0770: 61 76 65 73 3a 20 63 68 65 63 6b 2d 69 6e 73 20  aves: check-ins 
0780: 33 20 61 6e 64 20 34 2e 20 20 43 68 65 63 6b 2d  3 and 4.  Check-
0790: 69 6e 20 32 20 68 61 73 0a 74 77 6f 20 63 68 69  in 2 has.two chi
07a0: 6c 64 72 65 6e 2c 20 63 68 65 63 6b 2d 69 6e 73  ldren, check-ins
07b0: 20 33 20 61 6e 64 20 34 2e 20 20 57 65 20 63 61   3 and 4.  We ca
07c0: 6c 6c 20 74 68 69 73 20 73 74 69 74 75 61 74 69  ll this stituati
07d0: 6f 6e 20 61 20 3c 69 3e 66 6f 72 6b 3c 2f 69 3e  on a <i>fork</i>
07e0: 2e 0a 0a 46 6f 73 73 69 6c 20 74 72 69 65 73 20  ...Fossil tries 
07f0: 74 6f 20 70 72 65 76 65 6e 74 20 66 6f 72 6b 73  to prevent forks
0800: 2e 20 20 53 75 70 70 6f 73 65 20 74 68 65 20 74  .  Suppose the t
0810: 77 6f 20 70 72 6f 67 72 61 6d 6d 65 72 73 20 77  wo programmers w
0820: 68 6f 20 77 65 72 65 0a 65 64 69 74 69 6e 67 20  ho were.editing 
0830: 63 68 65 63 6b 2d 69 6e 20 32 20 61 72 65 20 6e  check-in 2 are n
0840: 61 6d 65 64 20 41 6c 69 63 65 20 61 6e 64 20 42  amed Alice and B
0850: 6f 62 2e 20 20 53 75 70 70 6f 73 65 20 41 6c 69  ob.  Suppose Ali
0860: 63 65 20 66 69 6e 69 73 68 65 64 20 68 65 72 0a  ce finished her.
0870: 65 64 69 74 73 20 66 69 72 73 74 20 61 6e 64 20  edits first and 
0880: 64 69 64 20 61 20 63 6f 6d 6d 69 74 2c 20 72 65  did a commit, re
0890: 73 75 6c 74 69 6e 67 20 69 6e 20 63 68 65 63 6b  sulting in check
08a0: 2d 69 6e 20 33 2e 20 20 4c 61 74 65 72 2c 20 77  -in 3.  Later, w
08b0: 68 65 6e 20 42 6f 62 0a 74 72 69 65 64 20 74 6f  hen Bob.tried to
08c0: 20 63 6f 6d 6d 69 74 20 68 69 73 20 63 68 61 6e   commit his chan
08d0: 67 65 73 2c 20 66 6f 73 73 69 6c 20 77 6f 75 6c  ges, fossil woul
08e0: 64 20 74 72 79 20 74 6f 20 76 65 72 69 66 79 20  d try to verify 
08f0: 74 68 61 74 20 63 68 65 63 6b 2d 69 6e 20 32 0a  that check-in 2.
0900: 77 61 73 20 73 74 69 6c 6c 20 61 20 6c 65 61 66  was still a leaf
0910: 2e 20 20 46 6f 73 73 69 6c 20 77 6f 75 6c 64 20  .  Fossil would 
0920: 73 65 65 20 74 68 61 74 20 63 68 65 63 6b 2d 69  see that check-i
0930: 6e 20 33 20 68 61 64 20 6f 63 63 75 72 72 65 64  n 3 had occurred
0940: 20 61 6e 64 20 77 6f 75 6c 64 0a 61 62 6f 72 74   and would.abort
0950: 20 42 6f 62 27 73 20 63 6f 6d 6d 69 74 20 61 74   Bob's commit at
0960: 74 65 6d 70 74 20 77 69 74 68 20 61 20 6d 65 73  tempt with a mes
0970: 73 61 67 65 20 22 77 6f 75 6c 64 20 66 6f 72 6b  sage "would fork
0980: 22 2e 20 20 54 68 69 73 20 61 6c 6c 6f 77 73 20  ".  This allows 
0990: 42 6f 62 0a 74 6f 20 64 6f 20 61 20 22 66 6f 73  Bob.to do a "fos
09a0: 73 69 6c 20 75 70 64 61 74 65 22 20 77 68 69 63  sil update" whic
09b0: 68 20 77 6f 75 6c 64 20 70 75 6c 6c 20 69 6e 20  h would pull in 
09c0: 41 6c 69 63 65 73 20 63 68 61 6e 67 65 73 20 61  Alices changes a
09d0: 6e 64 20 6d 65 72 67 65 20 74 68 65 6d 0a 74 6f  nd merge them.to
09e0: 67 65 74 68 65 72 20 77 69 74 68 20 68 69 73 20  gether with his 
09f0: 6f 77 6e 20 63 68 61 6e 67 65 73 2e 20 20 41 66  own changes.  Af
0a00: 74 65 72 20 6d 65 72 67 69 6e 67 2c 20 42 6f 62  ter merging, Bob
0a10: 20 63 6f 75 6c 64 20 74 68 65 6e 20 63 6f 6d 6d   could then comm
0a20: 69 74 0a 63 68 65 63 6b 2d 69 6e 20 34 20 61 73  it.check-in 4 as
0a30: 20 61 20 63 68 69 6c 64 20 6f 66 20 63 68 65 63   a child of chec
0a40: 6b 2d 69 6e 20 33 20 61 6e 64 20 74 68 65 20 72  k-in 3 and the r
0a50: 65 73 75 6c 74 20 77 6f 75 6c 64 20 62 65 20 61  esult would be a
0a60: 20 6c 69 6e 65 61 72 20 67 72 61 70 68 0a 61 73   linear graph.as
0a70: 20 73 68 6f 77 6e 20 69 6e 20 66 69 67 75 72 65   shown in figure
0a80: 20 31 2e 20 20 54 68 69 73 20 69 73 20 68 6f 77   1.  This is how
0a90: 20 43 56 53 20 77 6f 72 6b 73 2e 20 20 54 68 69   CVS works.  Thi
0aa0: 73 20 69 73 20 61 6c 73 6f 20 68 6f 77 20 66 6f  s is also how fo
0ab0: 73 73 69 6c 0a 77 6f 72 6b 73 20 69 6e 20 22 61  ssil.works in "a
0ac0: 75 74 6f 73 79 6e 63 22 20 6d 6f 64 65 2e 0a 0a  utosync" mode...
0ad0: 42 75 74 20 69 74 20 6d 69 67 68 74 20 62 65 20  But it might be 
0ae0: 74 68 61 74 20 42 6f 62 20 69 73 20 6f 66 66 2d  that Bob is off-
0af0: 6e 65 74 77 6f 72 6b 20 77 68 65 6e 20 68 65 20  network when he 
0b00: 64 6f 65 73 20 68 69 73 20 63 6f 6d 6d 69 74 2c  does his commit,
0b10: 20 73 6f 20 68 65 0a 68 61 73 20 6e 6f 20 77 61   so he.has no wa
0b20: 79 20 6f 66 20 6b 6e 6f 77 69 6e 67 20 74 68 61  y of knowing tha
0b30: 74 20 41 6c 69 63 65 20 68 61 73 20 61 6c 72 65  t Alice has alre
0b40: 61 64 79 20 63 6f 6d 6d 69 74 74 65 64 20 68 65  ady committed he
0b50: 72 20 63 68 61 6e 67 65 73 2e 0a 4f 72 2c 20 69  r changes..Or, i
0b60: 74 20 63 6f 75 6c 64 20 62 65 20 74 68 61 74 20  t could be that 
0b70: 42 6f 62 20 68 61 73 20 74 75 72 6e 65 64 20 6f  Bob has turned o
0b80: 66 66 20 22 61 75 74 6f 73 79 6e 63 22 20 6d 6f  ff "autosync" mo
0b90: 64 65 20 69 6e 20 53 51 4c 69 74 65 2e 20 20 4f  de in SQLite.  O
0ba0: 72 2c 0a 6d 61 79 62 65 20 42 6f 62 20 6a 75 73  r,.maybe Bob jus
0bb0: 74 20 64 6f 65 73 6e 27 74 20 77 61 6e 74 20 74  t doesn't want t
0bc0: 6f 20 6d 65 72 67 65 20 69 6e 20 41 6c 69 63 65  o merge in Alice
0bd0: 73 20 63 68 61 6e 67 65 73 20 62 65 66 6f 72 65  s changes before
0be0: 20 68 65 20 68 61 73 0a 73 61 76 65 64 20 68 69   he has.saved hi
0bf0: 73 20 6f 77 6e 2c 20 73 6f 20 68 65 20 66 6f 72  s own, so he for
0c00: 63 65 73 20 74 68 65 20 63 6f 6d 6d 69 74 20 74  ces the commit t
0c10: 6f 20 6f 63 63 75 72 20 75 73 69 6e 67 20 74 68  o occur using th
0c20: 65 20 22 2d 2d 66 6f 72 63 65 22 20 6f 70 74 69  e "--force" opti
0c30: 6f 6e 0a 74 6f 20 74 68 65 20 66 6f 73 73 69 6c  on.to the fossil
0c40: 20 3c 62 3e 63 6f 6d 6d 69 74 3c 2f 62 3e 20 63   <b>commit</b> c
0c50: 6f 6d 6d 61 6e 64 2e 20 20 46 6f 72 20 77 68 61  ommand.  For wha
0c60: 74 65 76 65 72 20 72 65 61 73 6f 6e 2c 20 74 77  tever reason, tw
0c70: 6f 20 63 6f 6d 6d 69 74 73 20 61 67 61 69 6e 73  o commits agains
0c80: 74 0a 63 68 65 63 6b 2d 69 6e 20 32 20 68 61 76  t.check-in 2 hav
0c90: 65 20 6f 63 63 75 72 72 65 64 20 61 6e 64 20 6e  e occurred and n
0ca0: 6f 77 20 74 68 65 20 74 72 65 65 20 68 61 73 20  ow the tree has 
0cb0: 74 77 6f 20 6c 65 61 76 65 73 2e 0a 0a 53 6f 20  two leaves...So 
0cc0: 77 68 69 63 68 20 76 65 72 73 69 6f 6e 20 6f 66  which version of
0cd0: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 69 73 20   the project is 
0ce0: 74 68 65 20 22 6c 61 74 65 73 74 22 20 69 6e 20  the "latest" in 
0cf0: 74 68 65 20 73 65 6e 73 65 20 6f 66 20 68 61 76  the sense of hav
0d00: 69 6e 67 0a 74 68 65 20 6d 6f 73 74 20 66 65 61  ing.the most fea
0d10: 74 75 72 65 73 20 61 6e 64 20 74 68 65 20 6d 6f  tures and the mo
0d20: 73 74 20 62 75 67 20 66 69 78 65 73 3f 20 20 57  st bug fixes?  W
0d30: 68 65 6e 20 74 68 65 72 65 20 69 73 20 6d 6f 72  hen there is mor
0d40: 65 20 74 68 61 6e 0a 6f 6e 65 20 6c 65 61 66 20  e than.one leaf 
0d50: 69 6e 20 74 68 65 20 67 72 61 70 68 2c 20 79 6f  in the graph, yo
0d60: 75 20 64 6f 6e 27 74 20 72 65 61 6c 6c 79 20 6b  u don't really k
0d70: 6e 6f 77 2e 20 20 53 6f 20 77 65 20 6c 69 6b 65  now.  So we like
0d80: 20 74 6f 20 68 61 76 65 0a 67 72 61 70 68 73 20   to have.graphs 
0d90: 77 69 74 68 20 61 20 73 69 6e 67 6c 65 20 6c 65  with a single le
0da0: 61 66 2e 0a 0a 54 6f 20 72 65 73 6f 6c 76 65 20  af...To resolve 
0db0: 74 68 69 73 20 73 69 74 75 61 74 69 6f 6e 2c 20  this situation, 
0dc0: 41 6c 69 63 65 20 63 61 6e 20 75 73 65 20 74 68  Alice can use th
0dd0: 65 20 66 6f 73 73 69 6c 20 3c 62 3e 6d 65 72 67  e fossil <b>merg
0de0: 65 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 0a 74 6f  e</b> command.to
0df0: 20 6d 65 72 67 65 20 69 6e 20 42 6f 62 27 73 20   merge in Bob's 
0e00: 63 68 61 6e 67 65 73 20 69 6e 20 68 65 72 20 6c  changes in her l
0e10: 6f 63 61 6c 20 63 6f 70 79 20 6f 66 20 63 68 65  ocal copy of che
0e20: 63 6b 2d 69 6e 20 33 2e 20 20 54 68 65 6e 20 73  ck-in 3.  Then s
0e30: 68 65 0a 63 61 6e 20 63 6f 6d 6d 69 74 20 74 68  he.can commit th
0e40: 65 20 72 65 73 75 6c 74 73 20 61 73 20 63 68 65  e results as che
0e50: 63 6b 2d 69 6e 20 35 2e 20 20 54 68 69 73 20 72  ck-in 5.  This r
0e60: 65 73 75 6c 74 73 20 69 6e 20 61 20 74 72 65 65  esults in a tree
0e70: 20 61 73 20 73 68 6f 77 6e 0a 69 6e 20 66 69 67   as shown.in fig
0e80: 75 72 65 20 33 2e 0a 0a 3c 63 65 6e 74 65 72 3e  ure 3...<center>
0e90: 3c 74 61 62 6c 65 20 62 6f 72 64 65 72 3d 31 20  <table border=1 
0ea0: 63 65 6c 6c 70 61 64 64 69 6e 67 3d 31 30 20 68  cellpadding=10 h
0eb0: 73 70 61 63 65 3d 31 30 20 76 73 70 61 63 65 3d  space=10 vspace=
0ec0: 31 30 3e 0a 3c 74 72 3e 3c 74 64 20 61 6c 69 67  10>.<tr><td alig
0ed0: 6e 3d 22 63 65 6e 74 65 72 22 3e 0a 3c 69 6d 67  n="center">.<img
0ee0: 20 73 72 63 3d 22 62 72 61 6e 63 68 30 33 2e 67   src="branch03.g
0ef0: 69 66 22 20 77 69 64 74 68 3d 32 38 32 20 68 65  if" width=282 he
0f00: 69 67 68 74 3d 31 35 32 3e 3c 62 72 3e 0a 46 69  ight=152><br>.Fi
0f10: 67 75 72 65 20 33 0a 3c 2f 74 64 3e 3c 2f 74 72  gure 3.</td></tr
0f20: 3e 3c 2f 74 61 62 6c 65 3e 3c 2f 63 65 6e 74 65  ></table></cente
0f30: 72 3e 0a 0a 43 68 65 63 6b 2d 69 6e 20 35 20 69  r>..Check-in 5 i
0f40: 73 20 61 20 63 68 69 6c 64 20 6f 66 20 63 68 65  s a child of che
0f50: 63 6b 2d 69 6e 20 33 20 62 65 63 61 75 73 65 20  ck-in 3 because 
0f60: 69 74 20 77 61 73 20 63 72 65 61 74 65 64 20 62  it was created b
0f70: 79 20 65 64 69 74 69 6e 67 0a 63 68 65 63 6b 2d  y editing.check-
0f80: 69 6e 20 33 2e 20 20 42 75 74 20 63 68 65 63 6b  in 3.  But check
0f90: 2d 69 6e 20 35 20 61 6c 73 6f 20 69 6e 68 65 72  -in 5 also inher
0fa0: 69 74 73 20 74 68 65 20 63 68 61 6e 67 65 73 20  its the changes 
0fb0: 66 72 6f 6d 20 63 68 65 63 6b 2d 69 6e 20 34 20  from check-in 4 
0fc0: 62 79 0a 76 69 72 74 75 65 20 6f 66 20 74 68 65  by.virtue of the
0fd0: 20 6d 65 72 67 65 2e 20 20 53 6f 20 77 65 20 73   merge.  So we s
0fe0: 61 79 20 74 68 61 74 20 63 68 65 63 6b 2d 69 6e  ay that check-in
0ff0: 20 35 20 69 73 20 61 20 3c 69 3e 6d 65 72 67 65   5 is a <i>merge
1000: 20 63 68 69 6c 64 3c 2f 69 3e 0a 6f 66 20 63 68   child</i>.of ch
1010: 65 63 6b 2d 69 6e 20 34 20 61 6e 64 20 74 68 61  eck-in 4 and tha
1020: 74 20 69 74 20 69 73 20 61 20 3c 69 3e 64 69 72  t it is a <i>dir
1030: 65 63 74 20 63 68 69 6c 64 3c 2f 69 3e 20 6f 66  ect child</i> of
1040: 20 63 68 65 63 6b 2d 69 6e 20 33 2e 20 20 0a 54   check-in 3.  .T
1050: 68 65 20 67 72 61 70 68 20 69 73 20 6e 6f 77 20  he graph is now 
1060: 62 61 63 6b 20 74 6f 20 61 20 73 69 6e 67 6c 65  back to a single
1070: 20 6c 65 61 66 20 28 63 68 65 63 6b 2d 69 6e 20   leaf (check-in 
1080: 35 29 2e 0a 0a 57 65 20 68 61 76 65 20 61 6c 72  5)...We have alr
1090: 65 61 64 79 20 73 65 65 6e 20 74 68 61 74 20 69  eady seen that i
10a0: 66 20 66 6f 73 73 69 6c 20 69 73 20 69 6e 20 61  f fossil is in a
10b0: 75 74 6f 73 79 6e 63 20 6d 6f 64 65 20 74 68 65  utosync mode the
10c0: 6e 20 42 6f 62 20 77 6f 75 6c 64 0a 68 61 76 65  n Bob would.have
10d0: 20 62 65 65 6e 20 77 61 72 6e 65 64 20 61 62 6f   been warned abo
10e0: 75 74 20 74 68 65 20 70 6f 74 65 6e 74 69 61 6c  ut the potential
10f0: 20 66 6f 72 6b 20 74 68 65 20 66 69 72 73 74 20   fork the first 
1100: 74 69 6d 65 20 68 65 20 74 72 69 65 64 20 74 6f  time he tried to
1110: 0a 63 6f 6d 6d 69 74 20 63 68 65 63 6b 2d 69 6e  .commit check-in
1120: 20 34 2e 20 20 49 66 20 42 6f 62 20 68 61 64 20   4.  If Bob had 
1130: 75 70 64 61 74 65 64 20 68 69 73 20 6c 6f 63 61  updated his loca
1140: 6c 20 63 68 65 63 6b 2d 6f 75 74 20 74 6f 20 6d  l check-out to m
1150: 65 72 67 65 20 69 6e 0a 41 6c 69 63 65 27 73 20  erge in.Alice's 
1160: 63 68 65 63 6b 2d 69 6e 20 33 20 63 68 61 6e 67  check-in 3 chang
1170: 65 73 2c 20 74 68 65 6e 20 63 6f 6d 6d 69 74 74  es, then committ
1180: 65 64 2c 20 74 68 65 6e 20 74 68 65 20 66 6f 72  ed, then the for
1190: 6b 20 77 6f 75 6c 64 20 68 61 76 65 0a 6e 65 76  k would have.nev
11a0: 65 72 20 6f 63 63 75 72 72 65 64 2e 20 20 54 68  er occurred.  Th
11b0: 65 20 72 65 73 75 6c 74 69 6e 67 20 67 72 61 70  e resulting grap
11c0: 68 20 77 6f 75 6c 64 20 68 61 76 65 20 62 65 65  h would have bee
11d0: 6e 20 6c 69 6e 65 61 72 2c 20 61 73 20 73 68 6f  n linear, as sho
11e0: 77 6e 0a 69 6e 20 66 69 67 75 72 65 20 31 2e 20  wn.in figure 1. 
11f0: 20 52 65 61 6c 6c 79 20 74 68 65 20 67 72 61 70   Really the grap
1200: 68 20 6f 66 20 66 69 67 75 72 65 20 31 20 69 73  h of figure 1 is
1210: 20 61 20 73 75 62 73 65 74 20 6f 66 20 66 69 67   a subset of fig
1220: 75 72 65 20 33 2e 0a 48 6f 6c 64 20 79 6f 75 72  ure 3..Hold your
1230: 20 68 61 6e 64 20 6f 76 65 72 20 74 68 65 20 63   hand over the c
1240: 68 65 63 6b 2d 69 6e 20 34 20 63 69 72 63 6c 65  heck-in 4 circle
1250: 20 6f 66 20 66 69 67 75 72 65 20 33 20 61 6e 64   of figure 3 and
1260: 20 74 68 65 6e 20 66 69 67 75 72 65 0a 33 20 6c   then figure.3 l
1270: 6f 6f 6b 73 20 65 78 61 63 74 6c 79 20 6c 69 6b  ooks exactly lik
1280: 65 20 66 69 67 75 72 65 20 31 20 28 65 78 63 65  e figure 1 (exce
1290: 70 74 20 74 68 61 74 20 74 68 65 20 6c 65 61 66  pt that the leaf
12a0: 20 68 61 73 20 61 20 64 69 66 66 65 72 65 6e 74   has a different
12b0: 20 63 68 65 63 6b 2d 69 6e 0a 6e 75 6d 62 65 72   check-in.number
12c0: 2c 20 62 75 74 20 74 68 61 74 20 69 73 20 6a 75  , but that is ju
12d0: 73 74 20 61 20 6e 6f 74 61 74 69 6f 6e 61 6c 20  st a notational 
12e0: 64 69 66 66 65 72 65 6e 63 65 20 2d 20 74 68 65  difference - the
12f0: 20 74 77 6f 20 63 68 65 63 6b 2d 69 6e 73 20 68   two check-ins h
1300: 61 76 65 0a 65 78 61 63 74 6c 79 20 74 68 65 20  ave.exactly the 
1310: 73 61 6d 65 20 63 6f 6e 74 65 6e 74 29 2e 20 20  same content).  
1320: 49 6e 20 6f 74 68 65 72 20 77 6f 72 64 73 2c 20  In other words, 
1330: 66 69 67 75 72 65 20 33 20 69 73 20 72 65 61 6c  figure 3 is real
1340: 6c 79 20 61 20 73 75 70 65 72 73 65 74 0a 6f 66  ly a superset.of
1350: 20 66 69 67 75 72 65 20 31 2e 20 20 54 68 65 20   figure 1.  The 
1360: 63 68 65 63 6b 2d 69 6e 20 34 20 6f 66 20 66 69  check-in 4 of fi
1370: 67 75 72 65 20 33 20 63 61 70 74 75 72 65 73 20  gure 3 captures 
1380: 61 64 64 69 74 69 6f 6e 20 73 74 61 74 65 20 77  addition state w
1390: 68 69 63 68 0a 69 73 20 6f 6d 69 74 74 65 64 20  hich.is omitted 
13a0: 66 72 6f 6d 20 66 69 67 75 72 65 20 31 2e 20 20  from figure 1.  
13b0: 43 68 65 63 6b 2d 69 6e 20 34 20 6f 66 20 66 69  Check-in 4 of fi
13c0: 67 75 72 65 20 33 20 68 6f 6c 64 73 20 61 20 63  gure 3 holds a c
13d0: 6f 70 79 0a 6f 66 20 42 6f 62 27 73 20 6c 6f 63  opy.of Bob's loc
13e0: 61 6c 20 63 68 65 63 6b 6f 75 74 20 62 65 66 6f  al checkout befo
13f0: 72 65 20 68 65 20 6d 65 72 67 65 64 20 69 6e 20  re he merged in 
1400: 41 6c 69 63 65 27 73 20 63 68 61 6e 67 65 73 2e  Alice's changes.
1410: 20 20 54 68 61 74 20 73 6e 61 70 73 68 6f 74 0a    That snapshot.
1420: 6f 66 20 42 6f 62 27 73 20 63 68 61 6e 67 65 73  of Bob's changes
1430: 20 69 6e 64 65 70 65 6e 64 65 6e 74 20 6f 66 20   independent of 
1440: 41 6c 69 63 65 27 73 20 63 68 61 6e 67 65 73 20  Alice's changes 
1450: 69 73 20 6f 6d 69 74 74 65 64 20 66 72 6f 6d 20  is omitted from 
1460: 66 69 67 75 72 65 20 31 2e 0a 53 6f 6d 65 20 70  figure 1..Some p
1470: 65 6f 70 6c 65 20 73 61 79 20 74 68 61 74 20 74  eople say that t
1480: 68 65 20 61 70 70 72 6f 61 63 68 20 74 61 6b 65  he approach take
1490: 6e 20 69 6e 20 66 69 67 75 72 65 20 33 20 69 73  n in figure 3 is
14a0: 20 62 65 74 74 65 72 20 62 65 63 61 75 73 65 20   better because 
14b0: 69 74 0a 70 72 65 73 65 72 76 65 73 20 74 68 69  it.preserves thi
14c0: 73 20 65 78 74 72 61 20 69 6e 74 65 72 6d 65 64  s extra intermed
14d0: 69 61 74 65 20 73 74 61 74 65 2e 20 20 4f 74 68  iate state.  Oth
14e0: 65 72 73 20 73 61 79 20 74 68 61 74 20 74 68 65  ers say that the
14f0: 20 61 70 70 72 6f 61 63 68 0a 74 61 6b 65 6e 20   approach.taken 
1500: 69 6e 20 66 69 67 75 72 65 20 31 20 69 73 20 62  in figure 1 is b
1510: 65 74 74 65 72 20 62 65 63 61 75 73 65 20 69 74  etter because it
1520: 20 69 73 20 6d 75 63 68 20 65 61 73 69 65 72 20   is much easier 
1530: 74 6f 20 76 69 73 75 61 6c 69 7a 65 20 61 0a 6c  to visualize a.l
1540: 69 6e 65 61 72 20 6c 69 6e 65 20 6f 66 20 64 65  inear line of de
1550: 76 65 6c 6f 70 6d 65 6e 74 20 61 6e 64 20 62 65  velopment and be
1560: 63 61 75 73 65 20 74 68 65 20 74 68 65 20 6d 65  cause the the me
1570: 72 67 69 6e 67 20 68 61 70 70 65 6e 73 20 61 75  rging happens au
1580: 74 6f 6d 61 74 69 63 61 6c 6c 79 0a 69 6e 73 74  tomatically.inst
1590: 65 61 64 20 6f 66 20 61 73 20 61 20 73 65 70 61  ead of as a sepa
15a0: 72 61 74 65 20 6d 61 6e 75 61 6c 20 73 74 65 70  rate manual step
15b0: 2e 20 20 57 65 20 77 69 6c 6c 20 6e 6f 74 20 74  .  We will not t
15c0: 61 6b 65 20 73 69 64 65 73 20 69 6e 20 74 68 61  ake sides in tha
15d0: 74 0a 64 65 62 61 74 65 2e 20 20 57 65 20 77 69  t.debate.  We wi
15e0: 6c 6c 20 73 69 6d 70 6c 79 20 70 6f 69 6e 74 20  ll simply point 
15f0: 6f 75 74 20 74 68 61 74 20 66 6f 73 73 69 6c 20  out that fossil 
1600: 65 6e 61 62 6c 65 73 20 79 6f 75 20 74 6f 20 64  enables you to d
1610: 6f 20 69 74 20 65 69 74 68 65 72 20 77 61 79 2e  o it either way.
1620: 0a 0a 3c 68 32 3e 46 6f 72 6b 69 6e 67 20 56 65  ..<h2>Forking Ve
1630: 72 73 75 73 20 42 72 61 6e 63 68 69 6e 67 3c 2f  rsus Branching</
1640: 68 32 3e 0a 0a 48 61 76 69 6e 67 20 6d 6f 72 65  h2>..Having more
1650: 20 74 68 61 6e 20 6f 6e 65 20 6c 65 61 66 20 69   than one leaf i
1660: 6e 20 74 68 65 20 63 68 65 63 6b 2d 69 6e 20 74  n the check-in t
1670: 72 65 65 20 69 73 20 75 73 75 61 6c 6c 79 0a 63  ree is usually.c
1680: 6f 6e 73 69 64 65 72 65 64 20 75 6e 64 65 73 69  onsidered undesi
1690: 72 61 62 6c 65 2c 20 61 6e 64 20 73 6f 20 66 6f  rable, and so fo
16a0: 72 6b 73 20 61 72 65 20 75 73 75 61 6c 6c 79 20  rks are usually 
16b0: 65 69 74 68 65 72 20 61 76 6f 69 64 65 64 20 65  either avoided e
16c0: 6e 74 69 72 65 6c 79 2c 0a 61 73 20 69 6e 20 66  ntirely,.as in f
16d0: 69 67 75 72 65 20 31 2c 20 6f 72 20 65 6c 73 65  igure 1, or else
16e0: 20 71 75 69 63 6b 6c 79 20 72 65 73 6f 6c 76 65   quickly resolve
16f0: 64 20 61 73 20 73 68 6f 77 6e 20 69 6e 20 66 69  d as shown in fi
1700: 67 75 72 65 20 33 2e 0a 42 75 74 20 73 6f 6d 65  gure 3..But some
1710: 74 69 6d 65 73 2c 20 6f 6e 65 20 64 6f 65 73 20  times, one does 
1720: 77 61 6e 74 20 74 6f 20 68 61 76 65 20 6d 75 6c  want to have mul
1730: 74 69 70 6c 65 20 6c 65 61 76 65 73 2e 20 20 46  tiple leaves.  F
1740: 6f 72 20 65 78 61 6d 70 6c 65 2c 20 61 20 70 72  or example, a pr
1750: 6f 6a 65 63 74 0a 6d 69 67 68 74 20 68 61 76 65  oject.might have
1760: 20 6f 6e 65 20 6c 65 61 66 20 74 68 61 74 20 69   one leaf that i
1770: 73 20 74 68 65 20 6c 61 74 65 73 74 20 76 65 72  s the latest ver
1780: 73 69 6f 6e 20 6f 66 20 74 68 65 20 70 72 6f 6a  sion of the proj
1790: 65 63 74 20 75 6e 64 65 72 0a 64 65 76 65 6c 6f  ect under.develo
17a0: 70 6d 65 6e 74 20 61 6e 64 20 61 6e 6f 74 68 65  pment and anothe
17b0: 72 20 6c 65 61 66 20 74 68 61 74 20 69 73 20 74  r leaf that is t
17c0: 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69 6f  he latest versio
17d0: 6e 20 74 68 61 74 20 68 61 73 20 62 65 65 6e 0a  n that has been.
17e0: 74 65 73 74 65 64 2e 0a 57 68 65 6e 20 6d 75 6c  tested..When mul
17f0: 74 69 70 6c 65 20 6c 65 61 76 65 73 20 61 72 65  tiple leaves are
1800: 20 64 65 73 69 72 61 62 6c 65 2c 20 77 65 20 63   desirable, we c
1810: 61 6c 6c 20 74 68 65 20 70 68 65 6e 6f 6d 65 6e  all the phenomen
1820: 6f 6e 20 3c 69 3e 62 72 61 6e 63 68 69 6e 67 3c  on <i>branching<
1830: 2f 69 3e 0a 69 6e 73 74 65 61 64 20 6f 66 20 3c  /i>.instead of <
1840: 69 3e 66 6f 72 6b 69 6e 67 3c 2f 69 3e 2e 0a 46  i>forking</i>..F
1850: 69 67 75 72 65 20 34 20 73 68 6f 77 73 20 61 6e  igure 4 shows an
1860: 20 65 78 61 6d 70 6c 65 20 6f 66 20 61 20 70 72   example of a pr
1870: 6f 6a 65 63 74 20 77 68 65 72 65 20 74 68 65 72  oject where ther
1880: 65 20 61 72 65 20 74 77 6f 20 62 72 61 6e 63 68  e are two branch
1890: 65 73 2c 20 6f 6e 65 0a 66 6f 72 20 64 65 76 65  es, one.for deve
18a0: 6c 6f 70 6d 65 6e 74 20 77 6f 72 6b 20 61 6e 64  lopment work and
18b0: 20 61 6e 6f 74 68 65 72 20 66 6f 72 20 74 65 73   another for tes
18c0: 74 69 6e 67 2e 0a 0a 3c 63 65 6e 74 65 72 3e 3c  ting...<center><
18d0: 74 61 62 6c 65 20 62 6f 72 64 65 72 3d 31 20 63  table border=1 c
18e0: 65 6c 6c 70 61 64 64 69 6e 67 3d 31 30 20 68 73  ellpadding=10 hs
18f0: 70 61 63 65 3d 31 30 20 76 73 70 61 63 65 3d 31  pace=10 vspace=1
1900: 30 3e 0a 3c 74 72 3e 3c 74 64 20 61 6c 69 67 6e  0>.<tr><td align
1910: 3d 22 63 65 6e 74 65 72 22 3e 0a 3c 69 6d 67 20  ="center">.<img 
1920: 73 72 63 3d 22 62 72 61 6e 63 68 30 34 2e 67 69  src="branch04.gi
1930: 66 22 20 77 69 64 74 68 3d 34 32 36 20 68 65 69  f" width=426 hei
1940: 67 68 74 3d 31 32 33 3e 3c 62 72 3e 0a 46 69 67  ght=123><br>.Fig
1950: 75 72 65 20 34 0a 3c 2f 74 64 3e 3c 2f 74 72 3e  ure 4.</td></tr>
1960: 3c 2f 74 61 62 6c 65 3e 3c 2f 63 65 6e 74 65 72  </table></center
1970: 3e 0a 0a 54 68 65 20 68 79 70 6f 74 68 65 74 69  >..The hypotheti
1980: 63 61 6c 20 73 63 65 6e 61 72 69 6f 20 6f 66 20  cal scenario of 
1990: 66 69 67 75 72 65 20 34 20 69 73 20 74 68 69 73  figure 4 is this
19a0: 3a 20 20 54 68 65 20 70 72 6f 6a 65 63 74 20 73  :  The project s
19b0: 74 61 72 74 73 20 61 6e 64 0a 70 72 6f 67 72 65  tarts and.progre
19c0: 73 73 65 73 20 74 6f 20 61 20 70 6f 69 6e 74 20  sses to a point 
19d0: 77 68 65 72 65 20 28 61 74 20 63 68 65 63 6b 2d  where (at check-
19e0: 69 6e 20 32 29 20 0a 69 74 20 69 73 20 72 65 61  in 2) .it is rea
19f0: 64 79 20 74 6f 20 65 6e 74 65 72 20 74 65 73 74  dy to enter test
1a00: 69 6e 67 20 66 6f 72 20 69 74 73 20 66 69 72 73  ing for its firs
1a10: 74 20 72 65 6c 65 61 73 65 2e 0a 49 6e 20 61 20  t release..In a 
1a20: 72 65 61 6c 20 70 72 6f 6a 65 63 74 2c 20 6f 66  real project, of
1a30: 20 63 6f 75 72 73 65 2c 20 74 68 65 72 65 20 6d   course, there m
1a40: 69 67 68 74 20 62 65 20 68 75 6e 64 72 65 64 73  ight be hundreds
1a50: 20 6f 72 20 74 68 6f 75 73 61 6e 64 73 20 6f 66   or thousands of
1a60: 0a 63 68 65 63 6b 2d 69 6e 73 20 62 65 66 6f 72  .check-ins befor
1a70: 65 20 61 20 70 72 6f 6a 65 63 74 20 72 65 61 63  e a project reac
1a80: 68 65 73 20 74 68 69 73 20 70 6f 69 6e 74 2c 20  hes this point, 
1a90: 62 75 74 20 66 6f 72 20 73 69 6d 70 6c 69 63 69  but for simplici
1aa0: 74 79 20 6f 66 0a 70 72 65 73 65 6e 74 61 74 69  ty of.presentati
1ab0: 6f 6e 20 77 65 20 77 69 6c 6c 20 73 61 79 20 74  on we will say t
1ac0: 68 61 74 20 74 68 65 20 70 72 6f 6a 65 63 74 20  hat the project 
1ad0: 69 73 20 72 65 61 64 79 20 61 66 74 65 72 20 63  is ready after c
1ae0: 68 65 63 6b 2d 69 6e 20 32 2e 0a 54 68 65 20 70  heck-in 2..The p
1af0: 72 6f 6a 65 63 74 20 74 68 65 6e 20 73 70 6c 69  roject then spli
1b00: 74 73 20 69 6e 74 6f 20 74 77 6f 20 62 72 61 6e  ts into two bran
1b10: 63 68 65 73 20 74 68 61 74 20 61 72 65 20 75 73  ches that are us
1b20: 65 64 20 62 79 20 73 65 70 61 72 61 74 65 0a 74  ed by separate.t
1b30: 65 61 6d 73 2e 20 20 54 68 65 20 74 65 73 74 69  eams.  The testi
1b40: 6e 67 20 74 65 61 6d 2c 20 75 73 69 6e 67 20 74  ng team, using t
1b50: 68 65 20 62 6c 75 65 20 62 72 61 6e 63 68 2c 20  he blue branch, 
1b60: 66 69 6e 64 73 20 61 6e 64 20 66 69 78 65 73 20  finds and fixes 
1b70: 61 20 66 65 77 0a 62 75 67 73 2e 20 20 54 68 69  a few.bugs.  Thi
1b80: 73 20 69 73 20 73 68 6f 77 6e 20 62 79 20 63 68  s is shown by ch
1b90: 65 63 6b 2d 69 6e 73 20 36 20 61 6e 64 20 39 2e  eck-ins 6 and 9.
1ba0: 20 20 4d 65 61 6e 77 68 69 6c 65 20 74 68 65 20    Meanwhile the 
1bb0: 64 65 76 65 6c 6f 70 6d 65 6e 74 0a 74 65 61 6d  development.team
1bc0: 2c 20 77 6f 72 6b 69 6e 67 20 6f 6e 20 74 68 65  , working on the
1bd0: 20 74 6f 70 20 75 6e 63 6f 6c 6f 72 65 64 20 62   top uncolored b
1be0: 72 61 6e 63 68 2c 20 0a 69 73 20 62 75 73 79 20  ranch, .is busy 
1bf0: 61 64 64 69 6e 67 20 66 65 61 74 75 72 65 73 20  adding features 
1c00: 66 6f 72 20 74 68 65 20 73 65 63 6f 6e 64 0a 72  for the second.r
1c10: 65 6c 65 61 73 65 2e 20 20 4f 66 20 63 6f 75 72  elease.  Of cour
1c20: 73 65 2c 20 74 68 65 20 64 65 76 65 6c 6f 70 6d  se, the developm
1c30: 65 6e 74 20 74 65 61 6d 20 77 6f 75 6c 64 20 6c  ent team would l
1c40: 69 6b 65 20 74 6f 20 74 61 6b 65 20 61 64 76 61  ike to take adva
1c50: 6e 74 61 67 65 20 6f 66 0a 74 68 65 20 62 75 67  ntage of.the bug
1c60: 20 66 69 78 65 73 20 69 6d 70 6c 65 6d 65 6e 74   fixes implement
1c70: 65 64 20 62 79 20 74 68 65 20 74 65 73 74 69 6e  ed by the testin
1c80: 67 20 74 65 61 6d 2e 20 20 53 6f 20 70 65 72 69  g team.  So peri
1c90: 6f 64 69 63 61 6c 6c 79 2c 20 74 68 65 0a 63 68  odically, the.ch
1ca0: 61 6e 67 65 73 20 69 6e 20 74 68 65 20 74 65 73  anges in the tes
1cb0: 74 20 62 72 61 6e 63 68 20 61 72 65 20 6d 65 72  t branch are mer
1cc0: 67 65 64 20 69 6e 74 6f 20 74 68 65 20 64 65 76  ged into the dev
1cd0: 20 62 72 61 6e 63 68 2e 20 20 54 68 69 73 20 69   branch.  This i
1ce0: 73 0a 73 68 6f 77 6e 20 62 79 20 74 68 65 20 64  s.shown by the d
1cf0: 61 73 68 65 64 20 6d 65 72 67 65 20 61 72 72 6f  ashed merge arro
1d00: 77 73 20 62 65 74 77 65 65 6e 20 63 68 65 63 6b  ws between check
1d10: 2d 69 6e 73 20 36 20 61 6e 64 20 37 20 61 6e 64  -ins 6 and 7 and
1d20: 20 62 65 74 77 65 65 6e 0a 63 68 65 63 6b 2d 69   between.check-i
1d30: 6e 73 20 39 20 61 6e 64 20 31 30 2e 0a 0a 49 6e  ns 9 and 10...In
1d40: 20 62 6f 74 68 20 66 69 67 75 72 65 73 20 32 20   both figures 2 
1d50: 61 6e 64 20 34 2c 20 63 68 65 63 6b 2d 69 6e 20  and 4, check-in 
1d60: 32 20 68 61 73 20 74 77 6f 20 63 68 69 6c 64 72  2 has two childr
1d70: 65 6e 2e 20 20 49 6e 20 66 69 67 75 72 65 20 32  en.  In figure 2
1d80: 2c 0a 77 65 20 63 61 6c 6c 65 64 20 74 68 69 73  ,.we called this
1d90: 20 61 20 22 66 6f 72 6b 22 2e 20 20 49 6e 20 64   a "fork".  In d
1da0: 69 61 67 72 61 6d 20 34 2c 20 77 65 20 63 61 6c  iagram 4, we cal
1db0: 6c 20 69 74 20 61 20 22 62 72 61 6e 63 68 22 2e  l it a "branch".
1dc0: 20 20 57 68 61 74 20 69 73 0a 74 68 65 20 64 69    What is.the di
1dd0: 66 66 65 72 65 6e 63 65 3f 20 20 41 73 20 66 61  fference?  As fa
1de0: 72 20 61 73 20 74 68 65 20 69 6e 74 65 72 6e 61  r as the interna
1df0: 6c 20 66 6f 73 73 69 6c 20 64 61 74 61 20 73 74  l fossil data st
1e00: 72 75 63 74 75 72 65 73 20 61 72 65 0a 63 6f 6e  ructures are.con
1e10: 63 65 72 6e 65 64 2c 20 74 68 65 72 65 20 69 73  cerned, there is
1e20: 20 6e 6f 20 64 69 66 66 65 72 65 6e 63 65 2e 20   no difference. 
1e30: 20 54 68 65 20 64 69 73 74 69 6e 63 74 69 6f 6e   The distinction
1e40: 20 69 73 20 69 6e 20 74 68 65 20 69 6e 74 65 6e   is in the inten
1e50: 74 2e 0a 49 6e 20 66 69 67 75 72 65 20 32 2c 20  t..In figure 2, 
1e60: 74 68 65 20 66 61 63 74 20 74 68 61 74 20 63 68  the fact that ch
1e70: 65 63 6b 2d 69 6e 20 32 20 68 61 73 20 6d 75 6c  eck-in 2 has mul
1e80: 74 69 70 6c 65 20 63 68 69 6c 64 72 65 6e 20 69  tiple children i
1e90: 73 20 61 6e 0a 61 63 63 69 64 65 6e 74 20 74 68  s an.accident th
1ea0: 61 74 20 73 74 65 6d 73 20 66 72 6f 6d 20 63 6f  at stems from co
1eb0: 6e 63 75 72 72 65 6e 74 20 64 65 76 65 6c 6f 70  ncurrent develop
1ec0: 6d 65 6e 74 2e 20 20 49 6e 20 66 69 67 75 72 65  ment.  In figure
1ed0: 20 34 2c 20 67 69 76 69 6e 67 0a 63 68 65 63 6b   4, giving.check
1ee0: 2d 69 6e 20 32 20 6d 75 6c 74 69 70 6c 65 20 63  -in 2 multiple c
1ef0: 68 69 6c 64 72 65 6e 20 69 73 20 61 20 64 65 6c  hildren is a del
1f00: 69 62 65 72 61 74 65 20 61 63 74 2e 20 20 53 6f  iberate act.  So
1f10: 2c 20 74 6f 20 61 20 67 6f 6f 64 0a 61 70 70 72  , to a good.appr
1f20: 6f 78 69 6d 61 74 69 6f 6e 2c 20 77 65 20 64 65  oximation, we de
1f30: 66 69 6e 65 20 66 6f 72 6b 69 6e 67 20 74 6f 20  fine forking to 
1f40: 62 65 20 62 79 20 61 63 63 69 64 65 6e 74 20 61  be by accident a
1f50: 6e 64 20 62 72 61 6e 63 68 69 6e 67 20 74 6f 0a  nd branching to.
1f60: 62 65 20 62 79 20 69 6e 74 65 6e 74 2e 20 20 41  be by intent.  A
1f70: 70 61 72 74 20 66 72 6f 6d 20 74 68 61 74 2c 20  part from that, 
1f80: 74 68 65 79 20 61 72 65 20 74 68 65 20 73 61 6d  they are the sam
1f90: 65 2e 0a 0a 3c 68 32 3e 54 61 67 73 20 41 6e 64  e...<h2>Tags And
1fa0: 20 50 72 6f 70 65 72 74 69 65 73 3c 2f 68 32 3e   Properties</h2>
1fb0: 0a 0a 54 61 67 73 20 61 6e 64 20 70 72 6f 70 65  ..Tags and prope
1fc0: 72 74 69 65 73 20 61 72 65 20 75 73 65 64 20 69  rties are used i
1fd0: 6e 20 66 6f 73 73 69 6c 20 74 6f 20 68 65 6c 70  n fossil to help
1fe0: 20 65 78 70 72 65 73 73 20 74 68 65 20 69 6e 74   express the int
1ff0: 65 6e 74 2c 20 61 6e 64 0a 74 68 75 73 20 74 6f  ent, and.thus to
2000: 20 64 69 73 74 69 6e 67 75 69 73 68 20 62 65 74   distinguish bet
2010: 77 65 65 6e 20 66 6f 72 6b 73 20 61 6e 64 20 62  ween forks and b
2020: 72 61 6e 63 68 65 73 2e 20 20 46 69 67 75 72 65  ranches.  Figure
2030: 20 35 20 73 68 6f 77 73 20 74 68 65 0a 73 61 6d   5 shows the.sam
2040: 65 20 73 63 65 6e 61 72 69 6f 20 61 73 20 66 69  e scenario as fi
2050: 67 75 72 65 20 34 20 62 75 74 20 77 69 74 68 20  gure 4 but with 
2060: 74 61 67 73 20 61 6e 64 20 70 72 6f 70 65 72 74  tags and propert
2070: 69 65 73 20 61 64 64 65 64 3a 0a 0a 3c 63 65 6e  ies added:..<cen
2080: 74 65 72 3e 3c 74 61 62 6c 65 20 62 6f 72 64 65  ter><table borde
2090: 72 3d 31 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d  r=1 cellpadding=
20a0: 31 30 20 68 73 70 61 63 65 3d 31 30 20 76 73 70  10 hspace=10 vsp
20b0: 61 63 65 3d 31 30 3e 0a 3c 74 72 3e 3c 74 64 20  ace=10>.<tr><td 
20c0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0a  align="center">.
20d0: 3c 69 6d 67 20 73 72 63 3d 22 62 72 61 6e 63 68  <img src="branch
20e0: 30 35 2e 67 69 66 22 20 77 69 64 74 68 3d 34 38  05.gif" width=48
20f0: 35 20 68 65 69 67 68 74 3d 31 37 37 3e 3c 62 72  5 height=177><br
2100: 3e 0a 46 69 67 75 72 65 20 35 0a 3c 2f 74 64 3e  >.Figure 5.</td>
2110: 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 3c 2f 63  </tr></table></c
2120: 65 6e 74 65 72 3e 0a 0a 41 20 3c 69 3e 74 61 67  enter>..A <i>tag
2130: 3c 2f 69 3e 20 69 73 20 61 20 6e 61 6d 65 20 74  </i> is a name t
2140: 68 61 74 20 69 73 20 61 74 74 61 63 68 65 64 20  hat is attached 
2150: 74 6f 20 61 20 63 68 65 63 6b 2d 69 6e 2e 20 20  to a check-in.  
2160: 41 0a 3c 69 3e 70 72 6f 70 65 72 74 79 3c 2f 69  A.<i>property</i
2170: 3e 20 69 73 20 61 20 6e 61 6d 65 2f 76 61 6c 75  > is a name/valu
2180: 65 20 70 61 69 72 2e 20 20 49 6e 74 65 72 6e 61  e pair.  Interna
2190: 6c 6c 79 2c 20 66 6f 73 73 69 6c 20 69 6d 70 6c  lly, fossil impl
21a0: 65 6d 65 6e 74 73 0a 74 61 67 73 20 61 73 20 70  ements.tags as p
21b0: 72 6f 70 65 72 74 69 65 73 20 77 69 74 68 20 61  roperties with a
21c0: 20 4e 55 4c 4c 20 76 61 6c 75 65 2e 20 20 53 6f   NULL value.  So
21d0: 2c 20 74 61 67 73 20 61 6e 64 20 70 72 6f 70 65  , tags and prope
21e0: 72 74 69 65 73 20 72 65 61 6c 6c 79 0a 61 72 65  rties really.are
21f0: 20 6d 75 63 68 20 74 68 65 20 73 61 6d 65 20 74   much the same t
2200: 68 69 6e 67 2c 20 61 6e 64 20 68 65 6e 63 65 66  hing, and hencef
2210: 6f 72 74 68 20 77 65 20 77 69 6c 6c 20 75 73 65  orth we will use
2220: 20 74 68 65 20 77 6f 72 64 20 22 74 61 67 22 0a   the word "tag".
2230: 74 6f 20 6d 65 61 6e 20 65 69 74 68 65 72 20 61  to mean either a
2240: 20 74 61 67 20 6f 72 20 61 20 70 72 6f 70 65 72   tag or a proper
2250: 74 79 2e 20 0a 0a 41 20 74 61 67 20 63 61 6e 20  ty. ..A tag can 
2260: 62 65 20 65 69 74 68 65 72 20 61 20 6f 6e 65 2d  be either a one-
2270: 74 69 6d 65 20 74 61 67 20 6f 72 20 61 6e 20 70  time tag or an p
2280: 72 6f 70 61 67 61 74 69 6e 67 20 74 61 67 20 6f  ropagating tag o
2290: 72 20 61 20 63 61 6e 63 65 6c 6c 61 74 69 6f 6e  r a cancellation
22a0: 20 74 61 67 2e 20 0a 41 20 6f 6e 65 2d 74 69 6d   tag. .A one-tim
22b0: 65 20 74 61 67 20 6f 6e 6c 79 20 61 70 70 6c 69  e tag only appli
22c0: 65 73 20 74 6f 20 74 68 65 20 63 68 65 63 6b 2d  es to the check-
22d0: 69 6e 20 74 6f 20 77 68 69 63 68 20 69 74 20 69  in to which it i
22e0: 73 20 61 74 74 61 63 68 65 64 2e 20 20 41 0a 70  s attached.  A.p
22f0: 72 6f 70 61 67 61 74 69 6e 67 20 74 61 67 20 61  ropagating tag a
2300: 70 70 6c 69 65 73 20 74 6f 20 74 68 65 20 63 68  pplies to the ch
2310: 65 63 6b 2d 69 6e 20 74 6f 20 77 68 69 63 68 20  eck-in to which 
2320: 69 74 20 69 73 20 61 74 74 61 63 68 65 64 20 61  it is attached a
2330: 6e 64 20 61 6c 73 6f 0a 74 6f 20 61 6c 6c 20 64  nd also.to all d
2340: 69 72 65 63 74 20 64 65 73 63 65 6e 64 61 6e 74  irect descendant
2350: 73 20 6f 66 20 74 68 61 74 20 63 68 65 63 6b 2d  s of that check-
2360: 69 6e 2e 20 20 41 20 3c 69 3e 64 69 72 65 63 74  in.  A <i>direct
2370: 20 64 65 73 63 65 6e 64 61 6e 74 3c 2f 69 3e 0a   descendant</i>.
2380: 69 73 20 61 20 64 65 73 63 65 6e 64 61 6e 74 20  is a descendant 
2390: 74 68 72 6f 75 67 68 20 64 69 72 65 63 74 20 63  through direct c
23a0: 68 69 6c 64 72 65 6e 2e 20 20 54 61 67 73 20 70  hildren.  Tags p
23b0: 72 6f 70 61 67 61 74 69 6f 6e 20 64 6f 65 73 20  ropagation does 
23c0: 6e 6f 74 0a 63 72 6f 73 73 20 6d 65 72 67 65 73  not.cross merges
23d0: 2e 20 20 54 61 67 20 70 72 6f 70 61 67 61 74 69  .  Tag propagati
23e0: 6f 6e 20 61 6c 73 6f 20 73 74 6f 70 73 20 61 73  on also stops as
23f0: 20 73 6f 6f 6e 0a 61 73 20 69 74 20 65 6e 63 6f   soon.as it enco
2400: 75 6e 74 65 72 73 20 61 6e 6f 74 68 65 72 20 63  unters another c
2410: 68 65 63 6b 2d 69 6e 20 77 69 74 68 20 74 68 65  heck-in with the
2420: 20 73 61 6d 65 20 74 61 67 2e 20 20 41 20 63 61   same tag.  A ca
2430: 6e 63 65 6c 6c 61 74 69 6f 6e 20 74 61 67 0a 69  ncellation tag.i
2440: 73 20 61 74 74 61 63 68 65 64 20 74 6f 20 61 20  s attached to a 
2450: 73 69 6e 67 6c 65 20 63 68 65 63 6b 2d 69 6e 20  single check-in 
2460: 69 6e 20 6f 72 64 65 72 20 74 6f 20 65 69 74 68  in order to eith
2470: 65 72 20 6f 76 65 72 72 69 64 65 20 61 20 6f 6e  er override a on
2480: 65 2d 74 69 6d 65 0a 74 61 67 20 74 68 61 74 20  e-time.tag that 
2490: 77 61 73 20 70 72 65 76 69 6f 75 73 6c 79 20 70  was previously p
24a0: 6c 61 63 65 64 20 6f 6e 20 74 68 61 74 20 73 61  laced on that sa
24b0: 6d 65 20 63 68 65 63 6b 2d 69 6e 2c 20 6f 72 20  me check-in, or 
24c0: 74 6f 20 62 6c 6f 63 6b 0a 74 61 67 20 70 72 6f  to block.tag pro
24d0: 70 61 67 61 74 69 6f 6e 20 66 72 6f 6d 20 61 6e  pagation from an
24e0: 20 61 6e 63 65 73 74 6f 72 2e 0a 0a 45 76 65 72   ancestor...Ever
24f0: 79 20 72 65 70 6f 73 69 74 6f 72 79 20 69 73 20  y repository is 
2500: 63 72 65 61 74 65 64 20 77 69 74 68 20 61 20 73  created with a s
2510: 69 6e 67 6c 65 20 65 6d 70 74 79 20 63 68 65 63  ingle empty chec
2520: 6b 2d 69 6e 20 74 68 61 74 20 68 61 73 20 74 77  k-in that has tw
2530: 6f 0a 70 72 6f 70 61 67 61 74 69 6e 67 20 74 61  o.propagating ta
2540: 67 73 2e 20 20 49 6e 20 66 69 67 75 72 65 20 35  gs.  In figure 5
2550: 2c 20 74 68 61 74 20 69 6e 69 74 69 61 6c 20 65  , that initial e
2560: 6d 70 74 79 20 63 68 65 63 6b 2d 69 6e 20 69 73  mpty check-in is
2570: 20 63 68 65 63 6b 2d 69 6e 20 31 2e 0a 54 68 65   check-in 1..The
2580: 20 3c 62 3e 62 72 61 6e 63 68 3c 2f 62 3e 20 74   <b>branch</b> t
2590: 61 67 20 74 65 6c 6c 73 20 28 62 79 20 69 74 73  ag tells (by its
25a0: 20 76 61 6c 75 65 29 20 0a 77 68 61 74 20 62 72   value) .what br
25b0: 61 6e 63 68 20 74 68 65 20 63 68 65 63 6b 2d 69  anch the check-i
25c0: 6e 20 69 73 20 61 20 6d 65 6d 62 65 72 20 6f 66  n is a member of
25d0: 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 72  ..The default br
25e0: 61 6e 63 68 20 69 73 20 63 61 6c 6c 65 64 20 22  anch is called "
25f0: 74 72 75 6e 6b 22 2e 20 20 41 6c 6c 20 74 61 67  trunk".  All tag
2600: 73 20 74 68 61 74 20 62 65 67 69 6e 20 77 69 74  s that begin wit
2610: 68 20 22 3c 62 3e 73 79 6d 2d 3c 2f 62 3e 22 0a  h "<b>sym-</b>".
2620: 61 72 65 20 73 79 6d 62 6f 6c 69 63 20 6e 61 6d  are symbolic nam
2630: 65 20 74 61 67 73 2e 20 20 57 68 65 6e 20 61 20  e tags.  When a 
2640: 73 79 6d 62 6f 6c 69 63 20 6e 61 6d 65 20 74 61  symbolic name ta
2650: 67 20 69 73 20 61 74 74 61 63 68 65 64 20 74 6f  g is attached to
2660: 20 61 0a 63 68 65 63 6b 2d 69 6e 2c 20 74 68 61   a.check-in, tha
2670: 74 20 61 6c 6c 6f 77 73 20 79 6f 75 20 74 6f 20  t allows you to 
2680: 72 65 66 65 72 20 74 6f 20 74 68 61 74 20 63 68  refer to that ch
2690: 65 63 6b 2d 69 6e 20 62 79 20 69 74 73 20 73 79  eck-in by its sy
26a0: 6d 62 6f 6c 69 63 0a 6e 61 6d 65 20 72 61 74 68  mbolic.name rath
26b0: 65 72 20 74 68 61 6e 20 62 79 20 69 74 73 20 34  er than by its 4
26c0: 30 2d 63 68 61 72 61 63 74 65 72 20 53 48 41 31  0-character SHA1
26d0: 20 68 61 73 68 20 6e 61 6d 65 2e 20 20 57 68 65   hash name.  Whe
26e0: 6e 20 61 20 73 79 6d 62 6f 6c 69 63 20 6e 61 6d  n a symbolic nam
26f0: 65 0a 74 61 67 20 70 72 6f 70 61 67 61 74 65 73  e.tag propagates
2700: 20 28 61 73 20 64 6f 65 73 20 74 68 65 20 3c 62   (as does the <b
2710: 3e 73 79 6d 2d 74 72 75 6e 6b 3c 2f 62 3e 20 74  >sym-trunk</b> t
2720: 61 67 29 20 74 68 65 6e 20 72 65 66 65 72 72 69  ag) then referri
2730: 6e 67 20 74 6f 20 74 68 61 74 0a 6e 61 6d 65 20  ng to that.name 
2740: 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 72  is the same as r
2750: 65 66 65 72 72 69 6e 67 20 74 6f 20 74 68 65 20  eferring to the 
2760: 6d 6f 73 74 20 72 65 63 65 6e 74 20 63 68 65 63  most recent chec
2770: 6b 2d 69 6e 20 77 69 74 68 20 74 68 61 74 20 6e  k-in with that n
2780: 61 6d 65 2e 0a 54 68 75 73 20 74 68 65 20 74 77  ame..Thus the tw
2790: 6f 20 74 61 67 73 20 6f 6e 20 63 68 65 63 6b 2d  o tags on check-
27a0: 69 6e 20 6f 6e 63 65 20 63 61 75 73 65 20 61 6c  in once cause al
27b0: 6c 20 64 65 63 65 6e 64 65 6e 74 73 20 74 6f 20  l decendents to 
27c0: 62 65 20 69 6e 20 74 68 65 0a 22 74 72 75 6e 6b  be in the."trunk
27d0: 22 20 62 72 61 6e 63 68 20 61 6e 64 20 74 6f 20  " branch and to 
27e0: 68 61 76 65 20 74 68 65 20 73 79 6d 62 6f 6c 69  have the symboli
27f0: 63 20 6e 61 6d 65 20 22 74 72 75 6e 6b 22 2e 0a  c name "trunk"..
2800: 0a 43 68 65 63 6b 2d 69 6e 20 34 20 68 61 73 20  .Check-in 4 has 
2810: 61 20 3c 62 3e 62 72 61 6e 63 68 3c 2f 62 3e 20  a <b>branch</b> 
2820: 74 61 67 20 77 68 69 63 68 20 63 68 61 6e 67 65  tag which change
2830: 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68  s the name of th
2840: 65 20 62 72 61 6e 63 68 0a 74 6f 20 22 74 65 73  e branch.to "tes
2850: 74 22 2e 20 20 54 68 65 20 62 72 61 6e 63 68 20  t".  The branch 
2860: 74 61 67 20 6f 6e 20 63 68 65 63 6b 2d 69 6e 20  tag on check-in 
2870: 34 20 70 72 6f 70 61 67 61 74 65 73 20 74 6f 20  4 propagates to 
2880: 63 68 65 63 6b 2d 69 6e 73 20 36 20 61 6e 64 20  check-ins 6 and 
2890: 39 2e 0a 42 75 74 20 62 65 63 61 75 73 65 20 74  9..But because t
28a0: 61 67 20 70 72 6f 70 61 67 61 74 69 6f 6e 20 64  ag propagation d
28b0: 6f 65 73 20 6e 6f 74 20 66 6f 6c 6c 6f 77 20 6d  oes not follow m
28c0: 65 72 67 65 20 6c 69 6e 6b 73 2c 20 74 68 65 20  erge links, the 
28d0: 3c 62 3e 62 72 61 6e 63 68 3d 74 65 73 74 3c 2f  <b>branch=test</
28e0: 62 3e 0a 74 61 67 20 64 6f 65 73 20 6e 6f 74 20  b>.tag does not 
28f0: 70 72 6f 70 61 67 61 74 65 20 74 6f 20 63 68 65  propagate to che
2900: 63 6b 2d 69 6e 73 20 37 2c 20 38 2c 20 6f 72 20  ck-ins 7, 8, or 
2910: 31 30 2e 20 20 4e 6f 74 65 20 61 6c 73 6f 20 74  10.  Note also t
2920: 68 61 74 20 74 68 65 0a 3c 62 3e 62 72 61 6e 63  hat the.<b>branc
2930: 68 3c 2f 62 3e 20 74 61 67 20 6f 6e 20 63 68 65  h</b> tag on che
2940: 63 6b 2d 69 6e 20 34 20 62 6c 6f 63 6b 73 20 74  ck-in 4 blocks t
2950: 68 65 20 70 72 6f 70 61 67 61 74 69 6f 6e 20 6f  he propagation o
2960: 66 20 3c 62 3e 62 72 61 6e 63 68 3d 74 72 75 6e  f <b>branch=trun
2970: 6b 3c 2f 62 3e 0a 73 6f 20 74 68 61 74 20 69 74  k</b>.so that it
2980: 20 63 61 6e 6e 6f 74 20 72 65 61 63 68 20 63 68   cannot reach ch
2990: 65 63 6b 2d 69 6e 73 20 36 20 6f 72 20 39 2e 20  eck-ins 6 or 9. 
29a0: 20 54 68 69 73 20 63 61 75 73 65 73 20 63 68 65   This causes che
29b0: 63 6b 2d 69 6e 73 20 34 2c 20 36 2c 20 61 6e 64  ck-ins 4, 6, and
29c0: 0a 39 20 74 6f 20 62 65 20 69 6e 20 74 68 65 20  .9 to be in the 
29d0: 22 74 65 73 74 22 20 62 72 61 6e 63 68 20 61 6e  "test" branch an
29e0: 64 20 61 6c 6c 20 6f 74 68 65 72 73 20 74 6f 20  d all others to 
29f0: 62 65 20 69 6e 20 74 68 65 20 22 74 72 75 6e 6b  be in the "trunk
2a00: 22 20 62 72 61 6e 63 68 2e 0a 0a 43 68 65 63 6b  " branch...Check
2a10: 2d 69 6e 20 34 20 61 6c 73 6f 20 68 61 73 20 61  -in 4 also has a
2a20: 20 3c 62 3e 73 79 6d 2d 74 65 73 74 3c 2f 62 3e   <b>sym-test</b>
2a30: 20 74 61 67 2c 20 77 68 69 63 68 20 67 69 76 65   tag, which give
2a40: 73 20 74 68 65 20 73 79 6d 62 6f 6c 69 63 20 6e  s the symbolic n
2a50: 61 6d 65 0a 22 74 65 73 74 22 20 74 6f 20 63 68  ame."test" to ch
2a60: 65 63 6b 2d 69 6e 73 20 34 2c 20 36 2c 20 61 6e  eck-ins 4, 6, an
2a70: 64 20 39 2e 20 20 42 65 63 61 75 73 65 20 74 61  d 9.  Because ta
2a80: 67 73 20 64 6f 20 6e 6f 74 20 70 72 6f 70 61 67  gs do not propag
2a90: 61 74 65 20 61 63 72 6f 73 73 0a 6d 65 72 67 65  ate across.merge
2aa0: 73 2c 20 63 68 65 63 6b 2d 69 6e 73 20 37 2c 20  s, check-ins 7, 
2ab0: 38 2c 20 61 6e 64 20 31 30 20 64 6f 20 6e 6f 74  8, and 10 do not
2ac0: 20 69 6e 68 65 72 69 74 20 74 68 65 20 3c 62 3e   inherit the <b>
2ad0: 73 79 6d 2d 74 65 73 74 3c 2f 62 3e 20 74 61 67  sym-test</b> tag
2ae0: 20 61 6e 64 0a 61 72 65 20 68 65 6e 63 65 20 6e   and.are hence n
2af0: 6f 74 20 6b 6e 6f 77 6e 20 62 79 20 74 68 65 20  ot known by the 
2b00: 6e 61 6d 65 20 22 74 65 73 74 22 2e 0a 54 6f 20  name "test"..To 
2b10: 70 72 65 76 65 6e 74 20 74 68 65 20 3c 62 3e 73  prevent the <b>s
2b20: 79 6d 2d 74 72 75 6e 6b 3c 2f 62 3e 20 74 61 67  ym-trunk</b> tag
2b30: 20 66 72 6f 6d 20 70 72 6f 70 61 67 61 74 69 6e   from propagatin
2b40: 67 20 66 72 6f 6d 20 63 68 65 63 6b 2d 69 6e 20  g from check-in 
2b50: 31 20 0a 69 6e 74 6f 20 63 68 65 63 6b 2d 69 6e  1 .into check-in
2b60: 73 20 34 2c 20 36 2c 20 61 6e 64 20 39 2c 20 74  s 4, 6, and 9, t
2b70: 68 65 72 65 20 69 73 20 61 20 63 61 6e 63 65 6c  here is a cancel
2b80: 6c 61 74 69 6f 6e 20 74 61 67 20 66 6f 72 20 0a  lation tag for .
2b90: 3c 62 3e 73 79 6d 2d 74 72 75 6e 6b 3c 2f 62 3e  <b>sym-trunk</b>
2ba0: 20 6f 6e 20 63 68 65 63 6b 2d 69 6e 20 34 2e 20   on check-in 4. 
2bb0: 20 54 68 65 20 6e 65 74 20 65 66 66 65 63 74 20   The net effect 
2bc0: 6f 66 20 61 6c 6c 20 6f 66 20 74 68 69 73 20 69  of all of this i
2bd0: 73 20 74 68 61 74 0a 63 68 65 63 6b 2d 69 6e 73  s that.check-ins
2be0: 20 6f 6e 20 74 68 65 20 74 72 75 6e 6b 20 67 6f   on the trunk go
2bf0: 20 62 79 20 74 68 65 20 73 79 6d 62 6f 6c 69 63   by the symbolic
2c00: 20 6e 61 6d 65 20 6f 66 20 22 74 72 75 6e 6b 22   name of "trunk"
2c10: 20 61 6e 64 20 63 68 65 63 6b 2d 69 6e 73 0a 74   and check-ins.t
2c20: 68 61 74 20 61 72 65 20 6f 6e 20 74 68 65 20 74  hat are on the t
2c30: 65 73 74 20 62 72 61 6e 63 68 20 67 6f 20 62 79  est branch go by
2c40: 20 74 68 65 20 73 79 6d 62 6f 6c 69 63 20 6e 61   the symbolic na
2c50: 6d 65 20 22 74 65 73 74 22 2e 0a 0a 54 68 65 20  me "test"...The 
2c60: 3c 62 3e 62 67 63 6f 6c 6f 72 3d 62 6c 75 65 3c  <b>bgcolor=blue<
2c70: 2f 62 3e 20 74 61 67 20 6f 6e 20 63 68 65 63 6b  /b> tag on check
2c80: 2d 69 6e 20 34 20 63 61 75 73 65 73 20 74 68 65  -in 4 causes the
2c90: 20 62 61 63 6b 67 72 6f 75 6e 64 20 63 6f 6c 6f   background colo
2ca0: 72 0a 6f 66 20 74 69 6d 65 6c 69 6e 65 73 20 74  r.of timelines t
2cb0: 6f 20 62 65 20 62 6c 75 65 20 66 6f 72 20 63 68  o be blue for ch
2cc0: 65 63 6b 2d 69 6e 20 34 20 61 6e 64 20 69 74 73  eck-in 4 and its
2cd0: 20 64 69 72 65 63 74 20 64 65 73 63 65 6e 64 61   direct descenda
2ce0: 6e 74 73 2e 0a 0a 46 69 67 75 72 65 20 35 20 61  nts...Figure 5 a
2cf0: 6c 73 6f 20 73 68 6f 77 73 20 74 77 6f 20 6f 6e  lso shows two on
2d00: 65 2d 74 69 6d 65 20 74 61 67 73 20 6f 6e 20 63  e-time tags on c
2d10: 68 65 63 6b 2d 69 6e 20 39 2e 20 20 28 54 68 65  heck-in 9.  (The
2d20: 20 64 69 61 67 72 61 6d 20 64 6f 65 73 0a 6e 6f   diagram does.no
2d30: 74 20 6d 61 6b 65 20 61 20 67 72 61 70 68 69 63  t make a graphic
2d40: 61 6c 20 64 69 73 74 69 6e 63 74 69 6f 6e 20 62  al distinction b
2d50: 65 74 77 65 65 6e 20 6f 6e 65 2d 74 69 6d 65 20  etween one-time 
2d60: 61 6e 64 20 70 72 6f 70 61 67 61 74 69 6e 67 20  and propagating 
2d70: 74 61 67 73 2e 29 0a 54 68 65 20 3c 62 3e 73 79  tags.).The <b>sy
2d80: 6d 2d 72 65 6c 65 61 73 65 2d 31 2e 30 3c 2f 62  m-release-1.0</b
2d90: 3e 20 74 61 67 20 6d 65 61 6e 73 20 74 68 61 74  > tag means that
2da0: 20 63 68 65 63 6b 2d 69 6e 20 39 20 63 61 6e 20   check-in 9 can 
2db0: 62 65 20 72 65 66 65 72 72 65 64 20 74 6f 0a 75  be referred to.u
2dc0: 73 69 6e 67 20 74 68 65 20 6d 6f 72 65 20 6d 65  sing the more me
2dd0: 61 6e 69 6e 67 66 75 6c 20 6e 61 6d 65 20 22 72  aningful name "r
2de0: 65 6c 65 61 73 65 2d 31 2e 30 22 2e 20 20 54 68  elease-1.0".  Th
2df0: 65 20 3c 62 3e 63 6c 6f 73 65 64 3c 2f 62 3e 20  e <b>closed</b> 
2e00: 74 61 67 20 6d 65 61 6e 73 0a 74 68 61 74 20 63  tag means.that c
2e10: 68 65 63 6b 2d 69 6e 20 39 20 69 73 20 61 20 22  heck-in 9 is a "
2e20: 63 6c 6f 73 65 64 20 6c 65 61 66 22 2e 20 20 41  closed leaf".  A
2e30: 20 63 6c 6f 73 65 64 20 6c 65 61 66 20 69 73 20   closed leaf is 
2e40: 61 20 6c 65 61 66 20 74 68 61 74 20 69 6e 74 65  a leaf that inte
2e50: 6e 64 65 64 0a 74 6f 20 6e 65 76 65 72 20 68 61  nded.to never ha
2e60: 76 65 20 61 6e 79 20 64 69 72 65 63 74 20 63 68  ve any direct ch
2e70: 69 6c 64 72 65 6e 2e 0a 0a 3c 68 32 3e 52 65 76  ildren...<h2>Rev
2e80: 69 65 77 20 4f 66 20 54 65 72 6d 69 6e 6f 6c 6f  iew Of Terminolo
2e90: 67 79 3c 2f 68 32 3e 0a 0a 48 65 72 65 20 69 73  gy</h2>..Here is
2ea0: 20 61 20 6c 69 73 74 20 6f 66 20 64 65 66 69 6e   a list of defin
2eb0: 69 74 69 6f 6e 73 20 6f 66 20 6b 65 79 20 74 65  itions of key te
2ec0: 72 6d 73 3a 0a 0a 0a 3c 62 6c 6f 63 6b 71 75 6f  rms:...<blockquo
2ed0: 74 65 3e 3c 64 6c 3e 0a 3c 64 74 3e 3c 62 3e 42  te><dl>.<dt><b>B
2ee0: 72 61 6e 63 68 3c 2f 62 3e 3c 2f 64 74 3e 0a 3c  ranch</b></dt>.<
2ef0: 64 64 3e 3c 70 3e 41 20 62 72 61 6e 63 68 20 69  dd><p>A branch i
2f00: 73 20 61 20 73 65 74 20 6f 66 20 63 68 65 63 6b  s a set of check
2f10: 2d 69 6e 73 20 74 68 61 74 20 68 61 76 65 20 74  -ins that have t
2f20: 68 65 20 73 61 6d 65 20 76 61 6c 75 65 20 66 6f  he same value fo
2f30: 72 20 74 68 65 69 72 0a 62 72 61 6e 63 68 20 70  r their.branch p
2f40: 72 6f 70 65 72 74 79 2e 3c 2f 70 3e 3c 2f 64 64  roperty.</p></dd
2f50: 3e 0a 3c 64 74 3e 3c 62 3e 4c 65 61 66 3c 2f 62  >.<dt><b>Leaf</b
2f60: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 20  ></dt>.<dd><p>A 
2f70: 6c 65 61 66 20 69 73 20 61 20 63 68 65 63 6b 2d  leaf is a check-
2f80: 69 6e 20 74 68 61 74 20 68 61 73 20 6e 6f 20 63  in that has no c
2f90: 68 69 6c 64 72 65 6e 20 69 6e 20 74 68 65 20 73  hildren in the s
2fa0: 61 6d 65 20 62 72 61 6e 63 68 2e 3c 2f 70 3e 3c  ame branch.</p><
2fb0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 3e 43 6c 6f 73  /dd>.<dt><b>Clos
2fc0: 65 64 20 4c 65 61 66 3c 2f 62 3e 3c 2f 64 74 3e  ed Leaf</b></dt>
2fd0: 0a 3c 64 64 3e 3c 70 3e 41 20 63 6c 6f 73 65 64  .<dd><p>A closed
2fe0: 20 6c 65 61 66 20 69 73 20 6c 65 61 66 20 74 68   leaf is leaf th
2ff0: 61 74 20 68 61 73 20 74 68 65 20 3c 62 3e 63 6c  at has the <b>cl
3000: 6f 73 65 64 3c 2f 62 3e 20 74 61 67 2e 20 20 53  osed</b> tag.  S
3010: 75 63 68 20 6c 65 61 76 65 73 0a 61 72 65 20 69  uch leaves.are i
3020: 6e 74 65 6e 74 65 64 20 74 6f 20 6e 65 76 65 72  ntented to never
3030: 20 62 65 20 65 78 74 65 6e 64 65 64 20 77 69 74   be extended wit
3040: 68 20 64 65 73 63 65 6e 64 65 6e 74 73 20 61 6e  h descendents an
3050: 64 20 68 65 6e 63 65 20 61 72 65 20 6f 6d 69 74  d hence are omit
3060: 74 65 64 0a 66 72 6f 6d 20 6c 69 73 74 73 20 6f  ted.from lists o
3070: 66 20 6c 65 61 76 65 73 20 69 6e 20 74 68 65 20  f leaves in the 
3080: 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65 20 61 6e 64  command-line and
3090: 20 77 65 62 20 69 6e 74 65 72 66 61 63 65 2e 3c   web interface.<
30a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 3e  /p></dd>.<dt><b>
30b0: 4f 70 65 6e 20 4c 65 61 66 3c 2f 62 3e 3c 2f 64  Open Leaf</b></d
30c0: 74 3e 0a 3c 64 64 3e 3c 70 3e 41 20 6f 70 65 6e  t>.<dd><p>A open
30d0: 20 6c 65 61 66 20 69 73 20 61 20 6c 65 61 66 20   leaf is a leaf 
30e0: 74 68 61 74 20 69 73 20 6e 6f 74 20 63 6c 6f 73  that is not clos
30f0: 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ed.</p></dd>.<dt
3100: 3e 3c 62 3e 46 6f 72 6b 3c 2f 62 3e 3c 2f 64 74  ><b>Fork</b></dt
3110: 3e 0a 3c 64 64 3e 3c 70 3e 41 20 66 6f 72 6b 20  >.<dd><p>A fork 
3120: 6f 63 63 75 72 73 20 77 68 65 6e 20 61 20 63 68  occurs when a ch
3130: 65 63 6b 2d 69 6e 20 68 61 73 20 74 77 6f 20 6f  eck-in has two o
3140: 72 20 6d 6f 72 65 20 64 69 72 65 63 74 20 28 6e  r more direct (n
3150: 6f 6e 2d 6d 65 72 67 65 29 0a 63 68 69 6c 64 72  on-merge).childr
3160: 65 6e 20 69 6e 20 74 68 65 20 73 61 6d 65 20 62  en in the same b
3170: 72 61 6e 63 68 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ranch.</p></dd>.
3180: 3c 64 74 3e 3c 62 3e 42 72 61 6e 63 68 20 50 6f  <dt><b>Branch Po
3190: 69 6e 74 3c 2f 62 3e 3c 2f 64 74 3e 0a 3c 64 64  int</b></dt>.<dd
31a0: 3e 3c 70 3e 41 20 62 72 61 6e 63 68 20 70 6f 69  ><p>A branch poi
31b0: 6e 74 20 6f 63 63 75 72 73 20 77 68 65 6e 20 61  nt occurs when a
31c0: 20 63 68 65 63 6b 2d 69 6e 20 68 61 73 20 74 77   check-in has tw
31d0: 6f 20 6f 72 20 6d 6f 72 65 20 64 69 72 65 63 74  o or more direct
31e0: 20 28 6e 6f 6e 2d 6d 65 72 67 65 29 0a 63 68 69   (non-merge).chi
31f0: 6c 64 72 65 6e 20 69 6e 20 74 68 65 20 64 69 66  ldren in the dif
3200: 66 65 72 65 6e 74 20 62 72 61 6e 63 68 65 73 2e  ferent branches.
3210: 20 20 41 20 62 72 61 6e 63 68 20 70 6f 69 6e 74    A branch point
3220: 20 69 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 61   is similar to a
3230: 20 66 6f 72 6b 2c 0a 65 78 63 65 70 74 20 74 68   fork,.except th
3240: 61 74 20 74 68 65 20 63 68 69 6c 64 72 65 6e 20  at the children 
3250: 61 72 65 20 69 6e 20 64 69 66 66 65 72 65 6e 74  are in different
3260: 20 62 72 61 6e 63 68 65 73 2e 3c 2f 70 3e 3c 2f   branches.</p></
3270: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 62 6c 6f 63 6b  dd>.</dl></block
3280: 71 75 6f 74 65 3e 0a 0a 43 68 65 63 6b 2d 69 6e  quote>..Check-in
3290: 20 34 20 6f 66 20 66 69 67 75 72 65 20 33 20 69   4 of figure 3 i
32a0: 73 20 6e 6f 74 20 61 20 6c 65 61 66 20 62 65 63  s not a leaf bec
32b0: 61 75 73 65 20 69 74 20 68 61 73 20 61 20 63 68  ause it has a ch
32c0: 69 6c 64 20 28 63 68 65 63 6b 2d 69 6e 20 35 29  ild (check-in 5)
32d0: 0a 69 6e 20 74 68 65 20 73 61 6d 65 20 62 72 61  .in the same bra
32e0: 6e 63 68 2e 20 20 43 68 65 63 6b 2d 69 6e 20 39  nch.  Check-in 9
32f0: 20 6f 66 20 66 69 67 75 72 65 20 35 20 61 6c 73   of figure 5 als
3300: 6f 20 68 61 73 20 61 20 63 68 69 6c 64 20 28 63  o has a child (c
3310: 68 65 63 6b 2d 69 6e 20 31 30 29 0a 62 75 74 20  heck-in 10).but 
3320: 74 68 61 74 20 63 68 69 6c 64 20 69 73 20 69 6e  that child is in
3330: 20 61 20 64 69 66 66 65 72 65 6e 74 20 62 72 61   a different bra
3340: 6e 63 68 2c 20 73 6f 20 63 68 65 63 6b 2d 69 6e  nch, so check-in
3350: 20 39 20 69 73 20 61 20 6c 65 61 66 2e 20 20 42   9 is a leaf.  B
3360: 65 63 61 75 73 65 0a 6f 66 20 74 68 65 20 3c 62  ecause.of the <b
3370: 3e 63 6c 6f 73 65 64 3c 2f 62 3e 20 74 61 67 20  >closed</b> tag 
3380: 63 68 65 63 6b 2d 69 6e 20 39 2c 20 69 74 20 69  check-in 9, it i
3390: 73 20 61 20 63 6c 6f 73 65 64 20 6c 65 61 66 2e  s a closed leaf.
33a0: 0a 0a 43 68 65 63 6b 2d 69 6e 20 32 20 6f 66 20  ..Check-in 2 of 
33b0: 66 69 67 75 72 65 20 33 20 69 73 20 63 6f 6e 73  figure 3 is cons
33c0: 69 64 65 72 65 64 20 61 20 22 66 6f 72 6b 22 0a  idered a "fork".
33d0: 62 65 63 61 75 73 65 20 69 74 20 68 61 73 20 74  because it has t
33e0: 77 6f 20 63 68 69 6c 64 72 65 6e 20 69 6e 20 74  wo children in t
33f0: 68 65 20 73 61 6d 65 20 62 72 61 6e 63 68 2e 20  he same branch. 
3400: 20 43 68 65 63 6b 2d 69 6e 20 32 20 6f 66 20 66   Check-in 2 of f
3410: 69 67 75 72 65 20 35 0a 61 6c 73 6f 20 68 61 73  igure 5.also has
3420: 20 74 77 6f 20 63 68 69 6c 64 72 65 6e 2c 20 62   two children, b
3430: 75 74 20 65 61 63 68 20 63 68 69 6c 64 20 69 73  ut each child is
3440: 20 69 6e 20 61 20 64 69 66 66 65 72 65 6e 74 20   in a different 
3450: 62 72 61 6e 63 68 2c 20 68 65 6e 63 65 20 69 6e  branch, hence in
3460: 0a 66 69 67 75 72 65 20 35 2c 20 63 68 65 63 6b  .figure 5, check
3470: 2d 69 6e 20 32 20 69 73 20 63 6f 6e 73 69 64 65  -in 2 is conside
3480: 72 65 64 20 61 20 22 62 72 61 6e 63 68 20 70 6f  red a "branch po
3490: 69 6e 74 22 2e 0a                                int"..