Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / rcs / rcs / rcsfile.5
1 .lf 1 ./rcsfile.5in
2 .\" Set p to 1 if your formatter can handle pic output.
3 .if t .nr p 1
4 .de Id
5 .ds Rv \\$3
6 .ds Dt \\$4
7 ..
8 .Id $FreeBSD: src/gnu/usr.bin/rcs/rcs/rcsfile.5,v 1.5.2.1 2001/07/22 11:01:34 dd Exp $
9 .Id $DragonFly: src/gnu/usr.bin/rcs/rcs/rcsfile.5,v 1.2 2003/06/17 04:25:47 dillon Exp $
10 .ds r \s-1RCS\s0
11 .if n .ds - \%--
12 .if t .ds - \(em
13 .TH RCSFILE 5 \*(Dt GNU
14 .SH NAME
15 rcsfile \- format of RCS file
16 .SH DESCRIPTION
17 An \*r file's
18 contents are described by the grammar
19 below.
20 .PP
21 The text is free format: space, backspace, tab, newline, vertical
22 tab, form feed, and carriage return (collectively,
23 .IR "white space")
24 have no significance except in strings.
25 However, white space cannot appear within an id, num, or sym,
26 and an \*r file must end with a newline.
27 .PP
28 Strings are enclosed by
29 .BR @ .
30 If a string contains a
31 .BR @ ,
32 it must be doubled;
33 otherwise, strings can contain arbitrary binary data.
34 .PP
35 The meta syntax uses the following conventions: `|' (bar) separates
36 alternatives; `{' and `}' enclose optional phrases; `{' and `}*' enclose
37 phrases that can be repeated zero or more times;
38 `{' and '}+' enclose phrases that must appear at least once and can be
39 repeated;
40 Terminal symbols are in
41 .BR boldface ;
42 nonterminal symbols are in
43 .IR italics .
44 .LP
45 .nr w \w'\f3deltatext\fP '
46 .nr y \w'\f3newphrase\fP '
47 .if \nw<\ny .nr w \ny
48 .nr x \w'\f3branches\fP'
49 .nr y \w'{ \f3comment\fP'
50 .if \nx<\ny .nr x \ny
51 .nr y \w'\f3{ branch\fP'
52 .if \nx<\ny .nr x \ny
53 .ta \nwu +\w'::=  'u +\nxu+\w'  'u
54 .fc #
55 .nf
56 \f2rcstext\fP   ::=     \f2admin\fP {\f2delta\fP}* \f2desc\fP {\f2deltatext\fP}*
57 .LP
58 \f2admin\fP     ::=     \f3head\fP      {\f2num\fP}\f3;\fP
59                 { \f3branch\fP  {\f2num\fP}\f3;\fP }
60                 \f3access\fP    {\f2id\fP}*\f3;\fP
61                 \f3symbols\fP   {\f2sym\fP \f3:\fP \f2num\fP}*\f3;\fP
62                 \f3locks\fP     {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP  {\f3strict  ;\fP}
63                 { \f3comment\fP {\f2string\fP}\f3;\fP }
64                 { \f3expand\fP  {\f2string\fP}\f3;\fP }
65                 { \f2newphrase\fP }*
66 .LP
67 \f2delta\fP     ::=     \f2num\fP
68                 \f3date\fP      \f2num\fP\f3;\fP
69                 \f3author\fP    \f2id\fP\f3;\fP
70                 \f3state\fP     {\f2id\fP}\f3;\fP
71                 \f3branches\fP  {\f2num\fP}*\f3;\fP
72                 \f3next\fP      {\f2num\fP}\f3;\fP
73                 { \f2newphrase\fP }*
74 .LP
75 \f2desc\fP      ::=     \f3desc\fP      \f2string\fP
76 .LP
77 \f2deltatext\fP ::=     \f2num\fP
78                 \f3log\fP       \f2string\fP
79                 { \f2newphrase\fP }*
80                 \f3text\fP      \f2string\fP
81 .LP
82 \f2num\fP       ::=     {\f2digit\fP | \f3.\fP}+
83 .LP
84 \f2digit\fP     ::=     \f30\fP | \f31\fP | \f32\fP | \f33\fP | \f34\fP | \f35\fP | \f36\fP | \f37\fP | \f38\fP | \f39\fP
85 .LP
86 \f2id\fP        ::=     {\f2num\fP} \f2idchar\fP {\f2idchar\fP | \f2num\fP}*
87 .LP
88 \f2sym\fP       ::=     {\f2digit\fP}* \f2idchar\fP {\f2idchar\fP | \f2digit\fP}*
89 .LP
90 \f2idchar\fP    ::=     any visible graphic character except \f2special\fP
91 .LP
92 \f2special\fP   ::=     \f3$\fP | \f3,\fP | \f3.\fP | \f3:\fP | \f3;\fP | \f3@\fP
93 .LP
94 \f2string\fP    ::=     \f3@\fP{any character, with \f3@\fP doubled}*\f3@\fP
95 .LP
96 \f2newphrase\fP ::=     \f2id\fP \f2word\fP* \f3;\fP
97 .LP
98 \f2word\fP      ::=     \f2id\fP | \f2num\fP | \f2string\fP | \f3:\fP
99 .fi
100 .PP
101 Identifiers are case sensitive.  Keywords are in lower case only.
102 The sets of keywords and identifiers can overlap.
103 In most environments \*r uses the \s-1ISO\s0 8859/1 encoding:
104 visible graphic characters are codes 041\-176 and 240\-377,
105 and white space characters are codes 010\-015 and 040.
106 .PP
107 Dates, which appear after the
108 .B date
109 keyword, are of the form
110 \f2Y\fP\f3.\fP\f2mm\fP\f3.\fP\f2dd\fP\f3.\fP\f2hh\fP\f3.\fP\f2mm\fP\f3.\fP\f2ss\fP,
111 where
112 .I Y
113 is the year,
114 .I mm
115 the month (01\-12),
116 .I dd
117 the day (01\-31),
118 .I hh
119 the hour (00\-23),
120 .I mm
121 the minute (00\-59),
122 and
123 .I ss
124 the second (00\-60).
125 .I Y
126 contains just the last two digits of the year
127 for years from 1900 through 1999,
128 and all the digits of years thereafter.
129 Dates use the Gregorian calendar; times use UTC.
130 .PP
131 The
132 .I newphrase
133 productions in the grammar are reserved for future extensions
134 to the format of \*r files.
135 No
136 .I newphrase
137 will begin with any keyword already in use.
138 .PP
139 The
140 .I delta
141 nodes form a tree.  All nodes whose numbers
142 consist of a single pair
143 (e.g., 2.3, 2.1, 1.3, etc.)
144 are on the trunk, and are linked through the
145 .B next
146 field in order of decreasing numbers.
147 The
148 .B head
149 field in the
150 .I admin
151 node points to the head of that sequence (i.e., contains
152 the highest pair).
153 The
154 .B branch
155 node in the admin node indicates the default
156 branch (or revision) for most \*r operations.
157 If empty, the default
158 branch is the highest branch on the trunk.
159 .PP
160 All
161 .I delta
162 nodes whose numbers consist of
163 .RI 2 n
164 fields
165 .RI ( n \(>=2)
166 (e.g., 3.1.1.1, 2.1.2.2, etc.)
167 are linked as follows.
168 All nodes whose first
169 .RI 2 n \-1
170 number fields are identical are linked through the
171 .B next
172 field in order of increasing numbers.
173 For each such sequence,
174 the
175 .I delta
176 node whose number is identical to the first
177 .RI 2 n \-2
178 number fields of the deltas on that sequence is called the branchpoint.
179 The
180 .B branches
181 field of a node contains a list of the
182 numbers of the first nodes of all sequences for which it is a branchpoint.
183 This list is ordered in increasing numbers.
184 .LP
185 The following diagram shows an example of an \*r file's organization.
186 .if !\np \{\
187 .nf
188 .vs 12
189 .ne 36
190 .cs 1 20
191 .eo
192
193                            Head
194                              |
195                              |
196                              v                        / \
197                          ---------                   /   \
198    / \          / \      |       |      / \         /     \
199   /   \        /   \     |  2.1  |     /   \       /       \
200  /     \      /     \    |       |    /     \     /         \
201 /1.2.1.3\    /1.3.1.1\   |       |   /1.2.2.2\   /1.2.2.1.1.1\
202 ---------    ---------   ---------   ---------   -------------
203     ^            ^           |           ^             ^
204     |            |           |           |             |
205     |            |           v           |             |
206    / \           |       ---------      / \            |
207   /   \          |       \  1.3  /     /   \           |
208  /     \         ---------\     /     /     \-----------
209 /1.2.1.1\                  \   /     /1.2.2.1\
210 ---------                   \ /      ---------
211     ^                        |           ^
212     |                        |           |
213     |                        v           |
214     |                    ---------       |
215     |                    \  1.2  /       |
216     ----------------------\     /---------
217                            \   /
218                             \ /
219                              |
220                              |
221                              v
222                          ---------
223                          \  1.1  /
224                           \     /
225                            \   /
226                             \ /
227
228 .ec
229 .cs 1
230 .vs
231 .fi
232 .\}
233 .if \np \{\
234 .lf 232
235 .PS 4.250i 3.812i
236 .\" -2.0625 -4.25 1.75 0
237 .\" 0.000i 4.250i 3.812i 0.000i
238 .nr 00 \n(.u
239 .nf
240 .nr 0x 1
241 \h'3.812i'
242 .sp -1
243 .lf 242
244 \h'2.062i-(\w'Head'u/2u)'\v'0.125i-(0v/2u)+0v+0.22m'Head
245 .sp -1
246 \h'2.062i'\v'0.250i'\D'l0.000i 0.500i'
247 .sp -1
248 \h'2.087i'\v'0.650i'\D'l-0.025i 0.100i'
249 .sp -1
250 \h'2.062i'\v'0.750i'\D'l-0.025i -0.100i'
251 .sp -1
252 \h'1.688i'\v'1.250i'\D'l0.750i 0.000i'
253 .sp -1
254 \h'2.438i'\v'1.250i'\D'l0.000i -0.500i'
255 .sp -1
256 \h'2.438i'\v'0.750i'\D'l-0.750i 0.000i'
257 .sp -1
258 \h'1.688i'\v'0.750i'\D'l0.000i 0.500i'
259 .sp -1
260 .lf 244
261 \h'2.062i-(\w'2.1'u/2u)'\v'1.000i-(0v/2u)+0v+0.22m'2.1
262 .sp -1
263 \h'2.062i'\v'1.250i'\D'l0.000i 0.500i'
264 .sp -1
265 \h'2.087i'\v'1.650i'\D'l-0.025i 0.100i'
266 .sp -1
267 \h'2.062i'\v'1.750i'\D'l-0.025i -0.100i'
268 .sp -1
269 .lf 246
270 \h'2.062i-(\w'1.3'u/2u)'\v'2.000i-(1v/2u)+0v+0.22m'1.3
271 .sp -1
272 \h'2.062i'\v'2.250i'\D'l-0.375i -0.500i'
273 .sp -1
274 \h'1.688i'\v'1.750i'\D'l0.750i 0.000i'
275 .sp -1
276 \h'2.438i'\v'1.750i'\D'l-0.375i 0.500i'
277 .sp -1
278 \h'1.875i'\v'2.000i'\D'~-0.500i 0.000i 0.000i -0.500i'
279 .sp -1
280 \h'1.350i'\v'1.600i'\D'l0.025i -0.100i'
281 .sp -1
282 \h'1.375i'\v'1.500i'\D'l0.025i 0.100i'
283 .sp -1
284 .lf 249
285 \h'1.375i-(\w'1.3.1.1'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.3.1.1
286 .sp -1
287 \h'1.375i'\v'1.000i'\D'l-0.375i 0.500i'
288 .sp -1
289 \h'1.000i'\v'1.500i'\D'l0.750i 0.000i'
290 .sp -1
291 \h'1.750i'\v'1.500i'\D'l-0.375i -0.500i'
292 .sp -1
293 \h'2.062i'\v'2.250i'\D'l0.000i 0.500i'
294 .sp -1
295 \h'2.087i'\v'2.650i'\D'l-0.025i 0.100i'
296 .sp -1
297 \h'2.062i'\v'2.750i'\D'l-0.025i -0.100i'
298 .sp -1
299 .lf 252
300 \h'2.062i-(\w'1.2'u/2u)'\v'3.000i-(1v/2u)+0v+0.22m'1.2
301 .sp -1
302 \h'2.062i'\v'3.250i'\D'l-0.375i -0.500i'
303 .sp -1
304 \h'1.688i'\v'2.750i'\D'l0.750i 0.000i'
305 .sp -1
306 \h'2.438i'\v'2.750i'\D'l-0.375i 0.500i'
307 .sp -1
308 \h'1.875i'\v'3.000i'\D'~-0.500i 0.000i -0.500i 0.000i -0.500i 0.000i 0.000i -0.500i'
309 .sp -1
310 \h'0.350i'\v'2.600i'\D'l0.025i -0.100i'
311 .sp -1
312 \h'0.375i'\v'2.500i'\D'l0.025i 0.100i'
313 .sp -1
314 .lf 255
315 \h'0.375i-(\w'1.2.1.1'u/2u)'\v'2.250i-(1v/2u)+1v+0.22m'1.2.1.1
316 .sp -1
317 \h'0.375i'\v'2.000i'\D'l-0.375i 0.500i'
318 .sp -1
319 \h'0.000i'\v'2.500i'\D'l0.750i 0.000i'
320 .sp -1
321 \h'0.750i'\v'2.500i'\D'l-0.375i -0.500i'
322 .sp -1
323 \h'0.375i'\v'2.000i'\D'l0.000i -0.500i'
324 .sp -1
325 \h'0.350i'\v'1.600i'\D'l0.025i -0.100i'
326 .sp -1
327 \h'0.375i'\v'1.500i'\D'l0.025i 0.100i'
328 .sp -1
329 .lf 257
330 \h'0.375i-(\w'1.2.1.3'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.2.1.3
331 .sp -1
332 \h'0.375i'\v'1.000i'\D'l-0.375i 0.500i'
333 .sp -1
334 \h'0.000i'\v'1.500i'\D'l0.750i 0.000i'
335 .sp -1
336 \h'0.750i'\v'1.500i'\D'l-0.375i -0.500i'
337 .sp -1
338 \h'2.250i'\v'3.000i'\D'~0.500i 0.000i 0.000i -0.500i'
339 .sp -1
340 \h'2.725i'\v'2.600i'\D'l0.025i -0.100i'
341 .sp -1
342 \h'2.750i'\v'2.500i'\D'l0.025i 0.100i'
343 .sp -1
344 .lf 261
345 \h'2.750i-(\w'1.2.2.1'u/2u)'\v'2.250i-(1v/2u)+1v+0.22m'1.2.2.1
346 .sp -1
347 \h'2.750i'\v'2.000i'\D'l-0.375i 0.500i'
348 .sp -1
349 \h'2.375i'\v'2.500i'\D'l0.750i 0.000i'
350 .sp -1
351 \h'3.125i'\v'2.500i'\D'l-0.375i -0.500i'
352 .sp -1
353 \h'2.938i'\v'2.250i'\D'~0.500i 0.000i 0.000i -0.500i 0.000i -0.500i'
354 .sp -1
355 \h'3.413i'\v'1.350i'\D'l0.025i -0.100i'
356 .sp -1
357 \h'3.438i'\v'1.250i'\D'l0.025i 0.100i'
358 .sp -1
359 .lf 264
360 \h'3.438i-(\w'\s-21.2.2.1.1.1\s0'u/2u)'\v'1.000i-(1v/2u)+1v+0.22m'\s-21.2.2.1.1.1\s0
361 .sp -1
362 \h'3.438i'\v'0.750i'\D'l-0.375i 0.500i'
363 .sp -1
364 \h'3.062i'\v'1.250i'\D'l0.750i 0.000i'
365 .sp -1
366 \h'3.812i'\v'1.250i'\D'l-0.375i -0.500i'
367 .sp -1
368 \h'2.750i'\v'2.000i'\D'l0.000i -0.500i'
369 .sp -1
370 \h'2.725i'\v'1.600i'\D'l0.025i -0.100i'
371 .sp -1
372 \h'2.750i'\v'1.500i'\D'l0.025i 0.100i'
373 .sp -1
374 .lf 267
375 \h'2.750i-(\w'1.2.2.2'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.2.2.2
376 .sp -1
377 \h'2.750i'\v'1.000i'\D'l-0.375i 0.500i'
378 .sp -1
379 \h'2.375i'\v'1.500i'\D'l0.750i 0.000i'
380 .sp -1
381 \h'3.125i'\v'1.500i'\D'l-0.375i -0.500i'
382 .sp -1
383 \h'2.062i'\v'3.250i'\D'l0.000i 0.500i'
384 .sp -1
385 \h'2.087i'\v'3.650i'\D'l-0.025i 0.100i'
386 .sp -1
387 \h'2.062i'\v'3.750i'\D'l-0.025i -0.100i'
388 .sp -1
389 .lf 270
390 \h'2.062i-(\w'1.1'u/2u)'\v'4.000i-(1v/2u)+0v+0.22m'1.1
391 .sp -1
392 \h'2.062i'\v'4.250i'\D'l-0.375i -0.500i'
393 .sp -1
394 \h'1.688i'\v'3.750i'\D'l0.750i 0.000i'
395 .sp -1
396 \h'2.438i'\v'3.750i'\D'l-0.375i 0.500i'
397 .sp -1
398 .sp 4.250i+1
399 .if \n(00 .fi
400 .br
401 .nr 0x 0
402 .lf 271
403 .PE
404 .lf 272
405 .\}
406 .SH IDENTIFICATION
407 .de VL
408 \\$2
409 ..
410 Author: Walter F. Tichy,
411 Purdue University, West Lafayette, IN, 47907.
412 .br
413 Manual Page Revision: \*(Rv; Release Date: \*(Dt.
414 .br
415 Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
416 .br
417 Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
418 .SH SEE ALSO
419 rcsintro(1), ci(1), co(1), ident(1), rcs(1), rcsclean(1), rcsdiff(1),
420 rcsmerge(1), rlog(1)
421 .br
422 Walter F. Tichy,
423 \*r\*-A System for Version Control,
424 .I "Software\*-Practice & Experience"
425 .BR 15 ,
426 7 (July 1985), 637-654.