5 .Id $Id: rcsfile.5,v 5.1 1991/08/19 03:13:55 eggert Exp $
9 .TH RCSFILE 5 \*(Dt GNU
11 rcsfile \- format of RCS file
14 contents are described by the grammar
17 The text is free format: space, backspace, tab, newline, vertical
18 tab, form feed, and carriage return (collectively,
20 have no significance except in strings.
21 However, an \*r file must end in a newline character.
23 Strings are enclosed by
25 If a string contains a
28 otherwise, strings may contain arbitrary binary data.
30 The meta syntax uses the following conventions: `|' (bar) separates
31 alternatives; `{' and `}' enclose optional phrases; `{' and `}*' enclose
32 phrases that may be repeated zero or more times;
33 `{' and '}+' enclose phrases that must appear at least once and may be
35 Terminal symbols are in
37 nonterminal symbols are in
40 .nr x \w'\f3branches\fP'
41 .nr y \w'{ \f3comment\fP'
43 .nr y \w'\f3{ branch\fP'
45 .ta \w'\f2deltatext\fP 'u +\w'::= 'u +\nxu+\w' 'u
48 \f2rcstext\fP ::= \f2admin\fP {\f2delta\fP}* \f2desc\fP {\f2deltatext\fP}*
50 \f2admin\fP ::= \f3head\fP {\f2num\fP}\f3;\fP
51 { \f3branch\fP {\f2num\fP}\f3;\fP }
52 \f3access\fP {\f2id\fP}*\f3;\fP
53 \f3symbols\fP {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP
54 \f3locks\fP {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP {\f3strict ;\fP}
55 { \f3comment\fP {\f2string\fP}\f3;\fP }
56 { \f3expand\fP {\f2string\fP}\f3;\fP }
59 \f2delta\fP ::= \f2num\fP
60 \f3date\fP \f2num\fP\f3;\fP
61 \f3author\fP \f2id\fP\f3;\fP
62 \f3state\fP {\f2id\fP}\f3;\fP
63 \f3branches\fP {\f2num\fP}*\f3;\fP
64 \f3next\fP {\f2num\fP}\f3;\fP
67 \f2desc\fP ::= \f3desc\fP \f2string\fP
69 \f2deltatext\fP ::= \f2num\fP
70 \f3log\fP \f2string\fP
72 \f3text\fP \f2string\fP
74 \f2num\fP ::= {\f2digit\fP{\f3.\fP}}+
76 \f2digit\fP ::= \f30\fP | \f31\fP | .\|.\|. | \f39\fP
78 \f2id\fP ::= \f2letter\fP{\f2idchar\fP}*
80 \f2letter\fP ::= any letter
82 \f2idchar\fP ::= any visible graphic character except \f2special\fP
84 \f2special\fP ::= \f3$\fP | \f3,\fP | \f3.\fP | \f3:\fP | \f3;\fP | \f3@\fP
86 \f2string\fP ::= \f3@\fP{any character, with \f3@\fP doubled}*\f3@\fP
88 \f2newphrase\fP ::= \f2id\fP \f2word\fP* \f3;\fP
90 \f2word\fP ::= \f2id\fP | \f2num\fP | \f2string\fP | \f3:\fP
93 Identifiers are case sensitive. Keywords are in lower case only.
94 The sets of keywords and identifiers may overlap.
95 In most environments RCS uses the ISO 8859/1 encoding:
96 letters are octal codes 101\-132, 141\-172, 300\-326, 330\-366 and 370-377,
97 visible graphic characters are codes 041\-176 and 240\-377,
98 and white space characters are codes 010\-015 and 040.
102 productions in the grammar are reserved for future extensions
103 to the format of \*r files.
106 will begin with any keyword already in use.
110 nodes form a tree. All nodes whose numbers
111 consist of a single pair
112 (e.g., 2.3, 2.1, 1.3, etc.)
113 are on the trunk, and are linked through the
115 field in order of decreasing numbers.
120 node points to the head of that sequence (i.e., contains
124 node in the admin node indicates the default
125 branch (or revision) for most \*r operations.
126 If empty, the default
127 branch is the highest branch on the trunk.
131 nodes whose numbers consist of
135 (e.g., 3.1.1.1, 2.1.2.2, etc.)
136 are linked as follows.
137 All nodes whose first
139 number fields are identical are linked through the
141 field in order of increasing numbers.
142 For each such sequence,
145 node whose number is identical to the first
147 number fields of the deltas on that sequence is called the branchpoint.
150 field of a node contains a list of the
151 numbers of the first nodes of all sequences for which it is a branchpoint.
152 This list is ordered in increasing numbers.
168 / \ / \ | 2.1 | / \ / \
170 /1.2.1.3\ /1.3.1.1\ | | /1.2.2.2\ /1.2.2.1.1.1\
171 --------- --------- --------- --------- -------------
175 / \ | --------- / \ |
177 / \ ---------\ / / \-----------
178 /1.2.1.1\ \ / /1.2.2.1\
179 --------- \ / ---------
185 ----------------------\ /---------
201 Fig. 1: A revision tree
209 Author: Walter F. Tichy,
210 Purdue University, West Lafayette, IN, 47907.
212 Revision Number: \*(Rv; Release Date: \*(Dt.
214 Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
216 Copyright \(co 1990, 1991 by Paul Eggert.
218 ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsmerge(1), rlog(1),
221 \*r\*-A System for Version Control,
222 .I "Software\*-Practice & Experience"
224 7 (July 1985), 637-654.