libfossil  Hex Artifact Content

Artifact 7e1cb9fc7d53c0490b498ae8ae2182c2056bec02:

Wiki page [FossilApp] by stephan 2014-02-11 14:36:06.
0000: 44 20 32 30 31 34 2d 30 32 2d 31 31 54 31 34 3a  D 2014-02-11T14:
0010: 33 36 3a 30 36 2e 32 39 30 0a 4c 20 46 6f 73 73  36:06.290.L Foss
0020: 69 6c 41 70 70 0a 50 20 64 64 31 62 33 64 61 31  ilApp.P dd1b3da1
0030: 31 61 34 66 33 63 63 33 62 30 32 37 64 34 30 61  1a4f3cc3b027d40a
0040: 66 64 32 39 64 35 33 38 62 66 63 65 31 66 65 66  fd29d538bfce1fef
0050: 0a 55 20 73 74 65 70 68 61 6e 0a 57 20 31 33 37  .U stephan.W 137
0060: 38 0a 3c 68 31 3e 66 63 6c 69 20 28 66 6f 72 6d  8.<h1>fcli (form
0070: 65 72 6c 79 20 46 6f 73 73 69 6c 41 70 70 29 3c  erly FossilApp)<
0080: 2f 68 31 3e 0d 0a 0d 0a 3c 74 74 3e 5b 2f 66 69  /h1>....<tt>[/fi
0090: 6e 66 6f 3f 6e 61 6d 65 3d 69 6e 63 6c 75 64 65  nfo?name=include
00a0: 2f 66 6f 73 73 69 6c 2d 73 63 6d 2f 66 6f 73 73  /fossil-scm/foss
00b0: 69 6c 2d 63 6c 69 2e 68 7c 66 63 6c 69 5d 3c 2f  il-cli.h|fcli]</
00c0: 74 74 3e 20 70 72 6f 76 69 64 65 73 20 61 20 73  tt> provides a s
00d0: 6d 61 6c 6c 20 66 72 61 6d 65 77 6f 72 6b 20 66  mall framework f
00e0: 6f 72 20 62 75 69 6c 64 69 6e 67 20 61 70 70 6c  or building appl
00f0: 69 63 61 74 69 6f 6e 73 20 77 68 69 63 68 20 77  ications which w
0100: 6f 72 6b 20 77 69 74 68 20 61 20 73 69 6e 67 6c  ork with a singl
0110: 65 20 63 68 65 63 6b 6f 75 74 20 61 6e 64 2f 6f  e checkout and/o
0120: 72 20 72 65 70 6f 73 69 74 6f 72 79 20 64 61 74  r repository dat
0130: 61 62 61 73 65 2e 20 49 74 20 70 72 6f 76 69 64  abase. It provid
0140: 65 73 20 61 20 6e 75 6d 62 65 72 20 6f 66 20 73  es a number of s
0150: 69 6d 70 6c 69 66 69 63 61 74 69 6f 6e 73 2f 73  implifications/s
0160: 65 72 76 69 63 65 73 20 74 6f 20 61 70 70 6c 69  ervices to appli
0170: 63 61 74 69 6f 6e 73 3a 0d 0a 0d 0a 20 20 20 2a  cations:....   *
0180: 20 20 49 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e    Initialization
0190: 20 61 6e 64 20 63 6c 65 61 6e 75 70 20 6f 66 20   and cleanup of 
01a0: 61 20 73 68 61 72 65 64 20 46 6f 73 73 69 6c 20  a shared Fossil 
01b0: 63 6f 6e 74 65 78 74 20 61 6e 64 20 69 74 73 20  context and its 
01c0: 64 61 74 61 62 61 73 65 73 2e 20 49 74 20 61 75  databases. It au
01d0: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 6f 70 65 6e  tomatically open
01e0: 73 20 61 20 63 68 65 63 6b 6f 75 74 20 75 6e 64  s a checkout und
01f0: 65 72 20 74 68 65 20 63 75 72 72 65 6e 74 20 64  er the current d
0200: 69 72 65 63 74 6f 72 79 20 28 6c 69 6b 65 20 66  irectory (like f
0210: 6f 73 73 69 6c 28 31 29 20 64 6f 65 73 29 20 75  ossil(1) does) u
0220: 6e 6c 65 73 73 20 74 6f 6c 64 20 6e 6f 74 20 74  nless told not t
0230: 6f 20 28 76 69 61 20 74 68 65 20 3c 74 74 3e 2d  o (via the <tt>-
0240: 2d 6e 6f 2d 63 68 65 63 6b 6f 75 74 7c 2d 43 3c  -no-checkout|-C<
0250: 2f 74 74 3e 20 43 4c 49 20 66 6c 61 67 73 20 6f  /tt> CLI flags o
0260: 72 20 65 71 75 69 76 61 6c 65 6e 74 20 43 20 63  r equivalent C c
0270: 6f 64 65 29 2e 0d 0a 20 20 20 2a 20 20 55 6e 69  ode)...   *  Uni
0280: 66 69 65 64 20 43 4c 49 20 61 72 67 75 6d 65 6e  fied CLI argumen
0290: 74 20 68 61 6e 64 6c 69 6e 67 2e 0d 0a 20 20 20  t handling...   
02a0: 2a 20 20 4f 70 74 69 6f 6e 61 6c 20 64 69 73 70  *  Optional disp
02b0: 61 74 63 68 2d 62 79 2d 63 6f 6d 6d 61 6e 64 2d  atch-by-command-
02c0: 6e 61 6d 65 20 73 75 70 70 6f 72 74 2e 0d 0a 20  name support... 
02d0: 20 20 2a 20 20 41 20 62 61 73 69 63 20 68 65 6c    *  A basic hel
02e0: 70 20 73 79 73 74 65 6d 2e 0d 0a 20 20 20 2a 20  p system...   * 
02f0: 20 49 6e 73 74 61 6c 6c 73 20 61 20 6d 65 6d 6f   Installs a memo
0300: 72 79 20 61 6c 6c 6f 63 61 74 6f 72 20 77 68 69  ry allocator whi
0310: 63 68 20 63 72 61 73 68 65 73 20 6f 6e 20 4f 4f  ch crashes on OO
0320: 4d 2c 20 72 65 64 75 63 69 6e 67 20 65 72 72 6f  M, reducing erro
0330: 72 20 63 68 65 63 6b 69 6e 67 20 66 6f 72 20 74  r checking for t
0340: 68 69 73 20 76 65 72 79 20 63 6f 6d 6d 6f 6e 20  his very common 
0350: 75 73 65 20 63 61 73 65 20 77 68 69 63 68 20 76  use case which v
0360: 65 72 79 20 72 61 72 65 6c 79 20 66 61 69 6c 73  ery rarely fails
0370: 20 69 6e 20 70 72 61 63 74 69 63 65 20 28 61 6e   in practice (an
0380: 64 20 69 66 20 69 74 20 64 6f 65 73 2c 20 79 6f  d if it does, yo
0390: 75 20 70 72 6f 62 61 62 6c 79 20 68 61 76 65 20  u probably have 
03a0: 62 69 67 67 65 72 20 70 72 6f 62 6c 65 6d 73 20  bigger problems 
03b0: 74 68 61 6e 20 61 20 63 72 61 73 68 65 64 20 66  than a crashed f
03c0: 6f 73 73 69 6c 20 61 70 70 29 2e 0d 0a 0d 0a 49  ossil app).....I
03d0: 74 20 69 73 20 70 72 69 6d 61 72 69 6c 79 20 69  t is primarily i
03e0: 6e 74 65 6e 64 65 64 20 66 6f 72 20 75 73 65 20  ntended for use 
03f0: 62 79 20 74 65 73 74 2f 64 65 6d 6f 20 61 70 70  by test/demo app
0400: 73 20 62 75 74 20 74 68 65 72 65 27 73 20 6c 69  s but there's li
0410: 74 74 6c 65 20 72 65 61 73 6f 6e 20 69 74 20 63  ttle reason it c
0420: 61 6e 6e 6f 74 20 62 65 20 75 73 65 64 20 77 69  annot be used wi
0430: 74 68 20 22 72 65 61 6c 22 20 61 70 70 73 20 61  th "real" apps a
0440: 73 20 77 65 6c 6c 2c 20 61 6e 64 20 69 74 20 69  s well, and it i
0450: 73 20 67 65 6e 65 72 61 6c 6c 79 20 64 65 73 69  s generally desi
0460: 67 6e 65 64 20 74 6f 20 62 65 20 61 67 6e 6f 73  gned to be agnos
0470: 74 69 63 20 61 73 20 74 6f 20 74 68 65 20 61 63  tic as to the ac
0480: 74 75 61 6c 20 74 79 70 65 20 6f 66 20 61 70 70  tual type of app
0490: 20 69 74 27 73 20 72 75 6e 6e 69 6e 67 20 75 6e   it's running un
04a0: 64 65 72 2e 20 49 74 20 75 73 65 73 20 6c 69 62  der. It uses lib
04b0: 66 6f 73 73 69 6c 27 73 20 6f 75 74 70 75 74 20  fossil's output 
04c0: 6d 65 63 68 61 6e 69 73 6d 20 66 6f 72 20 6f 75  mechanism for ou
04d0: 74 70 75 74 2c 20 73 6f 20 69 74 20 63 6f 75 6c  tput, so it coul
04e0: 64 20 6a 75 73 74 20 61 73 20 65 61 73 69 6c 79  d just as easily
04f0: 20 62 65 20 70 6c 75 67 67 65 64 20 69 6e 20 74   be plugged in t
0500: 6f 20 61 20 47 55 49 20 77 68 69 63 68 20 64 69  o a GUI which di
0510: 72 65 63 74 73 20 74 68 65 20 6f 75 74 70 75 74  rects the output
0520: 20 74 6f 20 61 20 74 65 78 74 20 76 69 65 77 20   to a text view 
0530: 77 69 64 67 65 74 2c 20 73 6f 63 6b 65 74 2c 20  widget, socket, 
0540: 65 78 74 65 72 6e 61 6c 20 61 70 70 6c 69 63 61  external applica
0550: 74 69 6f 6e 20 28 76 69 61 20 61 20 70 69 70 65  tion (via a pipe
0560: 29 2c 20 6f 72 20 73 69 6d 69 6c 61 72 2e 0d 0a  ), or similar...
0570: 0d 0a 53 65 65 20 74 68 65 20 5b 66 2d 74 6f 6f  ..See the [f-too
0580: 6c 73 5d 20 70 61 67 65 20 66 6f 72 20 61 20 6c  ls] page for a l
0590: 69 73 74 20 6f 66 20 61 70 70 73 20 77 68 69 63  ist of apps whic
05a0: 68 20 64 65 6d 6f 6e 73 74 72 61 74 65 20 68 6f  h demonstrate ho
05b0: 77 20 74 6f 20 75 73 65 2f 61 62 75 73 65 20 66  w to use/abuse f
05c0: 63 6c 69 2e 0a 5a 20 65 39 36 62 30 30 32 64 62  cli..Z e96b002db
05d0: 35 39 64 39 61 37 30 33 36 64 65 38 33 39 33 34  59d9a7036de83934
05e0: 62 34 66 63 65 65 64 0a                          b4fceed.