home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rcstxi11.zip / rcstexi.110 / rcsfile.tex < prev    next >
Text File  |  1997-03-30  |  9KB  |  212 lines

  1. @c
  2. @c ================================================================================
  3. @c                               Edition 1.1
  4. @c                      of the Texinfo-manuals for the
  5. @c                      (R)evision (C)ontrol (S)ystem
  6. @c                               Version 5.7
  7. @c
  8. @c                  (c) 1982, 1988, 1989 Walter F. Tichy.
  9. @c           (c) 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
  10. @c        (c) 1996, 1997 Karl Heinz Marbaise (doing converting job)
  11. @c ================================================================================
  12. @c
  13. @c Discription:
  14. @c    discription about the format of RCS
  15. @c    archives.
  16. @c
  17. @c Authors:
  18. @c    Walter Tichy,
  19. @c    Paul Eggert,
  20. @c    Karl Heinz Marbaise (doing converting job)
  21. @c
  22. @c e-mail:
  23. @c    Internet: KHMarbaise@p69.ks.fido.de
  24. @c    Fido-net: 2:2452/117.69
  25. @c
  26. @c Bugs, question:
  27. @c    to above e-mail adress.
  28. @c
  29. @c License:
  30. @c    The "Texinfo Edition of the RCS V5.7 manuals" are free
  31. @c    software; you can redistribute it and/or modify it under
  32. @c    the terms of the GNU General Public License as published
  33. @c    by the Free Software Foundation; either version 2, or (at
  34. @c    your option) any later version.
  35. @c
  36. @c    The "Texinfo Edition of the RCS V5.7 manuals" are distributed
  37. @c    in the hope that they will be useful, but WITHOUT ANY WARRANTY;
  38. @c    without even the implied warranty of MERCHANTABILITY or
  39. @c    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
  40. @c    License for more details.
  41. @c
  42. @c    You should have received a copy of the GNU General Public License
  43. @c    along with the "Texinfo Edition of the RCS V5.7 manuals"; see the
  44. @c    file COPYING. If not, write to the:
  45. @c    Free Software Foundation,
  46. @c    59 Temple Place - Suite 330,
  47. @c    Boston, MA 02111-1307, USA.
  48. @c
  49. @c    See \rcstxi.110\COPYING for details.
  50. @c
  51. @c ================================================================================
  52. @c
  53. @c
  54. @c $Id: RCSFILE.TEX 1.2 1997/03/30 22:53:16 KHM Exp $
  55. @c
  56. @c =============================================================================
  57. @c rcsfile - Format of RCS file
  58. @c -----------------------------------------------------------------------------
  59. @node AppendixA,AppendixB,merge,Top
  60. @appendix Format of RCS file
  61. @cindex rcsfile
  62. @cindex Format of RCS files.
  63. @cindex Format
  64. @ifinfo
  65. @menu
  66. * rcsfileIntro::        Discription of the RCS file format.
  67. * rcsfileExample::      Example of a revision tree.
  68. @end menu
  69. @end ifinfo
  70. @c =============================================================================
  71. @c rcsfile - format of RCS file
  72. @c     Description
  73. @c -----------------------------------------------------------------------------
  74. @node rcsfileIntro,rcsfileExample,,AppendixA
  75. @appendixsec Description
  76. An RCS file's contents are described by the grammar below.
  77. The text is free format: space, backspace,  tab,  newline,
  78. vertical  tab,  form  feed,  and  carriage return (collectively,
  79. @code{white space})  have  no  significance  except  in
  80. strings.  However, white space cannot appear within an id,
  81. num, or sym, and an RCS file must end with a newline.
  82.  
  83. Strings are enclosed by @@.  If a string contains a  @@,  it
  84. must  be doubled; otherwise, strings can contain arbitrary
  85. binary data.
  86.  
  87. The meta syntax uses the following conventions: `|'  (bar)
  88. separates  alternatives;  `@{'  and  `@}'  enclose  optional
  89. phrases; `@{' and `@}*' enclose phrases that can be repeated
  90. zero or more times; `@{' and '@}+' enclose phrases that must
  91. appear at least once and can be repeated; Terminal symbols
  92. are in boldface; nonterminal symbols are in @code{italic}.
  93.  
  94.  
  95. @example
  96. @group
  97. rcstext    ::=  admin @{delta@}* desc @{deltatext@}*
  98. admin      ::=  @code{head} @{num@};
  99.                 @{ branch   @{num@}; @}
  100.                 @code{access} @{id@}*;
  101.                 @code{symbols} @{sym : num@}*;
  102.                 @code{locks} @{id : num@}*;  @{@code{strict}  ;@}
  103.                 @{ @code{comment}  @{string@}; @}
  104.                 @{ @code{expand}   @{string@}; @}
  105.                 @{ newphrase @}*
  106. delta      ::=  num
  107.                 @code{date} num;
  108.                 @code{author} id;
  109.                 @code{state} @{id@};
  110.                 @code{branches} @{num@}*;
  111.                 @code{next} @{num@};
  112.                 @{ newphrase @}*
  113. desc       ::=  @code{desc} string
  114. deltatext  ::=  num
  115.                 @code{log} string
  116.                 @{ newphrase @}*
  117.                 @code{text} string
  118. num        ::=  @{digit | .@}+
  119. digit      ::=  0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  120. id         ::=  @{num@} idchar @{idchar | num @}*
  121. sym        ::=  @{digit@}* idchar @{idchar | digit @}*
  122. idchar     ::=  any visible graphic character except @code{special}
  123. special    ::=  $ | , | . | : | ; | @@
  124. string     ::=  @@@{any character, with @@ doubled@}*@@
  125. newphrase  ::=  id word* ;
  126. word       ::=  id | num | string | :
  127. @end group
  128. @end example
  129.  
  130. Identifiers  are  case  sensitive. Keywords are in lower case
  131. only.  The sets of keywords and identifiers can overlap. In most
  132. environments RCS uses the ISO 8859/1 encoding: visible graphic
  133. characters  are  codes  041-176  and 240-377,  and white space
  134. characters are codes 010-015 and 040.
  135.  
  136. Dates, which appear after the date  keyword,  are  of  the form
  137. @code{Y.mm.dd.hh.mm.ss},  where @code{Y} is the year, @code{mm}
  138. the month (01-12), @code{dd} the day (01-31), @code{hh} the hour
  139. (00-23), @code{mm} the minute  (00-59),  and  @code{ss} the
  140. second (00-60). @code{Y} contains just the last two digits of the
  141. year for years  from 1900 through  1999,  and  all  the  digits
  142. of years thereafter. Dates use the Gregorian calendar; times use
  143. UTC.
  144.  
  145. The @code{newphrase} productions in the grammar are reserved
  146. for future  extensions  to  the  format of RCS files.  No
  147. @code{newphrase} will begin with any keyword already in use.
  148.  
  149. The @code{delta} nodes form a tree.  All nodes whose numbers consist
  150. of a single pair (e.g., 2.3, 2.1, 1.3, etc.)  are on
  151. the trunk, and are linked through the next field in  order
  152. of  decreasing  numbers.  The head field in the @code{admin} node
  153. points to the head of that sequence  (i.e.,  contains  the
  154. highest  pair).   The  branch node in the admin node indicates
  155. the default branch (or revision) for most RCS operations.
  156. If empty, the default branch is the highest branch
  157. on the trunk.
  158.  
  159. All @code{delta} nodes whose numbers consist of 2@code{n} fields
  160. (@code{n}>=2) (e.g.,  3.1.1.1,  2.1.2.2,  etc.) are linked as follows.
  161. All nodes whose first 2@code{n}-1 number fields are identical are
  162. linked  through the next field in order of increasing numbers.
  163. For each such sequence, the @code{delta} node whose number
  164. is identical to the first 2@code{n}-2 number fields of the deltas
  165. on that sequence is called the branchpoint.  The  branches
  166. field  of  a  node  contains  a list of the numbers of the
  167. first nodes of all sequences for which  it  is  a  branchpoint.
  168. This list is ordered in increasing numbers.
  169. @c =============================================================================
  170. @c rcsfile - format of RCS file
  171. @c     Example of revision Tree
  172. @c -----------------------------------------------------------------------------
  173. @node rcsfileExample,,rcsfileIntro,AppendixA
  174. @page
  175. @appendixsec Example Revision tree
  176. The  following  diagram  shows an example of an RCS file's
  177. organization.
  178. @example
  179. @group
  180.                            Head
  181.                              |
  182.                              v                        / \
  183.                          ---------                   /   \
  184.    / \          / \      |       |      / \         /     \
  185.   /   \        /   \     |  2.1  |     /   \       /       \
  186.  /     \      /     \    |       |    /     \     /         \
  187. /1.2.1.3\    /1.3.1.1\   |       |   /1.2.2.2\   /1.2.2.1.1.1\
  188. ---------    ---------   ---------   ---------   -------------
  189.     ^            ^           |           ^             ^
  190.     |            |           v           |             |
  191.    / \           |       ---------      / \            |
  192.   /   \          |       \  1.3  /     /   \           |
  193.  /     \         ---------\     /     /     \-----------
  194. /1.2.1.1\                  \   /     /1.2.2.1\
  195. ---------                   \ /      ---------
  196.     ^                        |           ^
  197.     |                        v           |
  198.     |                    ---------       |
  199.     |                    \  1.2  /       |
  200.     ----------------------\     /---------
  201.                            \   /
  202.                             \ /
  203.                              |
  204.                              v
  205.                          ---------
  206.                          \  1.1  /
  207.                           \     /
  208.                            \   /
  209.                             \ /
  210. @end group
  211. @end example
  212.