source: trunk/third/rcs/man/rcsfile.5in @ 9047

Revision 9047, 7.8 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r9046, which included commits to RCS files with non-trunk default branches.
Line 
1.\" Set p to 1 if your formatter can handle pic output.
2.if t .nr p 1
3.de Id
4.ds Rv \\$3
5.ds Dt \\$4
6..
7.Id $Id: rcsfile.5in,v 1.1.1.1 1996-10-04 05:52:42 ghudson Exp $
8.ds r \s-1RCS\s0
9.if n .ds - \%--
10.if t .ds - \(em
11.TH RCSFILE 5 \*(Dt GNU
12.SH NAME
13rcsfile \- format of RCS file
14.SH DESCRIPTION
15An \*r file's
16contents are described by the grammar
17below.
18.PP
19The text is free format: space, backspace, tab, newline, vertical
20tab, form feed, and carriage return (collectively,
21.IR "white space")
22have no significance except in strings.
23However, white space cannot appear within an id, num, or sym,
24and an \*r file must end with a newline.
25.PP
26Strings are enclosed by
27.BR @ .
28If a string contains a
29.BR @ ,
30it must be doubled;
31otherwise, strings can contain arbitrary binary data.
32.PP
33The meta syntax uses the following conventions: `|' (bar) separates
34alternatives; `{' and `}' enclose optional phrases; `{' and `}*' enclose
35phrases that can be repeated zero or more times;
36`{' and '}+' enclose phrases that must appear at least once and can be
37repeated;
38Terminal symbols are in
39.BR boldface ;
40nonterminal symbols are in
41.IR italics .
42.LP
43.nr w \w'\f3deltatext\fP '
44.nr y \w'\f3newphrase\fP '
45.if \nw<\ny .nr w \ny
46.nr x \w'\f3branches\fP'
47.nr y \w'{ \f3comment\fP'
48.if \nx<\ny .nr x \ny
49.nr y \w'\f3{ branch\fP'
50.if \nx<\ny .nr x \ny
51.ta \nwu +\w'::=  'u +\nxu+\w'  'u
52.fc #
53.nf
54\f2rcstext\fP   ::=     \f2admin\fP {\f2delta\fP}* \f2desc\fP {\f2deltatext\fP}*
55.LP
56\f2admin\fP     ::=     \f3head\fP      {\f2num\fP}\f3;\fP
57                { \f3branch\fP  {\f2num\fP}\f3;\fP }
58                \f3access\fP    {\f2id\fP}*\f3;\fP
59                \f3symbols\fP   {\f2sym\fP \f3:\fP \f2num\fP}*\f3;\fP
60                \f3locks\fP     {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP  {\f3strict  ;\fP}
61                { \f3comment\fP {\f2string\fP}\f3;\fP }
62                { \f3expand\fP  {\f2string\fP}\f3;\fP }
63                { \f2newphrase\fP }*
64.LP
65\f2delta\fP     ::=     \f2num\fP
66                \f3date\fP      \f2num\fP\f3;\fP
67                \f3author\fP    \f2id\fP\f3;\fP
68                \f3state\fP     {\f2id\fP}\f3;\fP
69                \f3branches\fP  {\f2num\fP}*\f3;\fP
70                \f3next\fP      {\f2num\fP}\f3;\fP
71                { \f2newphrase\fP }*
72.LP
73\f2desc\fP      ::=     \f3desc\fP      \f2string\fP
74.LP
75\f2deltatext\fP ::=     \f2num\fP
76                \f3log\fP       \f2string\fP
77                { \f2newphrase\fP }*
78                \f3text\fP      \f2string\fP
79.LP
80\f2num\fP       ::=     {\f2digit\fP | \f3.\fP}+
81.LP
82\f2digit\fP     ::=     \f30\fP | \f31\fP | \f32\fP | \f33\fP | \f34\fP | \f35\fP | \f36\fP | \f37\fP | \f38\fP | \f39\fP
83.LP
84\f2id\fP        ::=     {\f2num\fP} \f2idchar\fP {\f2idchar\fP | \f2num\fP}*
85.LP
86\f2sym\fP       ::=     {\f2digit\fP}* \f2idchar\fP {\f2idchar\fP | \f2digit\fP}*
87.LP
88\f2idchar\fP    ::=     any visible graphic character except \f2special\fP
89.LP
90\f2special\fP   ::=     \f3$\fP | \f3,\fP | \f3.\fP | \f3:\fP | \f3;\fP | \f3@\fP
91.LP
92\f2string\fP    ::=     \f3@\fP{any character, with \f3@\fP doubled}*\f3@\fP
93.LP
94\f2newphrase\fP ::=     \f2id\fP \f2word\fP* \f3;\fP
95.LP
96\f2word\fP      ::=     \f2id\fP | \f2num\fP | \f2string\fP | \f3:\fP
97.fi
98.PP
99Identifiers are case sensitive.  Keywords are in lower case only.
100The sets of keywords and identifiers can overlap.
101In most environments \*r uses the \s-1ISO\s0 8859/1 encoding:
102visible graphic characters are codes 041\-176 and 240\-377,
103and white space characters are codes 010\-015 and 040.
104.PP
105Dates, which appear after the
106.B date
107keyword, are of the form
108\f2Y\fP\f3.\fP\f2mm\fP\f3.\fP\f2dd\fP\f3.\fP\f2hh\fP\f3.\fP\f2mm\fP\f3.\fP\f2ss\fP,
109where
110.I Y
111is the year,
112.I mm
113the month (01\-12),
114.I dd
115the day (01\-31),
116.I hh
117the hour (00\-23),
118.I mm
119the minute (00\-59),
120and
121.I ss
122the second (00\-60).
123.I Y
124contains just the last two digits of the year
125for years from 1900 through 1999,
126and all the digits of years thereafter.
127Dates use the Gregorian calendar; times use UTC.
128.PP
129The
130.I newphrase
131productions in the grammar are reserved for future extensions
132to the format of \*r files.
133No
134.I newphrase
135will begin with any keyword already in use.
136.PP
137The
138.I delta
139nodes form a tree.  All nodes whose numbers
140consist of a single pair
141(e.g., 2.3, 2.1, 1.3, etc.)
142are on the trunk, and are linked through the
143.B next
144field in order of decreasing numbers.
145The
146.B head
147field in the
148.I admin
149node points to the head of that sequence (i.e., contains
150the highest pair).
151The
152.B branch
153node in the admin node indicates the default
154branch (or revision) for most \*r operations.
155If empty, the default
156branch is the highest branch on the trunk.
157.PP
158All
159.I delta
160nodes whose numbers consist of
161.RI 2 n
162fields
163.RI ( n \(>=2)
164(e.g., 3.1.1.1, 2.1.2.2, etc.)
165are linked as follows.
166All nodes whose first
167.RI 2 n \-1
168number fields are identical are linked through the
169.B next
170field in order of increasing numbers.
171For each such sequence,
172the
173.I delta
174node whose number is identical to the first
175.RI 2 n \-2
176number fields of the deltas on that sequence is called the branchpoint.
177The
178.B branches
179field of a node contains a list of the
180numbers of the first nodes of all sequences for which it is a branchpoint.
181This list is ordered in increasing numbers.
182.LP
183The following diagram shows an example of an \*r file's organization.
184.if !\np \{\
185.nf
186.vs 12
187.ne 36
188.cs 1 20
189.eo
190
191                           Head
192                             |
193                             |
194                             v                        / \
195                         ---------                   /   \
196   / \          / \      |       |      / \         /     \
197  /   \        /   \     |  2.1  |     /   \       /       \
198 /     \      /     \    |       |    /     \     /         \
199/1.2.1.3\    /1.3.1.1\   |       |   /1.2.2.2\   /1.2.2.1.1.1\
200---------    ---------   ---------   ---------   -------------
201    ^            ^           |           ^             ^
202    |            |           |           |             |
203    |            |           v           |             |
204   / \           |       ---------      / \            |
205  /   \          |       \  1.3  /     /   \           |
206 /     \         ---------\     /     /     \-----------
207/1.2.1.1\                  \   /     /1.2.2.1\
208---------                   \ /      ---------
209    ^                        |           ^
210    |                        |           |
211    |                        v           |
212    |                    ---------       |
213    |                    \  1.2  /       |
214    ----------------------\     /---------
215                           \   /
216                            \ /
217                             |
218                             |
219                             v
220                         ---------
221                         \  1.1  /
222                          \     /
223                           \   /
224                            \ /
225
226.ec
227.cs 1
228.vs
229.fi
230.\}
231.if \np \{\
232.PS
233define triangle_down '
234        box invis $1 ""
235        { line from last box.s to last box.nw to last box.ne to last box.s }
236'
237define triangle_up '
238        box invis "" $1
239        { line from last box.n to last box.sw to last box.se to last box.n }
240'
241        down
242        box invis "Head" height boxht/2
243        arrow
244        box "2.1"
245        arrow
246        triangle_down("1.3")
247        {
248                spline -> from 1/2 between last box.nw and last box.s left then up
249                triangle_up("1.3.1.1")
250        }
251        arrow
252B12:    triangle_down("1.2")
253        {
254                spline -> from 1/2 between B12.nw and B12.s left then left then left then up
255                triangle_up("1.2.1.1")
256                arrow
257                triangle_up("1.2.1.3")
258        }
259        {
260                spline -> from 1/2 between B12.ne and B12.s right then up
261                triangle_up("1.2.2.1")
262                {
263                        spline -> from 1/2 between last box.se and last box.n right then up then up
264                        triangle_up("\s-21.2.2.1.1.1\s0")
265                }
266                arrow
267                triangle_up("1.2.2.2")
268        }
269        arrow
270        triangle_down("1.1")
271.PE
272.\}
273.PP
274.SH IDENTIFICATION
275.de VL
276\\$2
277..
278Author: Walter F. Tichy,
279Purdue University, West Lafayette, IN, 47907.
280.br
281Manual Page Revision: \*(Rv; Release Date: \*(Dt.
282.br
283Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
284.br
285Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
286.SH SEE ALSO
287rcsintro(1), ci(1), co(1), ident(1), rcs(1), rcsclean(1), rcsdiff(1),
288rcsmerge(1), rlog(1)
289.br
290Walter F. Tichy,
291\*r\*-A System for Version Control,
292.I "Software\*-Practice & Experience"
293.BR 15 ,
2947 (July 1985), 637-654.
Note: See TracBrowser for help on using the repository browser.