Hex Artifact Content
Not logged in

Artifact b78897700272926d4b4a6d82e75dda59b89c2fba:

File www/faq.tcl part of check-in [627de3bf16] - Documentation updates: Added FAQ and testimonials. by drh on 2009-01-25 21:16:55.

0000: 23 21 2f 75 73 72 2f 62 69 6e 2f 74 63 6c 73 68  #!/usr/bin/tclsh
0010: 0a 23 0a 23 20 52 75 6e 20 74 68 69 73 20 74 6f  .#.# Run this to
0020: 20 67 65 6e 65 72 61 74 65 20 74 68 65 20 46 41   generate the FA
0030: 51 0a 23 0a 73 65 74 20 63 6e 74 20 31 0a 70 72  Q.#.set cnt 1.pr
0040: 6f 63 20 66 61 71 20 7b 71 75 65 73 74 69 6f 6e  oc faq {question
0050: 20 61 6e 73 77 65 72 7d 20 7b 0a 20 20 73 65 74   answer} {.  set
0060: 20 3a 3a 66 61 71 28 24 3a 3a 63 6e 74 29 20 5b   ::faq($::cnt) [
0070: 6c 69 73 74 20 5b 73 74 72 69 6e 67 20 74 72 69  list [string tri
0080: 6d 20 24 71 75 65 73 74 69 6f 6e 5d 20 5b 73 74  m $question] [st
0090: 72 69 6e 67 20 74 72 69 6d 20 24 61 6e 73 77 65  ring trim $answe
00a0: 72 5d 5d 0a 20 20 69 6e 63 72 20 3a 3a 63 6e 74  r]].  incr ::cnt
00b0: 0a 7d 0a 0a 66 61 71 20 7b 0a 20 20 57 68 61 74  .}..faq {.  What
00c0: 20 47 55 49 73 20 61 72 65 20 61 76 61 69 6c 61   GUIs are availa
00d0: 62 6c 65 20 66 6f 72 20 66 6f 73 73 69 6c 3f 0a  ble for fossil?.
00e0: 7d 20 7b 0a 20 20 54 68 65 20 66 6f 73 73 69 6c  } {.  The fossil
00f0: 20 65 78 65 63 75 74 61 62 6c 65 20 63 6f 6d 65   executable come
0100: 73 20 77 69 74 68 20 61 20 77 65 62 2d 62 61 73  s with a web-bas
0110: 65 64 20 47 55 49 20 62 75 69 6c 74 20 69 6e 2e  ed GUI built in.
0120: 20 20 4a 75 73 74 20 72 75 6e 3a 0a 0a 20 20 3c    Just run:..  <
0130: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 3c 62  blockquote>.  <b
0140: 3e 66 6f 73 73 69 6c 20 75 69 3c 2f 62 3e 20 3c  >fossil ui</b> <
0150: 69 3e 52 45 50 4f 53 49 54 4f 52 59 2d 46 49 4c  i>REPOSITORY-FIL
0160: 45 4e 41 4d 45 3c 2f 69 3e 0a 20 20 3c 2f 62 6c  ENAME</i>.  </bl
0170: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 41 6e 64  ockquote>..  And
0180: 20 79 6f 75 72 20 64 65 66 61 75 6c 74 20 77 65   your default we
0190: 62 20 62 72 6f 77 73 65 72 20 73 68 6f 75 6c 64  b browser should
01a0: 20 70 6f 70 20 75 70 20 61 6e 64 20 61 75 74 6f   pop up and auto
01b0: 6d 61 74 69 63 61 6c 6c 79 20 70 6f 69 6e 74 20  matically point 
01c0: 74 6f 0a 20 20 74 68 65 20 66 6f 73 73 69 6c 20  to.  the fossil 
01d0: 69 6e 74 65 72 66 61 63 65 2e 20 20 28 48 69 6e  interface.  (Hin
01e0: 74 3a 20 20 59 6f 75 20 63 61 6e 20 6f 6d 69 74  t:  You can omit
01f0: 20 74 68 65 20 3c 69 3e 52 45 50 4f 53 49 54 4f   the <i>REPOSITO
0200: 52 59 2d 46 49 4c 45 4e 41 4d 45 3c 2f 69 3e 0a  RY-FILENAME</i>.
0210: 20 20 69 66 20 79 6f 75 20 61 72 65 20 77 69 74    if you are wit
0220: 68 69 6e 20 61 6e 20 6f 70 65 6e 20 63 68 65 63  hin an open chec
0230: 6b 2d 6f 75 74 2e 29 0a 7d 0a 0a 66 61 71 20 7b  k-out.).}..faq {
0240: 0a 20 20 57 68 61 74 20 69 73 20 74 68 65 20 64  .  What is the d
0250: 69 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 65  ifference betwee
0260: 6e 20 61 20 22 62 72 61 6e 63 68 22 20 61 6e 64  n a "branch" and
0270: 20 61 20 22 66 6f 72 6b 22 3f 0a 7d 20 7b 0a 20   a "fork"?.} {. 
0280: 20 54 68 69 73 20 69 73 20 61 20 62 69 67 20 71   This is a big q
0290: 75 65 73 74 69 6f 6e 20 2d 20 74 6f 6f 20 62 69  uestion - too bi
02a0: 67 20 74 6f 20 61 6e 73 77 65 72 20 69 6e 20 61  g to answer in a
02b0: 20 46 41 51 2e 20 20 50 6c 65 61 73 65 0a 20 20   FAQ.  Please.  
02c0: 72 65 61 64 20 74 68 65 20 3c 61 20 68 72 65 66  read the <a href
02d0: 3d 22 62 72 61 6e 63 68 69 6e 67 2e 77 69 6b 69  ="branching.wiki
02e0: 22 3e 42 72 61 6e 63 68 69 6e 67 2c 20 46 6f 72  ">Branching, For
02f0: 6b 69 6e 67 2c 20 4d 65 72 67 69 6e 67 2c 0a 20  king, Merging,. 
0300: 20 61 6e 64 20 54 61 67 67 69 6e 67 3c 2f 61 3e   and Tagging</a>
0310: 20 64 6f 63 75 6d 65 6e 74 2e 0a 7d 0a 0a 0a 66   document..}...f
0320: 61 71 20 7b 0a 20 20 48 6f 77 20 64 6f 20 49 20  aq {.  How do I 
0330: 63 72 65 61 74 65 20 61 20 6e 65 77 20 62 72 61  create a new bra
0340: 6e 63 68 20 69 6e 20 66 6f 73 73 69 6c 3f 0a 7d  nch in fossil?.}
0350: 20 7b 0a 20 20 54 68 65 72 65 20 61 72 65 20 6c   {.  There are l
0360: 6f 74 73 20 6f 66 20 77 61 79 73 3a 0a 0a 20 20  ots of ways:..  
0370: 57 68 65 6e 20 79 6f 75 20 61 72 65 20 63 68 65  When you are che
0380: 63 6b 69 6e 67 20 69 6e 20 61 20 6e 65 77 20 63  cking in a new c
0390: 68 61 6e 67 65 20 75 73 69 6e 67 20 74 68 65 20  hange using the 
03a0: 3c 62 3e 63 6f 6d 6d 69 74 3c 2f 62 3e 0a 20 20  <b>commit</b>.  
03b0: 63 6f 6d 6d 61 6e 64 2c 20 79 6f 75 20 63 61 6e  command, you can
03c0: 20 61 64 64 20 74 68 65 20 6f 70 74 69 6f 6e 20   add the option 
03d0: 20 22 2d 2d 62 72 61 6e 63 68 20 3c 69 3e 42 52   "--branch <i>BR
03e0: 41 4e 43 48 2d 4e 41 4d 45 3c 2f 69 3e 22 20 74  ANCH-NAME</i>" t
03f0: 6f 0a 20 20 6d 61 6b 65 20 74 68 65 20 63 68 61  o.  make the cha
0400: 6e 67 65 20 62 65 20 74 68 65 20 66 6f 75 6e 64  nge be the found
0410: 69 6e 67 20 63 68 65 63 6b 2d 69 6e 20 66 6f 72  ing check-in for
0420: 20 61 20 6e 65 77 20 62 72 61 6e 63 68 2e 20 20   a new branch.  
0430: 59 6f 75 20 63 61 6e 0a 20 20 61 6c 73 6f 20 61  You can.  also a
0440: 64 64 20 74 68 65 20 22 2d 2d 62 67 63 6f 6c 6f  dd the "--bgcolo
0450: 72 20 3c 69 3e 43 4f 4c 4f 52 3c 2f 69 3e 22 20  r <i>COLOR</i>" 
0460: 6f 70 74 69 6f 6e 20 74 6f 20 67 69 76 65 20 74  option to give t
0470: 68 65 20 62 72 61 6e 63 68 20 61 0a 20 20 73 70  he branch a.  sp
0480: 65 63 69 66 69 63 20 62 61 63 6b 67 72 6f 75 6e  ecific backgroun
0490: 64 20 63 6f 6c 6f 72 20 6f 6e 20 74 69 6d 65 6c  d color on timel
04a0: 69 6e 65 73 2e 0a 0a 20 20 49 66 20 79 6f 75 20  ines...  If you 
04b0: 77 61 6e 74 20 74 6f 20 63 72 65 61 74 65 20 61  want to create a
04c0: 20 6e 65 77 20 62 72 61 6e 63 68 20 77 68 6f 73   new branch whos
04d0: 65 20 66 6f 75 6e 64 69 6e 67 20 63 68 65 63 6b  e founding check
04e0: 2d 69 6e 20 69 73 20 74 68 65 0a 20 20 73 61 6d  -in is the.  sam
04f0: 65 20 61 73 20 61 6e 20 65 78 69 73 74 69 6e 67  e as an existing
0500: 20 63 68 65 63 6b 2d 69 6e 2c 20 75 73 65 20 74   check-in, use t
0510: 68 69 73 20 63 6f 6d 6d 61 6e 64 3a 0a 0a 20 20  his command:..  
0520: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 3c  <blockquote>.  <
0530: 62 3e 66 6f 73 73 69 6c 20 62 72 61 6e 63 68 20  b>fossil branch 
0540: 6e 65 77 3c 2f 62 3e 20 3c 69 3e 42 52 41 4e 43  new</b> <i>BRANC
0550: 48 2d 4e 41 4d 45 20 42 41 53 49 53 3c 2f 69 3e  H-NAME BASIS</i>
0560: 0a 20 20 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  .  </blockquote>
0570: 0a 0a 20 20 54 68 65 20 3c 69 3e 42 52 41 4e 43  ..  The <i>BRANC
0580: 48 2d 4e 41 4d 45 3c 2f 69 3e 20 61 72 67 75 6d  H-NAME</i> argum
0590: 65 6e 74 20 69 73 20 74 68 65 20 6e 61 6d 65 20  ent is the name 
05a0: 6f 66 20 74 68 65 20 6e 65 77 20 62 72 61 6e 63  of the new branc
05b0: 68 20 61 6e 64 20 74 68 65 0a 20 20 3c 69 3e 42  h and the.  <i>B
05c0: 41 53 49 53 3c 2f 69 3e 20 61 72 67 75 6d 65 6e  ASIS</i> argumen
05d0: 74 20 69 73 20 74 68 65 20 6e 61 6d 65 20 6f 66  t is the name of
05e0: 20 74 68 65 20 63 68 65 63 6b 2d 69 6e 20 74 68   the check-in th
05f0: 61 74 20 74 68 65 20 62 72 61 6e 63 68 20 73 70  at the branch sp
0600: 6c 69 74 73 0a 20 20 6f 66 66 20 66 72 6f 6d 2e  lits.  off from.
0610: 0a 0a 20 20 49 66 20 79 6f 75 20 61 6c 72 65 61  ..  If you alrea
0620: 64 79 20 68 61 76 65 20 61 20 66 6f 72 6b 20 69  dy have a fork i
0630: 6e 20 79 6f 75 72 20 63 68 65 63 6b 2d 69 6e 20  n your check-in 
0640: 74 72 65 65 20 61 6e 64 20 79 6f 75 20 77 61 6e  tree and you wan
0650: 74 20 74 6f 20 63 6f 6e 76 65 72 74 0a 20 20 74  t to convert.  t
0660: 68 61 74 20 66 6f 72 6b 20 74 6f 20 61 20 62 72  hat fork to a br
0670: 61 6e 63 68 2c 20 79 6f 75 20 63 61 6e 20 64 6f  anch, you can do
0680: 20 74 68 69 73 20 66 72 6f 6d 20 74 68 65 20 77   this from the w
0690: 65 62 20 69 6e 74 65 72 66 61 63 65 2e 0a 20 20  eb interface..  
06a0: 46 69 72 73 74 20 6c 6f 63 61 74 65 20 74 68 65  First locate the
06b0: 20 63 68 65 63 6b 2d 69 6e 20 74 68 61 74 20 79   check-in that y
06c0: 6f 75 20 77 61 6e 74 20 74 6f 20 62 65 0a 20 20  ou want to be.  
06d0: 74 68 65 20 66 6f 75 6e 64 69 6e 67 20 63 68 65  the founding che
06e0: 63 6b 2d 69 6e 20 6f 66 20 79 6f 75 72 20 62 72  ck-in of your br
06f0: 61 6e 63 68 20 6f 6e 20 74 68 65 20 74 69 6d 65  anch on the time
0700: 6c 69 6e 65 20 61 6e 64 20 63 6c 69 63 6b 20 6f  line and click o
0710: 6e 20 69 74 73 0a 20 20 6c 69 6e 6b 20 73 6f 20  n its.  link so 
0720: 74 68 61 74 20 79 6f 75 20 61 72 65 20 6f 6e 20  that you are on 
0730: 74 68 65 20 3c 62 3e 63 69 3c 2f 62 3e 20 70 61  the <b>ci</b> pa
0740: 67 65 2e 20 20 54 68 65 6e 20 66 69 6e 64 20 74  ge.  Then find t
0750: 68 65 20 22 3c 62 3e 65 64 69 74 3c 2f 62 3e 22  he "<b>edit</b>"
0760: 0a 20 20 6c 69 6e 6b 20 28 6e 65 61 72 20 74 68  .  link (near th
0770: 65 20 22 43 6f 6d 6d 61 6e 64 73 3a 22 20 6c 61  e "Commands:" la
0780: 62 65 6c 29 20 61 6e 64 20 63 6c 69 63 6b 20 6f  bel) and click o
0790: 6e 20 74 68 61 74 2e 20 20 4f 6e 20 74 68 65 20  n that.  On the 
07a0: 0a 20 20 22 45 64 69 74 20 43 68 65 63 6b 2d 69  .  "Edit Check-i
07b0: 6e 22 20 70 61 67 65 2c 20 63 68 65 63 6b 20 74  n" page, check t
07c0: 68 65 20 62 6f 78 20 62 65 73 69 64 65 20 22 42  he box beside "B
07d0: 72 61 6e 63 68 69 6e 67 3a 22 20 61 6e 64 20 66  ranching:" and f
07e0: 69 6c 6c 20 69 6e 20 0a 20 20 74 68 65 20 6e 61  ill in .  the na
07f0: 6d 65 20 6f 66 20 79 6f 75 72 20 6e 65 77 20 62  me of your new b
0800: 72 61 6e 63 68 20 74 6f 20 74 68 65 20 72 69 67  ranch to the rig
0810: 68 74 20 61 6e 64 20 70 72 65 73 73 20 74 68 65  ht and press the
0820: 20 22 41 70 70 6c 79 20 43 68 61 6e 67 65 73 22   "Apply Changes"
0830: 0a 20 20 62 75 74 74 6f 6e 2e 0a 7d 0a 0a 66 61  .  button..}..fa
0840: 71 20 7b 0a 20 20 48 6f 77 20 64 6f 20 49 20 63  q {.  How do I c
0850: 72 65 61 74 65 20 61 20 70 72 69 76 61 74 65 20  reate a private 
0860: 62 72 61 6e 63 68 20 74 68 61 74 20 77 6f 6e 27  branch that won'
0870: 74 20 67 65 74 20 70 75 73 68 65 64 20 62 61 63  t get pushed bac
0880: 6b 20 74 6f 20 74 68 65 0a 20 20 6d 61 69 6e 20  k to the.  main 
0890: 72 65 70 6f 73 69 74 6f 72 79 2e 0a 7d 20 7b 0a  repository..} {.
08a0: 20 20 59 6f 75 20 63 61 6e 6e 6f 74 2e 20 20 41    You cannot.  A
08b0: 6c 6c 20 62 72 61 6e 63 68 65 73 20 69 6e 20 66  ll branches in f
08c0: 6f 73 73 69 6c 20 61 72 65 20 70 75 62 6c 69 63  ossil are public
08d0: 20 69 6e 20 74 68 65 20 73 65 6e 73 65 20 74 68   in the sense th
08e0: 61 74 0a 20 20 61 72 65 20 61 6c 6c 20 70 75 73  at.  are all pus
08f0: 68 65 64 20 61 6e 64 20 70 75 6c 6c 65 64 20 74  hed and pulled t
0900: 6f 67 65 74 68 65 72 2e 20 20 54 68 65 72 65 20  ogether.  There 
0910: 69 73 20 6e 6f 20 77 61 79 20 74 6f 20 74 65 6c  is no way to tel
0920: 6c 20 66 6f 73 73 69 6c 0a 20 20 74 6f 20 6f 6e  l fossil.  to on
0930: 6c 79 20 70 75 73 68 20 6f 72 20 70 75 6c 6c 20  ly push or pull 
0940: 61 20 73 75 62 73 65 74 20 6f 66 20 62 72 61 6e  a subset of bran
0950: 63 68 65 73 2e 0a 0a 20 20 4f 66 20 63 6f 75 72  ches...  Of cour
0960: 73 65 2c 20 61 73 20 6c 6f 6e 67 20 61 73 20 79  se, as long as y
0970: 6f 75 20 6e 65 76 65 72 20 70 75 73 68 2c 20 79  ou never push, y
0980: 6f 75 20 63 61 6e 20 6d 61 6b 65 20 61 73 20 6d  ou can make as m
0990: 61 6e 79 20 70 72 69 76 61 74 65 0a 20 20 63 68  any private.  ch
09a0: 61 6e 67 65 73 20 61 73 20 79 6f 75 20 77 61 6e  anges as you wan
09b0: 74 2e 0a 7d 0a 0a 0a 0a 23 23 23 23 23 23 23 23  t..}....########
09c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
09d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
09e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
09f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0a00: 23 23 23 23 23 0a 23 20 43 6f 64 65 20 74 6f 20  #####.# Code to 
0a10: 61 63 74 75 61 6c 6c 79 20 67 65 6e 65 72 61 74  actually generat
0a20: 65 20 74 68 65 20 46 41 51 0a 23 0a 70 75 74 73  e the FAQ.#.puts
0a30: 20 22 3c 68 31 20 61 6c 69 67 6e 3d 5c 22 63 65   "<h1 align=\"ce
0a40: 6e 74 65 72 5c 22 3e 46 72 65 71 75 65 6e 74 6c  nter\">Frequentl
0a50: 79 20 41 73 6b 65 64 20 51 75 65 73 74 69 6f 6e  y Asked Question
0a60: 73 3c 2f 68 31 3e 5c 6e 22 0a 70 75 74 73 20 22  s</h1>\n".puts "
0a70: 3c 70 3e 4e 6f 74 65 3a 20 53 65 65 20 61 6c 73  <p>Note: See als
0a80: 6f 20 3c 61 20 68 72 65 66 3d 5c 22 71 61 6e 64  o <a href=\"qand
0a90: 63 2e 77 69 6b 69 5c 22 3e 51 75 65 73 74 69 6f  c.wiki\">Questio
0aa0: 6e 73 20 61 6e 64 20 43 72 69 74 69 63 69 73 6d  ns and Criticism
0ab0: 73 3c 2f 61 3e 2e 5c 6e 22 0a 0a 70 75 74 73 20  s</a>.\n"..puts 
0ac0: 7b 3c 6f 6c 3e 7d 0a 66 6f 72 20 7b 73 65 74 20  {<ol>}.for {set 
0ad0: 69 20 31 7d 20 7b 24 69 3c 24 63 6e 74 7d 20 7b  i 1} {$i<$cnt} {
0ae0: 69 6e 63 72 20 69 7d 20 7b 0a 20 20 70 75 74 73  incr i} {.  puts
0af0: 20 22 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 5c 22   "<li><a href=\"
0b00: 23 71 24 69 5c 22 3e 5b 6c 69 6e 64 65 78 20 24  #q$i\">[lindex $
0b10: 66 61 71 28 24 69 29 20 30 5d 3c 2f 61 3e 3c 2f  faq($i) 0]</a></
0b20: 6c 69 3e 22 0a 7d 0a 70 75 74 73 20 7b 3c 2f 6f  li>".}.puts {</o
0b30: 6c 3e 7d 0a 70 75 74 73 20 7b 3c 68 72 3e 7d 0a  l>}.puts {<hr>}.
0b40: 0a 66 6f 72 20 7b 73 65 74 20 69 20 31 7d 20 7b  .for {set i 1} {
0b50: 24 69 3c 24 63 6e 74 7d 20 7b 69 6e 63 72 20 69  $i<$cnt} {incr i
0b60: 7d 20 7b 0a 20 20 70 75 74 73 20 22 3c 61 20 6e  } {.  puts "<a n
0b70: 61 6d 65 3d 5c 22 71 24 69 5c 22 3e 3c 2f 61 3e  ame=\"q$i\"></a>
0b80: 22 0a 20 20 70 75 74 73 20 22 3c 70 3e 3c 62 3e  ".  puts "<p><b>
0b90: 28 24 69 29 20 5b 6c 69 6e 64 65 78 20 24 66 61  ($i) [lindex $fa
0ba0: 71 28 24 69 29 20 30 5d 3c 2f 62 3e 3c 2f 70 3e  q($i) 0]</b></p>
0bb0: 5c 6e 22 0a 20 20 73 65 74 20 62 6f 64 79 20 5b  \n".  set body [
0bc0: 6c 69 6e 64 65 78 20 24 66 61 71 28 24 69 29 20  lindex $faq($i) 
0bd0: 31 5d 0a 20 20 72 65 67 73 75 62 20 2d 61 6c 6c  1].  regsub -all
0be0: 20 22 5c 6e 20 2a 22 20 5b 73 74 72 69 6e 67 20   "\n *" [string 
0bf0: 74 72 69 6d 20 24 62 6f 64 79 5d 20 22 5c 6e 22  trim $body] "\n"
0c00: 20 62 6f 64 79 0a 20 20 70 75 74 73 20 22 3c 62   body.  puts "<b
0c10: 6c 6f 63 6b 71 75 6f 74 65 3e 24 62 6f 64 79 3c  lockquote>$body<
0c20: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 3c 2f 6c 69  /blockquote></li
0c30: 3e 5c 6e 22 0a 7d 0a 70 75 74 73 20 7b 3c 2f 6f  >\n".}.puts {</o
0c40: 6c 3e 7d 0a                                      l>}.