Hex Artifact Content
Not logged in

Artifact 863d886ba5253b374058623c18825a763523efd0:

File www/newrepo.wiki part of check-in [ab5ab46206] - removed USER stuff. Reorganized. i would have SWORN that i checked this in yesterday. by stephan on 2008-05-23 12:24:37.

0000: 3c 68 31 3e 48 4f 57 54 4f 3a 20 63 72 65 61 74  <h1>HOWTO: creat
0010: 69 6e 67 20 61 20 6e 65 77 20 72 65 70 6f 73 69  ing a new reposi
0020: 74 6f 72 79 3c 2f 68 31 3e 0a 0a 3c 70 3e 20 54  tory</h1>..<p> T
0030: 68 65 20 5b 2f 64 6f 63 2f 74 69 70 2f 77 77 77  he [/doc/tip/www
0040: 2f 71 75 69 63 6b 73 74 61 72 74 2e 77 69 6b 69  /quickstart.wiki
0050: 7c 71 75 69 63 6b 73 74 61 72 74 20 67 75 69 64  |quickstart guid
0060: 65 5d 20 65 78 70 6c 61 69 6e 73 20 68 6f 77 0a  e] explains how.
0070: 74 6f 20 67 65 74 20 75 70 20 61 6e 64 20 72 75  to get up and ru
0080: 6e 6e 69 6e 67 20 77 69 74 68 20 66 6f 73 73 69  nning with fossi
0090: 6c 2e 20 42 75 74 20 6f 6e 63 65 20 79 6f 75 27  l. But once you'
00a0: 72 65 20 72 75 6e 6e 69 6e 67 2c 20 77 68 61 74  re running, what
00b0: 20 63 61 6e 0a 79 6f 75 20 64 6f 20 77 69 74 68   can.you do with
00c0: 20 69 74 3f 20 54 68 69 73 20 64 6f 63 75 6d 65   it? This docume
00d0: 6e 74 20 77 69 6c 6c 20 77 61 6c 6b 20 79 6f 75  nt will walk you
00e0: 20 74 68 72 6f 75 67 68 20 74 68 65 20 70 72 6f   through the pro
00f0: 63 65 73 73 20 6f 66 0a 63 72 65 61 74 69 6e 67  cess of.creating
0100: 20 61 20 66 6f 73 73 69 6c 20 72 65 70 6f 73 69   a fossil reposi
0110: 74 6f 72 79 2c 20 70 6f 70 75 6c 61 74 69 6e 67  tory, populating
0120: 20 69 74 20 77 69 74 68 20 66 69 6c 65 73 2c 20   it with files, 
0130: 61 6e 64 20 74 68 65 6e 0a 73 68 61 72 69 6e 67  and then.sharing
0140: 20 69 74 20 6f 76 65 72 20 74 68 65 20 77 65 62   it over the web
0150: 2e 3c 2f 70 3e 0a 0a 54 68 65 20 66 69 72 73 74  .</p>..The first
0160: 20 74 68 69 6e 67 20 77 65 20 6e 65 65 64 20 74   thing we need t
0170: 6f 20 64 6f 20 69 73 20 63 72 65 61 74 65 20 61  o do is create a
0180: 20 66 6f 73 73 69 6c 20 72 65 70 6f 73 69 74 6f   fossil reposito
0190: 72 79 20 66 69 6c 65 3a 0a 0a 3c 76 65 72 62 61  ry file:..<verba
01a0: 74 69 6d 3e 0a 73 74 65 70 68 61 6e 40 6c 75 64  tim>.stephan@lud
01b0: 6f 3a 7e 2f 66 6f 73 73 69 6c 24 20 66 6f 73 73  o:~/fossil$ foss
01c0: 69 6c 20 6e 65 77 20 64 65 6d 6f 2e 66 6f 73 73  il new demo.foss
01d0: 69 6c 0a 70 72 6f 6a 65 63 74 2d 69 64 3a 20 39  il.project-id: 9
01e0: 64 38 63 63 66 66 35 36 37 31 37 39 36 65 65 30  d8ccff5671796ee0
01f0: 34 65 36 30 61 66 36 39 33 32 61 61 37 37 38 38  4e60af6932aa7788
0200: 66 30 61 39 39 30 61 0a 73 65 72 76 65 72 2d 69  f0a990a.server-i
0210: 64 3a 20 20 31 34 35 66 65 37 64 37 31 65 33 62  d:  145fe7d71e3b
0220: 35 31 33 61 63 33 37 61 63 32 38 33 39 37 39 64  513ac37ac283979d
0230: 37 33 65 31 32 63 61 30 34 62 66 65 0a 61 64 6d  73e12ca04bfe.adm
0240: 69 6e 2d 75 73 65 72 3a 20 73 74 65 70 68 61 6e  in-user: stephan
0250: 20 28 6e 6f 20 70 61 73 73 77 6f 72 64 20 73 65   (no password se
0260: 74 20 79 65 74 21 29 0a 62 61 73 65 6c 69 6e 65  t yet!).baseline
0270: 3a 20 20 20 38 34 65 38 31 61 31 35 30 35 33 35  :   84e81a150535
0280: 66 30 33 31 37 32 32 66 38 31 35 64 35 39 63 30  f031722f815d59c0
0290: 63 35 65 39 36 61 62 37 66 31 32 32 0a 3c 2f 76  c5e96ab7f122.</v
02a0: 65 72 62 61 74 69 6d 3e 0a 0a 54 68 65 20 6e 75  erbatim>..The nu
02b0: 6d 62 65 72 73 20 69 74 20 73 70 69 74 73 20 6f  mbers it spits o
02c0: 75 74 20 61 72 65 20 75 6e 69 6d 70 6f 72 74 61  ut are unimporta
02d0: 6e 74 20 28 74 68 65 79 20 61 72 65 20 76 65 72  nt (they are ver
02e0: 73 69 6f 6e 0a 6e 75 6d 62 65 72 73 29 2e 0a 0a  sion.numbers)...
02f0: 4e 6f 77 20 77 65 20 68 61 76 65 20 61 6e 20 65  Now we have an e
0300: 6d 70 74 79 20 72 65 70 6f 73 69 74 6f 72 79 20  mpty repository 
0310: 66 69 6c 65 20 6e 61 6d 65 64 20 3c 74 74 3e 64  file named <tt>d
0320: 65 6d 6f 2e 66 6f 73 73 69 6c 3c 2f 74 74 3e 2e  emo.fossil</tt>.
0330: 0a 54 68 65 72 65 20 69 73 20 6e 6f 74 68 69 6e  .There is nothin
0340: 67 20 6d 61 67 69 63 61 6c 20 61 62 6f 75 74 20  g magical about 
0350: 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 20 3c 74  the extension <t
0360: 74 3e 2e 66 6f 73 73 69 6c 3c 2f 74 74 3e 20 2d  t>.fossil</tt> -
0370: 20 69 74 27 73 0a 6a 75 73 74 20 61 20 63 6f 6e   it's.just a con
0380: 76 65 6e 74 69 6f 6e 2e 20 59 6f 75 20 6d 61 79  vention. You may
0390: 20 6e 61 6d 65 20 79 6f 75 72 20 66 69 6c 65 73   name your files
03a0: 20 61 6e 79 74 68 69 6e 67 20 79 6f 75 20 6c 69   anything you li
03b0: 6b 65 2e 0a 0a 54 68 65 20 66 69 72 73 74 20 74  ke...The first t
03c0: 68 69 6e 67 20 77 65 20 6e 6f 72 6d 61 6c 6c 79  hing we normally
03d0: 20 77 61 6e 74 20 74 6f 20 64 6f 20 69 73 20 74   want to do is t
03e0: 6f 20 72 75 6e 20 66 6f 73 73 69 6c 20 61 73 20  o run fossil as 
03f0: 61 20 6c 6f 63 61 6c 20 73 65 72 76 65 72 20 73  a local server s
0400: 6f 0a 74 68 61 74 20 79 6f 75 20 63 61 6e 20 63  o.that you can c
0410: 6f 6e 66 69 67 75 72 65 20 74 68 65 20 61 63 63  onfigure the acc
0420: 65 73 73 20 72 69 67 68 74 73 20 74 6f 20 74 68  ess rights to th
0430: 65 20 72 65 70 6f 3a 0a 0a 3c 76 65 72 62 61 74  e repo:..<verbat
0440: 69 6d 3e 0a 73 74 65 70 68 61 6e 40 6c 75 64 6f  im>.stephan@ludo
0450: 3a 7e 2f 66 6f 73 73 69 6c 24 20 66 6f 73 73 69  :~/fossil$ fossi
0460: 6c 20 75 69 20 64 65 6d 6f 2e 66 6f 73 73 69 6c  l ui demo.fossil
0470: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0a 0a 54 68  .</verbatim>..Th
0480: 65 20 3c 74 74 3e 75 69 3c 2f 74 74 3e 20 63 6f  e <tt>ui</tt> co
0490: 6d 6d 61 6e 64 20 73 74 61 72 74 73 20 75 70 20  mmand starts up 
04a0: 61 20 73 65 72 76 65 72 20 28 77 69 74 68 20 61  a server (with a
04b0: 6e 20 6f 70 74 69 6f 6e 61 6c 20 3c 74 74 3e 2d  n optional <tt>-
04c0: 70 6f 72 74 0a 4e 55 4d 42 45 52 3c 2f 74 74 3e  port.NUMBER</tt>
04d0: 20 61 72 67 75 6d 65 6e 74 29 20 61 6e 64 20 6c   argument) and l
04e0: 61 75 6e 63 68 65 73 20 61 20 77 65 62 20 62 72  aunches a web br
04f0: 6f 77 73 65 72 20 70 6f 69 6e 74 69 6e 67 20 61  owser pointing a
0500: 74 20 74 68 65 0a 66 6f 73 73 69 6c 20 73 65 72  t the.fossil ser
0510: 76 65 72 2e 20 46 72 6f 6d 20 74 68 65 72 65 20  ver. From there 
0520: 69 74 20 74 61 6b 65 73 20 6a 75 73 74 20 61 20  it takes just a 
0530: 66 65 77 20 6d 6f 6d 65 6e 74 73 20 74 6f 20 63  few moments to c
0540: 6f 6e 66 69 67 75 72 65 20 74 68 65 0a 72 65 70  onfigure the.rep
0550: 6f 2e 20 4d 6f 73 74 20 69 6d 70 6f 72 74 61 6e  o. Most importan
0560: 74 6c 79 2c 20 67 6f 20 74 6f 20 74 68 65 20 53  tly, go to the S
0570: 65 74 75 70 20 6d 65 6e 75 2c 20 74 68 65 6e 20  etup menu, then 
0580: 74 68 65 20 55 73 65 72 73 20 6c 69 6e 6b 2c 20  the Users link, 
0590: 61 6e 64 0a 73 65 74 20 79 6f 75 72 20 61 63 63  and.set your acc
05a0: 6f 75 6e 74 20 6e 61 6d 65 20 61 6e 64 20 70 61  ount name and pa
05b0: 73 73 77 6f 72 64 2c 20 61 6e 64 20 67 72 61 6e  ssword, and gran
05c0: 74 20 79 6f 75 72 20 61 63 63 6f 75 6e 74 20 61  t your account a
05d0: 6c 6c 20 61 63 63 65 73 73 0a 70 72 69 76 69 6c  ll access.privil
05e0: 65 64 67 65 73 2e 20 28 49 20 61 6c 73 6f 20 6c  edges. (I also l
05f0: 69 6b 65 20 74 6f 20 67 72 61 6e 74 20 43 6c 6f  ike to grant Clo
0600: 6e 65 20 61 63 63 65 73 73 20 74 6f 20 74 68 65  ne access to the
0610: 20 61 6e 6f 6e 79 6d 6f 75 73 20 75 73 65 72 2c   anonymous user,
0620: 0a 62 75 74 20 74 68 61 74 27 73 20 70 65 72 73  .but that's pers
0630: 6f 6e 61 6c 20 70 72 65 66 65 72 65 6e 63 65 2e  onal preference.
0640: 29 0a 0a 4f 6e 63 65 20 79 6f 75 20 61 72 65 20  )..Once you are 
0650: 64 6f 6e 65 2c 20 6b 69 6c 6c 20 74 68 65 20 66  done, kill the f
0660: 6f 73 73 69 6c 20 73 65 72 76 65 72 20 28 77 69  ossil server (wi
0670: 74 68 20 43 74 72 6c 2d 43 20 6f 72 20 65 71 75  th Ctrl-C or equ
0680: 69 76 61 6c 65 6e 74 29 0a 61 6e 64 20 63 6c 6f  ivalent).and clo
0690: 73 65 20 74 68 65 20 62 72 6f 77 73 65 72 20 77  se the browser w
06a0: 69 6e 64 6f 77 2e 0a 0a 3c 62 6c 6f 63 6b 71 75  indow...<blockqu
06b0: 6f 74 65 3e 0a 54 69 70 3a 20 69 74 20 69 73 20  ote>.Tip: it is 
06c0: 6e 6f 74 20 73 74 72 69 63 74 6c 79 20 72 65 71  not strictly req
06d0: 75 69 72 65 64 20 74 6f 20 63 6f 6e 66 69 67 75  uired to configu
06e0: 72 65 20 61 20 72 65 70 6f 73 69 74 6f 72 79 0a  re a repository.
06f0: 74 68 69 73 20 77 61 79 2c 20 62 75 74 20 69 66  this way, but if
0700: 20 79 6f 75 20 61 72 65 20 67 6f 69 6e 67 20 74   you are going t
0710: 6f 20 73 68 61 72 65 20 61 20 72 65 70 6f 20 6f  o share a repo o
0720: 76 65 72 20 74 68 65 20 6e 65 74 20 74 68 65 6e  ver the net then
0730: 20 69 74 0a 69 73 20 68 69 67 68 6c 79 20 72 65   it.is highly re
0740: 63 6f 6d 6d 65 6e 64 65 64 2e 20 49 66 20 79 6f  commended. If yo
0750: 75 20 61 72 65 20 6f 6e 6c 79 20 67 6f 69 6e 67  u are only going
0760: 20 74 6f 20 77 6f 72 6b 20 77 69 74 68 20 74 68   to work with th
0770: 65 20 72 65 70 6f 0a 6c 6f 63 61 6c 6c 79 2c 20  e repo.locally, 
0780: 79 6f 75 20 63 61 6e 20 73 6b 69 70 20 74 68 65  you can skip the
0790: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 73   configuration s
07a0: 74 65 70 20 61 6e 64 20 64 6f 20 69 74 20 6c 61  tep and do it la
07b0: 74 65 72 20 69 66 0a 79 6f 75 20 64 65 63 69 64  ter if.you decid
07c0: 65 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 73 68  e you want to sh
07d0: 61 72 65 20 79 6f 75 72 20 72 65 70 6f 2e 0a 3c  are your repo..<
07e0: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 54 68  /blockquote>..Th
07f0: 65 20 6e 65 78 74 20 74 68 69 6e 67 20 77 65 20  e next thing we 
0800: 6e 65 65 64 20 74 6f 20 64 6f 20 69 73 20 3c 65  need to do is <e
0810: 6d 3e 6f 70 65 6e 3c 2f 65 6d 3e 20 74 68 65 20  m>open</em> the 
0820: 72 65 70 6f 73 69 74 6f 72 79 2e 20 54 6f 20 64  repository. To d
0830: 6f 20 73 6f 0a 77 65 20 63 72 65 61 74 65 20 61  o so.we create a
0840: 20 77 6f 72 6b 69 6e 67 20 64 69 72 65 63 74 6f   working directo
0850: 72 79 20 61 6e 64 20 74 68 65 6e 20 3c 74 74 3e  ry and then <tt>
0860: 63 64 3c 2f 74 74 3e 20 74 6f 20 69 74 3a 0a 0a  cd</tt> to it:..
0870: 3c 76 65 72 62 61 74 69 6d 3e 0a 73 74 65 70 68  <verbatim>.steph
0880: 61 6e 40 6c 75 64 6f 3a 7e 2f 66 6f 73 73 69 6c  an@ludo:~/fossil
0890: 24 20 6d 6b 64 69 72 20 64 65 6d 6f 0a 73 74 65  $ mkdir demo.ste
08a0: 70 68 61 6e 40 6c 75 64 6f 3a 7e 2f 66 6f 73 73  phan@ludo:~/foss
08b0: 69 6c 24 20 63 64 20 64 65 6d 6f 0a 73 74 65 70  il$ cd demo.step
08c0: 68 61 6e 40 6c 75 64 6f 3a 7e 2f 66 6f 73 73 69  han@ludo:~/fossi
08d0: 6c 2f 64 65 6d 6f 24 20 66 6f 73 73 69 6c 20 6f  l/demo$ fossil o
08e0: 70 65 6e 20 2e 2e 2f 64 65 6d 6f 2e 66 6f 73 73  pen ../demo.foss
08f0: 69 6c 0a 73 74 65 70 68 61 6e 40 6c 75 64 6f 3a  il.stephan@ludo:
0900: 7e 2f 66 6f 73 73 69 6c 2f 64 65 6d 6f 24 20 20  ~/fossil/demo$  
0910: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0a 0a 54 68  .</verbatim>..Th
0920: 61 74 20 63 72 65 61 74 65 73 20 61 20 66 69 6c  at creates a fil
0930: 65 20 63 61 6c 6c 65 64 20 3c 74 74 3e 5f 46 4f  e called <tt>_FO
0940: 53 53 49 4c 5f 3c 2f 74 74 3e 20 69 6e 20 74 68  SSIL_</tt> in th
0950: 65 20 63 75 72 72 65 6e 74 0a 64 69 72 65 63 74  e current.direct
0960: 6f 72 79 2c 20 61 6e 64 20 74 68 69 73 20 66 69  ory, and this fi
0970: 6c 65 20 63 6f 6e 74 61 69 6e 73 20 61 6c 6c 20  le contains all 
0980: 6b 69 6e 64 73 20 6f 66 20 66 6f 73 73 69 6c 2d  kinds of fossil-
0990: 72 65 6c 61 74 65 64 0a 69 6e 66 6f 72 6d 61 74  related.informat
09a0: 69 6f 6e 20 61 62 6f 75 74 20 79 6f 75 72 20 6c  ion about your l
09b0: 6f 63 61 6c 20 72 65 70 6f 73 69 74 6f 72 79 2e  ocal repository.
09c0: 20 59 6f 75 20 63 61 6e 20 69 67 6e 6f 72 65 20   You can ignore 
09d0: 69 74 0a 66 6f 72 20 61 6c 6c 20 70 75 72 70 6f  it.for all purpo
09e0: 73 65 73 2c 20 62 75 74 20 62 65 20 73 75 72 65  ses, but be sure
09f0: 20 6e 6f 74 20 74 6f 20 61 63 63 69 64 65 6e 74   not to accident
0a00: 61 6c 6c 79 20 72 65 6d 6f 76 65 20 69 74 0a 6f  ally remove it.o
0a10: 72 20 6f 74 68 65 72 77 69 73 65 20 64 61 6d 61  r otherwise dama
0a20: 67 65 20 69 74 20 2d 20 69 74 20 62 65 6c 6f 6e  ge it - it belon
0a30: 67 73 20 74 6f 20 66 6f 73 73 69 6c 2c 20 6e 6f  gs to fossil, no
0a40: 74 20 79 6f 75 2e 0a 0a 54 68 65 20 6e 65 78 74  t you...The next
0a50: 20 74 68 69 6e 67 20 77 65 20 6e 65 65 64 20 74   thing we need t
0a60: 6f 20 64 6f 20 69 73 20 61 64 64 20 66 69 6c 65  o do is add file
0a70: 73 20 74 6f 20 6f 75 72 20 72 65 70 6f 73 69 74  s to our reposit
0a80: 6f 72 79 2e 20 20 41 73 20 69 74 0a 68 61 70 70  ory.  As it.happ
0a90: 65 6e 73 2c 20 77 65 20 68 61 76 65 20 61 20 66  ens, we have a f
0aa0: 65 77 20 43 20 73 6f 75 72 63 65 20 66 69 6c 65  ew C source file
0ab0: 73 20 6c 61 79 69 6e 67 20 61 72 6f 75 6e 64 2c  s laying around,
0ac0: 20 77 68 69 63 68 20 77 65 27 6c 6c 0a 73 69 6d   which we'll.sim
0ad0: 70 6c 79 20 63 6f 70 79 20 69 6e 74 6f 20 6f 75  ply copy into ou
0ae0: 72 20 77 6f 72 6b 69 6e 67 20 64 69 72 65 63 74  r working direct
0af0: 6f 72 79 2e 0a 0a 3c 76 65 72 62 61 74 69 6d 3e  ory...<verbatim>
0b00: 0a 73 74 65 70 68 61 6e 40 6c 75 64 6f 3a 7e 2f  .stephan@ludo:~/
0b10: 66 6f 73 73 69 6c 2f 64 65 6d 6f 24 20 63 70 20  fossil/demo$ cp 
0b20: 2e 2e 2f 63 73 6e 69 70 2f 2a 2e 7b 63 2c 68 7d  ../csnip/*.{c,h}
0b30: 20 2e 0a 73 74 65 70 68 61 6e 40 6c 75 64 6f 3a   ..stephan@ludo:
0b40: 7e 2f 66 6f 73 73 69 6c 2f 64 65 6d 6f 24 20 6c  ~/fossil/demo$ l
0b50: 73 0a 63 6c 6f 62 2e 63 20 20 63 6c 6f 62 2e 68  s.clob.c  clob.h
0b60: 20 20 63 6c 6f 62 7a 2e 63 20 20 5f 46 4f 53 53    clobz.c  _FOSS
0b70: 49 4c 5f 20 20 6d 6b 64 65 70 2e 63 20 20 74 65  IL_  mkdep.c  te
0b80: 73 74 2d 63 6c 6f 62 2e 63 0a 74 6f 6b 65 6e 69  st-clob.c.tokeni
0b90: 7a 65 5f 70 61 74 68 2e 63 20 74 6f 6b 65 6e 69  ze_path.c tokeni
0ba0: 7a 65 5f 70 61 74 68 2e 68 20 20 76 61 70 70 65  ze_path.h  vappe
0bb0: 6e 64 66 2e 63 20 20 76 61 70 70 65 6e 64 66 2e  ndf.c  vappendf.
0bc0: 68 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0a 0a 46  h.</verbatim>..F
0bd0: 6f 73 73 69 6c 20 64 6f 65 73 6e 27 74 20 6b 6e  ossil doesn't kn
0be0: 6f 77 20 61 62 6f 75 74 20 74 68 6f 73 65 20 66  ow about those f
0bf0: 69 6c 65 73 20 79 65 74 2e 20 54 65 6c 6c 69 6e  iles yet. Tellin
0c00: 67 20 66 6f 73 73 69 6c 20 61 62 6f 75 74 0a 61  g fossil about.a
0c10: 20 6e 65 77 20 66 69 6c 65 20 69 73 20 61 20 74   new file is a t
0c20: 77 6f 2d 73 74 65 70 20 70 72 6f 63 65 73 73 2e  wo-step process.
0c30: 20 46 69 72 73 74 20 77 65 20 3c 65 6d 3e 61 64   First we <em>ad
0c40: 64 3c 2f 65 6d 3e 20 74 68 65 20 66 69 6c 65 0a  d</em> the file.
0c50: 74 6f 20 74 68 65 20 72 65 70 6f 2c 20 74 68 65  to the repo, the
0c60: 6e 20 77 65 20 3c 65 6d 3e 63 6f 6d 6d 69 74 3c  n we <em>commit<
0c70: 2f 65 6d 3e 20 74 68 65 20 66 69 6c 65 2e 20 54  /em> the file. T
0c80: 68 69 73 20 69 73 20 61 20 66 61 6d 69 6c 69 61  his is a familia
0c90: 72 0a 70 72 6f 63 65 73 73 20 66 6f 72 20 61 6e  r.process for an
0ca0: 79 6f 6e 65 20 77 68 6f 27 73 20 77 6f 72 6b 65  yone who's worke
0cb0: 64 20 77 69 74 68 20 53 43 4d 20 73 79 73 74 65  d with SCM syste
0cc0: 6d 73 20 62 65 66 6f 72 65 3a 0a 0a 3c 76 65 72  ms before:..<ver
0cd0: 62 61 74 69 6d 3e 0a 73 74 65 70 68 61 6e 40 6c  batim>.stephan@l
0ce0: 75 64 6f 3a 7e 2f 66 6f 73 73 69 6c 2f 64 65 6d  udo:~/fossil/dem
0cf0: 6f 24 20 66 6f 73 73 69 6c 20 61 64 64 20 2a 2e  o$ fossil add *.
0d00: 7b 63 2c 68 7d 0a 73 74 65 70 68 61 6e 40 6c 75  {c,h}.stephan@lu
0d10: 64 6f 3a 7e 2f 66 6f 73 73 69 6c 2f 64 65 6d 6f  do:~/fossil/demo
0d20: 24 20 66 6f 73 73 69 6c 20 63 6f 6d 6d 69 74 20  $ fossil commit 
0d30: 2d 6d 20 22 65 67 67 22 0a 4e 65 77 5f 56 65 72  -m "egg".New_Ver
0d40: 73 69 6f 6e 3a 20 64 31 32 39 36 62 34 61 30 38  sion: d1296b4a08
0d50: 62 39 66 38 62 39 34 33 62 62 36 63 37 33 36 39  b9f8b943bb6c7369
0d60: 38 65 35 31 65 65 64 32 33 66 38 66 39 31 0a 3c  8e51eed23f8f91.<
0d70: 2f 76 65 72 62 61 74 69 6d 3e 0a 0a 57 65 20 6e  /verbatim>..We n
0d80: 6f 77 20 68 61 76 65 20 61 20 77 6f 72 6b 69 6e  ow have a workin
0d90: 67 20 72 65 70 6f 73 69 74 6f 72 79 21 20 54 68  g repository! Th
0da0: 65 20 66 69 6c 65 20 3c 74 74 3e 64 65 6d 6f 2e  e file <tt>demo.
0db0: 66 6f 73 73 69 6c 3c 2f 74 74 3e 0a 69 73 20 74  fossil</tt>.is t
0dc0: 68 65 20 63 65 6e 74 72 61 6c 20 73 74 6f 72 61  he central stora
0dd0: 67 65 2c 20 61 6e 64 20 77 65 20 63 61 6e 20 73  ge, and we can s
0de0: 68 61 72 65 20 69 74 20 61 6d 6f 6e 67 73 74 20  hare it amongst 
0df0: 61 6e 20 61 72 62 69 74 72 61 72 79 0a 6e 75 6d  an arbitrary.num
0e00: 62 65 72 20 6f 66 20 74 72 65 65 73 2e 20 41 73  ber of trees. As
0e10: 20 61 20 73 69 6c 6c 79 20 65 78 61 6d 70 6c 65   a silly example
0e20: 3a 0a 0a 3c 76 65 72 62 61 74 69 6d 3e 0a 73 74  :..<verbatim>.st
0e30: 65 70 68 61 6e 40 6c 75 64 6f 3a 7e 2f 66 6f 73  ephan@ludo:~/fos
0e40: 73 69 6c 2f 64 65 6d 6f 24 20 63 64 20 7e 2f 66  sil/demo$ cd ~/f
0e50: 6f 73 73 69 6c 0a 73 74 65 70 68 61 6e 40 6c 75  ossil.stephan@lu
0e60: 64 6f 3a 7e 2f 66 6f 73 73 69 6c 24 20 6d 6b 64  do:~/fossil$ mkd
0e70: 69 72 20 64 65 6d 6f 32 0a 73 74 65 70 68 61 6e  ir demo2.stephan
0e80: 40 6c 75 64 6f 3a 7e 2f 66 6f 73 73 69 6c 24 20  @ludo:~/fossil$ 
0e90: 63 64 20 64 65 6d 6f 32 0a 73 74 65 70 68 61 6e  cd demo2.stephan
0ea0: 40 6c 75 64 6f 3a 7e 2f 66 6f 73 73 69 6c 2f 64  @ludo:~/fossil/d
0eb0: 65 6d 6f 32 24 20 66 6f 73 73 69 6c 20 6f 70 65  emo2$ fossil ope
0ec0: 6e 20 2e 2e 2f 64 65 6d 6f 2e 66 6f 73 73 69 6c  n ../demo.fossil
0ed0: 0a 41 44 44 20 63 6c 6f 62 2e 63 0a 41 44 44 20  .ADD clob.c.ADD 
0ee0: 63 6c 6f 62 2e 68 0a 41 44 44 20 63 6c 6f 62 7a  clob.h.ADD clobz
0ef0: 2e 63 0a 41 44 44 20 6d 6b 64 65 70 2e 63 0a 41  .c.ADD mkdep.c.A
0f00: 44 44 20 74 65 73 74 2d 63 6c 6f 62 2e 63 0a 41  DD test-clob.c.A
0f10: 44 44 20 74 6f 6b 65 6e 69 7a 65 5f 70 61 74 68  DD tokenize_path
0f20: 2e 63 0a 41 44 44 20 74 6f 6b 65 6e 69 7a 65 5f  .c.ADD tokenize_
0f30: 70 61 74 68 2e 68 0a 41 44 44 20 76 61 70 70 65  path.h.ADD vappe
0f40: 6e 64 66 2e 63 0a 3c 2f 76 65 72 62 61 74 69 6d  ndf.c.</verbatim
0f50: 3e 0a 0a 59 6f 75 20 6d 61 79 20 6d 6f 64 69 66  >..You may modif
0f60: 79 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79  y the repository
0f70: 20 28 65 2e 67 2e 20 61 64 64 2c 20 72 65 6d 6f   (e.g. add, remo
0f80: 76 65 2c 20 6f 72 20 63 6f 6d 6d 69 74 20 66 69  ve, or commit fi
0f90: 6c 65 73 29 20 66 72 6f 6d 0a 62 6f 74 68 20 77  les) from.both w
0fa0: 6f 72 6b 69 6e 67 20 64 69 72 65 63 74 6f 72 69  orking directori
0fb0: 65 73 2c 20 61 6e 64 20 64 6f 69 6e 67 20 73 6f  es, and doing so
0fc0: 20 6d 69 67 68 74 20 62 65 20 75 73 65 66 75 6c   might be useful
0fd0: 20 77 68 65 6e 20 77 6f 72 6b 69 6e 67 20 6f 6e   when working on
0fe0: 0a 61 20 62 72 61 6e 63 68 20 6f 72 20 65 78 70  .a branch or exp
0ff0: 65 72 69 6d 65 6e 74 61 6c 20 63 6f 64 65 2e 0a  erimental code..
1000: 0a 4d 61 6b 69 6e 67 20 79 6f 75 72 20 72 65 70  .Making your rep
1010: 6f 73 69 74 6f 72 79 20 61 76 61 69 6c 61 62 6c  ository availabl
1020: 65 20 6f 76 65 72 20 74 68 65 20 77 65 62 20 69  e over the web i
1030: 73 20 74 72 69 76 69 61 6c 20 74 6f 20 64 6f 2e  s trivial to do.
1040: 20 57 65 0a 61 73 73 75 6d 65 20 79 6f 75 20 68   We.assume you h
1050: 61 76 65 20 73 6f 6d 65 20 77 65 62 20 73 70 61  ave some web spa
1060: 63 65 20 77 68 65 72 65 20 79 6f 75 20 63 61 6e  ce where you can
1070: 20 73 74 6f 72 65 20 79 6f 75 72 20 66 6f 73 73   store your foss
1080: 69 6c 20 66 69 6c 65 0a 61 6e 64 20 72 75 6e 20  il file.and run 
1090: 61 20 43 47 49 20 73 63 72 69 70 74 2e 20 49 66  a CGI script. If
10a0: 20 6e 6f 74 2c 20 74 68 65 6e 20 74 68 69 73 20   not, then this 
10b0: 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 66 6f  option is not fo
10c0: 72 20 79 6f 75 2e 20 49 66 0a 79 6f 75 20 64 6f  r you. If.you do
10d0: 2c 20 74 68 65 6e 20 68 65 72 65 27 73 20 68 6f  , then here's ho
10e0: 77 2e 2e 2e 0a 0a 43 6f 70 79 20 63 6f 70 79 20  w.....Copy copy 
10f0: 74 68 65 20 66 6f 73 73 69 6c 20 72 65 70 6f 73  the fossil repos
1100: 69 74 6f 72 79 20 66 69 6c 65 20 74 6f 20 79 6f  itory file to yo
1110: 75 72 20 77 65 62 20 73 65 72 76 65 72 20 28 69  ur web server (i
1120: 74 20 64 6f 65 73 6e 27 74 0a 6d 61 74 74 65 72  t doesn't.matter
1130: 20 77 68 65 72 65 2c 20 72 65 61 6c 6c 79 29 2e   where, really).
1140: 0a 0a 49 6e 20 79 6f 75 72 20 3c 74 74 3e 63 67  ..In your <tt>cg
1150: 69 2d 62 69 6e 3c 2f 74 74 3e 20 28 6f 72 20 65  i-bin</tt> (or e
1160: 71 75 69 76 61 6c 65 6e 74 29 20 64 69 72 65 63  quivalent) direc
1170: 74 6f 72 79 2c 20 63 72 65 61 74 65 20 61 20 66  tory, create a f
1180: 69 6c 65 0a 77 68 69 63 68 20 6c 6f 6f 6b 73 20  ile.which looks 
1190: 6c 69 6b 65 20 74 68 69 73 3a 0a 0a 3c 76 65 72  like this:..<ver
11a0: 62 61 74 69 6d 3e 0a 23 21 2f 70 61 74 68 2f 74  batim>.#!/path/t
11b0: 6f 2f 66 6f 73 73 69 6c 0a 72 65 70 6f 73 69 74  o/fossil.reposit
11c0: 6f 72 79 3a 20 2f 70 61 74 68 2f 74 6f 2f 6d 79  ory: /path/to/my
11d0: 5f 72 65 70 6f 2e 66 6f 73 73 69 6c 0a 3c 2f 76  _repo.fossil.</v
11e0: 65 72 62 61 74 69 6d 3e 0a 0a 4d 61 6b 65 20 74  erbatim>..Make t
11f0: 68 61 74 20 73 63 72 69 70 74 20 65 78 65 63 75  hat script execu
1200: 74 61 62 6c 65 2c 20 61 6e 64 20 79 6f 75 27 72  table, and you'r
1210: 65 20 61 6c 6c 20 72 65 61 64 79 20 74 6f 20 67  e all ready to g
1220: 6f 3a 0a 0a 3c 76 65 72 62 61 74 69 6d 3e 0a 7e  o:..<verbatim>.~
1230: 2f 77 77 77 2f 63 67 69 2d 62 69 6e 3e 20 63 68  /www/cgi-bin> ch
1240: 6d 6f 64 20 2b 78 20 6d 79 72 65 70 6f 2e 63 67  mod +x myrepo.cg
1250: 69 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0a 0a 4e  i.</verbatim>..N
1260: 6f 77 20 73 69 6d 70 6c 79 20 70 6f 69 6e 74 20  ow simply point 
1270: 79 6f 75 72 20 62 72 6f 77 73 65 72 20 74 6f 0a  your browser to.
1280: 3c 74 74 3e 68 74 74 70 3a 2f 2f 6d 79 2e 64 6f  <tt>http://my.do
1290: 6d 61 69 6e 2f 63 67 69 2d 62 69 6e 2f 6d 79 72  main/cgi-bin/myr
12a0: 65 70 6f 2e 63 67 69 3c 2f 74 74 3e 20 61 6e 64  epo.cgi</tt> and
12b0: 20 79 6f 75 20 73 68 6f 75 6c 64 0a 62 65 20 61   you should.be a
12c0: 62 6c 65 20 74 6f 20 6d 61 6e 61 67 65 20 74 68  ble to manage th
12d0: 65 20 72 65 70 6f 73 69 74 6f 72 79 20 66 72 6f  e repository fro
12e0: 6d 20 74 68 65 72 65 2e 0a 0a 54 6f 20 63 68 65  m there...To che
12f0: 63 6b 20 6f 75 74 20 61 20 63 6f 70 79 20 6f 66  ck out a copy of
1300: 20 79 6f 75 72 20 72 65 6d 6f 74 65 20 72 65 70   your remote rep
1310: 6f 73 69 74 6f 72 79 2c 20 75 73 65 20 74 68 65  ository, use the
1320: 0a 3c 65 6d 3e 63 6c 6f 6e 65 3c 2f 65 6d 3e 20  .<em>clone</em> 
1330: 63 6f 6d 6d 61 6e 64 3a 0a 0a 3c 76 65 72 62 61  command:..<verba
1340: 74 69 6d 3e 0a 73 74 65 70 68 61 6e 40 6c 75 64  tim>.stephan@lud
1350: 6f 3a 7e 2f 66 6f 73 73 69 6c 24 20 66 6f 73 73  o:~/fossil$ foss
1360: 69 6c 20 63 6c 6f 6e 65 20 5c 0a 20 20 68 74 74  il clone \.  htt
1370: 70 3a 2f 2f 4d 79 41 63 63 6f 75 6e 74 4e 61 6d  p://MyAccountNam
1380: 65 3a 4d 79 41 63 63 6f 75 6e 74 50 61 73 73 77  e:MyAccountPassw
1390: 6f 72 64 40 6d 79 2e 64 6f 6d 61 69 6e 2f 63 67  ord@my.domain/cg
13a0: 69 2d 62 69 6e 2f 6d 79 72 65 70 6f 2e 63 67 69  i-bin/myrepo.cgi
13b0: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0a 0a 4e 6f  .</verbatim>..No
13c0: 74 65 20 74 68 61 74 20 79 6f 75 20 73 68 6f 75  te that you shou
13d0: 6c 64 20 70 61 73 73 20 79 6f 75 72 20 66 6f 73  ld pass your fos
13e0: 73 69 6c 20 6c 6f 67 69 6e 20 6e 61 6d 65 20 61  sil login name a
13f0: 6e 64 20 70 61 73 73 77 6f 72 64 20 28 61 73 20  nd password (as 
1400: 73 65 74 0a 76 69 61 20 6c 6f 63 61 6c 20 73 65  set.via local se
1410: 72 76 65 72 20 6d 6f 64 65 29 20 64 75 72 69 6e  rver mode) durin
1420: 67 20 74 68 65 20 63 6c 6f 6e 65 20 2d 20 74 68  g the clone - th
1430: 61 74 20 65 6e 73 75 72 65 73 20 74 68 61 74 20  at ensures that 
1440: 66 6f 73 73 69 6c 0a 77 6f 6e 27 74 20 61 73 6b  fossil.won't ask
1450: 20 79 6f 75 20 66 6f 72 20 69 74 20 6f 6e 20 65   you for it on e
1460: 61 63 68 20 63 6f 6d 6d 69 74 21 0a 0a 41 20 63  ach commit!..A c
1470: 6c 6f 6e 65 20 69 73 20 61 20 6c 6f 63 61 6c 20  lone is a local 
1480: 63 6f 70 79 20 6f 66 20 61 20 72 65 6d 6f 74 65  copy of a remote
1490: 20 72 65 70 6f 73 69 74 6f 72 79 2c 20 61 6e 64   repository, and
14a0: 20 63 61 6e 20 62 65 20 6f 70 65 6e 65 64 20 6a   can be opened j
14b0: 75 73 74 0a 6c 69 6b 65 20 61 20 6c 6f 63 61 6c  ust.like a local
14c0: 20 6f 6e 65 20 28 61 73 20 73 68 6f 77 6e 20 61   one (as shown a
14d0: 62 6f 76 65 29 2e 20 49 74 20 69 73 20 74 72 65  bove). It is tre
14e0: 61 74 65 64 20 69 64 65 6e 74 69 63 61 6c 6c 79  ated identically
14f0: 20 74 6f 20 79 6f 75 72 0a 6c 6f 63 61 6c 20 72   to your.local r
1500: 65 70 6f 73 69 74 6f 72 79 2c 20 77 69 74 68 20  epository, with 
1510: 6f 6e 65 20 76 65 72 79 20 69 6d 70 6f 72 74 61  one very importa
1520: 6e 74 20 64 69 66 66 65 72 65 6e 63 65 2e 20 20  nt difference.  
1530: 57 68 65 6e 20 79 6f 75 20 63 6f 6d 6d 69 74 0a  When you commit.
1540: 63 68 61 6e 67 65 73 20 74 6f 20 61 20 63 6c 6f  changes to a clo
1550: 6e 65 64 20 72 65 6d 6f 74 65 20 72 65 70 6f 73  ned remote repos
1560: 69 74 6f 72 79 2c 20 74 68 65 79 20 77 69 6c 6c  itory, they will
1570: 20 62 65 20 70 75 73 68 65 64 20 62 61 63 6b 20   be pushed back 
1580: 74 6f 20 74 68 65 0a 72 65 6d 6f 74 65 20 72 65  to the.remote re
1590: 70 6f 73 69 74 6f 72 79 2e 20 49 66 20 79 6f 75  pository. If you
15a0: 20 68 61 76 65 20 3c 74 74 3e 61 75 74 6f 73 79   have <tt>autosy
15b0: 6e 63 3c 2f 74 74 3e 20 6f 6e 20 74 68 65 6e 20  nc</tt> on then 
15c0: 74 68 69 73 20 73 79 6e 63 0a 68 61 70 70 65 6e  this sync.happen
15d0: 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 2c  s automatically,
15e0: 20 6f 74 68 65 72 77 69 73 65 20 79 6f 75 20 77   otherwise you w
15f0: 69 6c 6c 20 6e 65 65 64 20 74 6f 20 75 73 65 20  ill need to use 
1600: 74 68 65 0a 3c 65 6d 3e 70 75 6c 6c 3c 2f 65 6d  the.<em>pull</em
1610: 3e 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 67 65 74  > command to get
1620: 20 72 65 6d 6f 74 65 20 63 68 61 6e 67 65 73 20   remote changes 
1630: 61 6e 64 20 74 68 65 20 3c 65 6d 3e 70 75 73 68  and the <em>push
1640: 3c 2f 65 6d 3e 0a 63 6f 6d 6d 61 6e 64 20 74 6f  </em>.command to
1650: 20 70 75 73 68 20 79 6f 75 72 20 6c 6f 63 61 6c   push your local
1660: 20 63 6f 6d 6d 69 74 73 20 74 6f 20 74 68 65 20   commits to the 
1670: 72 65 6d 6f 74 65 20 72 65 70 6f 73 69 74 6f 72  remote repositor
1680: 79 2e 20 59 6f 75 20 6d 75 73 74 0a 6f 66 20 63  y. You must.of c
1690: 6f 75 72 73 65 20 68 61 76 65 20 61 75 74 68 6f  ourse have autho
16a0: 72 69 7a 61 74 69 6f 6e 20 74 6f 20 63 6f 6d 6d  rization to comm
16b0: 69 74 20 63 68 61 6e 67 65 73 20 28 61 63 63 65  it changes (acce
16c0: 73 73 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64  ss is configured
16d0: 0a 76 69 61 20 74 68 65 20 53 65 74 75 70 2f 55  .via the Setup/U
16e0: 73 65 72 73 20 70 61 67 65 20 6d 65 6e 74 69 6f  sers page mentio
16f0: 6e 65 64 20 61 62 6f 76 65 29 2e 0a 0a 59 6f 75  ned above)...You
1700: 20 6d 61 79 20 61 6c 77 61 79 73 20 75 73 65 20   may always use 
1710: 74 68 65 20 3c 65 6d 3e 73 65 72 76 65 72 3c 2f  the <em>server</
1720: 65 6d 3e 20 6f 72 20 3c 65 6d 3e 75 69 3c 2f 65  em> or <em>ui</e
1730: 6d 3e 20 63 6f 6d 6d 61 6e 64 73 20 74 6f 0a 62  m> commands to.b
1740: 72 6f 77 73 65 20 61 20 63 6c 6f 6e 65 64 20 72  rowse a cloned r
1750: 65 70 6f 73 69 74 6f 72 79 2e 20 59 6f 75 20 63  epository. You c
1760: 61 6e 20 65 76 65 6e 20 65 64 69 74 20 63 72 65  an even edit cre
1770: 61 74 65 20 6f 72 20 77 69 6b 69 20 65 6e 74 72  ate or wiki entr
1780: 69 65 73 2c 0a 65 74 63 2e 2c 20 61 6e 64 20 74  ies,.etc., and t
1790: 68 65 79 20 77 69 6c 6c 20 62 65 20 70 75 73 68  hey will be push
17a0: 65 64 20 74 6f 20 74 68 65 20 72 65 6d 6f 74 65  ed to the remote
17b0: 20 73 69 64 65 20 74 68 65 20 6e 65 78 74 20 74   side the next t
17c0: 69 6d 65 20 79 6f 75 0a 70 75 73 68 20 64 61 74  ime you.push dat
17d0: 61 20 74 6f 20 74 68 65 20 74 68 65 20 72 65 6d  a to the the rem
17e0: 6f 74 65 2e 0a                                   ote..