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

NAME

6       rcsfile - RCS file format
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 al‐
20       ternatives; `{' and `}' enclose optional phrases; `{' and `}*'  enclose
21       phrases  that  can be repeated zero or more times; `{' and '}+' enclose
22       phrases that must appear at least once and can  be  repeated;  Terminal
23       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                      { integrity{intstring}; }
33                      { comment  {string}; }
34                      { expand   {string}; }
35
36       delta     ::=  num
37                      date       num;
38                      author     id;
39                      state      {id};
40                      branches   {num}*;
41                      next       {num};
42                      { commitid sym; }
43
44       desc      ::=  desc       string
45
46       deltatext ::=  num
47                      log        string
48                      text       string
49
50       num       ::=  {digit | .}+
51
52       digit     ::=  0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
53
54       id        ::=  {idchar | .}+
55
56       sym       ::=  {idchar}+
57
58       idchar    ::=  any visible graphic character except special
59
60       special   ::=  $ | , | . | : | ; | @
61
62       string    ::=  @{any character, with @ doubled}*@
63
64       word      ::=  id | num | string | :
65
66       intchar   ::=  any character, except @
67
68       thirdp    ::=  ^L {intchar}*
69
70       intstring ::=  @ {intchar}* {thirdp}* @
71
72       In  releases  prior  to 5.8 (2011-08-30), the grammar included the new‐
73       phrase production and used it in the admin, delta and deltatext produc‐
74       tions.   This  allowed third-party programs to interoperate with RCS by
75       storing opaque (to RCS) data in the file.  As of 5.8, in  the  name  of
76       progress  (towards  more  systematic  file integrity support), the only
77       area reserved for third-party interop is in the (string) value  of  the
78       integrity field, specifically after the first ^L (formfeed).  A further
79       restriction (for all programs) is that the  integrity  value  must  not
80       contain @.
81
82       Identifiers  are case sensitive.  Keywords are in lower case only.  The
83       sets of keywords and identifiers can overlap.  In most environments RCS
84       uses  the  ISO  8859/1  encoding:  visible graphic characters are codes
85       041-176 and 240-377, and white space characters are codes  010-015  and
86       040.
87
88       Dates,   which   appear  after  the  date  keyword,  are  of  the  form
89       Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day
90       (01-31),  hh the hour (00-23), mm the minute (00-59), and ss the second
91       (00-60).  Y contains just the last two digits of  the  year  for  years
92       from  1900 through 1999, and all the digits of years thereafter.  Dates
93       use the Gregorian calendar; times use UTC.
94
95       The delta nodes form a tree.  All nodes whose numbers consist of a sin‐
96       gle  pair (e.g., 2.3, 2.1, 1.3, etc.)  are on the trunk, and are linked
97       through the next field in order of decreasing numbers.  The head  field
98       in  the  admin node points to the head of that sequence (i.e., contains
99       the highest pair).  The branch node in the admin node indicates the de‐
100       fault  branch (or revision) for most RCS operations.  If empty, the de‐
101       fault branch is the highest branch on the trunk.
102
103       All delta nodes  whose  numbers  consist  of  2n  fields  (n≥2)  (e.g.,
104       3.1.1.1,  2.1.2.2, etc.)  are linked as follows.  All nodes whose first
105       2n-1 number fields are identical are linked through the next  field  in
106       order  of  increasing  numbers.  For each such sequence, the delta node
107       whose number is identical to the first 2n-2 number fields of the deltas
108       on  that  sequence  is called the branchpoint.  The branches field of a
109       node contains a list of the numbers of the first nodes of all sequences
110       for which it is a branchpoint.  This list is ordered in increasing num‐
111       bers.
112
113       The following diagram shows an example of an RCS file's organization.
114
115                                  Head
116                                    |
117                                    |
118                                    v                        / \
119                                ---------                   /   \
120          / \          / \      |       |      / \         /     \
121         /   \        /   \     |  2.1  |     /   \       /       \
122        /     \      /     \    |       |    /     \     /         \
123       /1.2.1.3\    /1.3.1.1\   |       |   /1.2.2.2\   /1.2.2.1.1.1\
124       ---------    ---------   ---------   ---------   -------------
125           ^            ^           |           ^             ^
126           |            |           |           |             |
127           |            |           v           |             |
128          / \           |       ---------      / \            |
129         /   \          |       \  1.3  /     /   \           |
130        /     \         ---------\     /     /     \-----------
131       /1.2.1.1\      1.3.1       \   /     /1.2.2.1\     1.2.2.1.1
132       ---------                   \ /      ---------
133           ^                        |           ^
134           |                        |           |
135           |                        v           |
136           |                    ---------       |
137           |                    \  1.2  /       |
138           ----------------------\     /---------
139         1.2.1                    \   /       1.2.2
140                                   \ /
141                                    |
142                                    |
143                                    v
144                                ---------
145                                \  1.1  /
146                                 \     /
147                                  \   /
148                                   \ /
149
150

IDENTIFICATION

152       Author: Walter F. Tichy.
153       Manual Page Revision: 5.10.1; Release Date: 2022-11-07.
154       Copyright © 2010-2022 Thien-Thi Nguyen.
155       Copyright © 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
156       Copyright © 1982, 1988, 1989 Walter F. Tichy.
157

SEE ALSO

159       ci(1), co(1), ident(1), rcs(1), rcsclean(1),  rcsdiff(1),  rcsmerge(1),
160       rlog(1).
161
162       Walter  F. Tichy, RCS--A System for Version Control, Software--Practice
163       & Experience 15, 7 (July 1985), 637-654.
164
165       The full documentation for RCS is maintained as a Texinfo  manual.   If
166       the  info(1)  and RCS programs are properly installed at your site, the
167       command
168
169              info rcs
170
171       should give you access to the complete manual.  Additionally,  the  RCS
172       homepage:
173
174              http://www.gnu.org/software/rcs/
175
176       has news and links to the latest release, development site, etc.
177
178
179
180GNU RCS 5.10.1                    2022-11-07                        RCSFILE(5)
Impressum