1RCSFILE(5)                    File Formats Manual                   RCSFILE(5)
2
3
4

NAME

6       rcsfile - format of RCS file
7

DESCRIPTION

9       An RCS file's contents are described by the grammar below.
10
11       The  text is free format: space, backspace, tab, newline, vertical tab,
12       form feed, and carriage return (collectively, white space) have no sig‐
13       nificance except in strings.  However, white space cannot appear within
14       an id, num, or sym, and an RCS file must end with a newline.
15
16       Strings are enclosed by @.  If a string contains a @, it must  be  dou‐
17       bled; otherwise, strings can contain arbitrary binary data.
18
19       The  meta  syntax  uses  the following conventions: `|' (bar) separates
20       alternatives; `{' and  `}'  enclose  optional  phrases;  `{'  and  `}*'
21       enclose  phrases  that can be repeated zero or more times; `{' and '}+'
22       enclose phrases that must appear at least once  and  can  be  repeated;
23       Terminal symbols are in boldface; nonterminal symbols are in italics.
24
25       rcstext   ::=  admin {delta}* desc {deltatext}*
26
27       admin     ::=  head       {num};
28                      { branch   {num}; }
29                      access     {id}*;
30                      symbols    {sym : num}*;
31                      locks      {id : num}*;  {strict  ;}
32                      { comment  {string}; }
33                      { expand   {string}; }
34                      { newphrase }*
35
36       delta     ::=  num
37                      date       num;
38                      author     id;
39                      state      {id};
40                      branches   {num}*;
41                      next       {num};
42                      { newphrase }*
43
44       desc      ::=  desc       string
45
46       deltatext ::=  num
47                      log        string
48                      { newphrase }*
49                      text       string
50
51       num       ::=  {digit | .}+
52
53       digit     ::=  0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
54
55       id        ::=  {num} idchar {idchar | num}*
56
57       sym       ::=  {digit}* idchar {idchar | digit}*
58
59       idchar    ::=  any visible graphic character except special
60
61       special   ::=  $ | , | . | : | ; | @
62
63       string    ::=  @{any character, with @ doubled}*@
64
65       newphrase ::=  id word* ;
66
67       word      ::=  id | num | string | :
68
69       Identifiers  are case sensitive.  Keywords are in lower case only.  The
70       sets of keywords and identifiers can overlap.  In most environments RCS
71       uses  the  ISO  8859/1  encoding:  visible graphic characters are codes
72       041-176 and 240-377, and white space characters are codes  010-015  and
73       040.
74
75       Dates,   which   appear  after  the  date  keyword,  are  of  the  form
76       Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day
77       (01-31),  hh the hour (00-23), mm the minute (00-59), and ss the second
78       (00-60).  Y contains just the last two digits of  the  year  for  years
79       from  1900 through 1999, and all the digits of years thereafter.  Dates
80       use the Gregorian calendar; times use UTC.
81
82       The newphrase productions in the grammar are reserved for future exten‐
83       sions  to  the  format  of RCS files.  No newphrase will begin with any
84       keyword already in use.
85
86       The delta nodes form a tree.  All nodes whose numbers consist of a sin‐
87       gle  pair (e.g., 2.3, 2.1, 1.3, etc.)  are on the trunk, and are linked
88       through the next field in order of decreasing numbers.  The head  field
89       in  the  admin node points to the head of that sequence (i.e., contains
90       the highest pair).  The branch node in the  admin  node  indicates  the
91       default  branch  (or  revision) for most RCS operations.  If empty, the
92       default branch is the highest branch on the trunk.
93
94       All delta nodes  whose  numbers  consist  of  2n  fields  (n≥2)  (e.g.,
95       3.1.1.1,  2.1.2.2, etc.)  are linked as follows.  All nodes whose first
96       2n-1 number fields are identical are linked through the next  field  in
97       order  of  increasing  numbers.  For each such sequence, the delta node
98       whose number is identical to the first 2n-2 number fields of the deltas
99       on  that  sequence  is called the branchpoint.  The branches field of a
100       node contains a list of the numbers of the first nodes of all sequences
101       for which it is a branchpoint.  This list is ordered in increasing num‐
102       bers.
103
104       The following diagram shows an example of an RCS file's organization.
105
106                                  Head
107                                    |
108                                    |
109                                    v                        / \
110                                ---------                   /   \
111          / \          / \      |       |      / \         /     \
112         /   \        /   \     |  2.1  |     /   \       /       \
113        /     \      /     \    |       |    /     \     /         \
114       /1.2.1.3\    /1.3.1.1\   |       |   /1.2.2.2\   /1.2.2.1.1.1\
115       ---------    ---------   ---------   ---------   -------------
116           ^            ^           |           ^             ^
117           |            |           |           |             |
118           |            |           v           |             |
119          / \           |       ---------      / \            |
120         /   \          |       \  1.3  /     /   \           |
121        /     \         ---------\     /     /     \-----------
122       /1.2.1.1\                  \   /     /1.2.2.1\
123       ---------                   \ /      ---------
124           ^                        |           ^
125           |                        |           |
126           |                        v           |
127           |                    ---------       |
128           |                    \  1.2  /       |
129           ----------------------\     /---------
130                                  \   /
131                                   \ /
132                                    |
133                                    |
134                                    v
135                                ---------
136                                \  1.1  /
137                                 \     /
138                                  \   /
139                                   \ /
140
141

IDENTIFICATION

143       Author: Walter F. Tichy, Purdue University, West Lafayette, IN, 47907.
144       Manual Page Revision: 5.6; Release Date: 1995/06/05.
145       Copyright © 1982, 1988, 1989 Walter F. Tichy.
146       Copyright © 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
147

SEE ALSO

149       rcsintro(1), ci(1), co(1), ident(1), rcs(1),  rcsclean(1),  rcsdiff(1),
150       rcsmerge(1), rlog(1)
151       Walter  F. Tichy, RCS--A System for Version Control, Software--Practice
152       & Experience 15, 7 (July 1985), 637-654.
153
154
155
156GNU                               1995/06/05                        RCSFILE(5)
Impressum