xref: /openbsd-src/usr.bin/rcs/rcsfile.5 (revision 4ad8306012ebf0c942c081ff1e4a6163830ef4f5)
1.\" $OpenBSD: rcsfile.5,v 1.1 2019/04/24 11:57:54 schwarze Exp $
2.\"
3.\" Copyright (c) 2019 Fabio Scotoni <fabio@esse.ch>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: April 24 2019 $
18.Dt RCSFILE 5
19.Os
20.Sh NAME
21.Nm rcsfile
22.Nd format of an RCS file
23.Sh DESCRIPTION
24An RCS file is a text file.
25It consists of four sections, each separated by two empty lines.
26RCS files should not be edited by hand;
27the
28.Xr rcs 1
29programs should be used instead.
30.Ss Administrative data
31The RCS file begins with admin data.
32Each entry in this section consists of either one or multiple values.
33Entries that take one value are specified on one line:
34The keyword and its corresponding value are separated by
35a tab character.
36Entries that take multiple values begin with a keyword on one line;
37the values are specified on subsequent lines, one per line and
38prefixed with a tab character.
39If the list is empty, the semicolon immediately follows the keyword.
40Entries are terminated with a semicolon.
41The entries are:
42.Bl -tag -width Ds
43.It Ic head Ar rev
44Highest revision number.
45.It Ic branch Ar rev
46Revision number that specifies the default branch (optional).
47.It Ic access
48List of users that are allowed to check in new revisions with
49.Xr ci 1 .
50This keyword is not followed by a tab;
51instead, the list of users is specified with one username per line.
52The list is terminated by a single semicolon.
53.It Ic symbols
54List of symbolic names used as aliases for specific revisions.
55Each entry consists of a symbolic name followed by a colon and
56the revision.
57.It Ic locks
58List of locked revisions.
59Each entry consists of a username followed by a colon and
60the locked revision.
61.It Ic strict
62Indicates that locks are strict;
63if missing, locks are not strict.
64This entry takes no value and immediately follows the list of locks
65without a newline.
66.It Ic comment Pf @ Ar leader Ns @
67Contains the comment leader surrounded by at signs.
68.It Ic expand Pf @ Ar mode Ns @
69Indicates the keyword substitution mode.
70See
71.Xr rcs 1
72for the possible keyword substitution modes.
73If this entry is not given in the admin section,
74.Ar kv
75must be assumed.
76.El
77.Ss List of deltas
78The RCS file continues with a list of deltas.
79Deltas are separated by empty lines.
80The list begins with the head and ends with the initial revision.
81Each entry begins with the revision number, followed by a newline.
82After that, the structure follows the admin section.
83.Bl -tag -width Ds
84.It Ic date Ar YYYY . Ns Ar mm . Ns Ar dd . Ns Ar HH . Ns Ar MM . Ns Ar SS
85Indicates the date and UTC time the revision was checked in.
86The date consists of the year, the month,
87the day of month, the hour, the minute and the second,
88each separated by dots.
89The year is specified in either two or four digits.
90The other values are specified in two digits each.
91.It Ic author Ar username
92Author's username.
93This entry immediately follows the
94.Ic date
95without a newline.
96.It Ic state Ar value
97Contains the state of this delta,
98which is an arbitrary string.
99This entry immediately follows the
100.Ic author
101without a newline.
102.It Ic branches
103List of revision numbers that are branches stemming from this delta.
104.It Ic next Ar rev
105Next revision.
106Chronologically, this is the
107.Em previous
108revision.
109For the initial check-in,
110.Ar rev
111is empty,
112but the tab character that acts as separator is nonetheless present.
113.El
114.Ss Description
115The RCS file continues with the description.
116It consists of the string
117.Ic desc
118followed by a newline and then an at sign.
119The description is an arbitrary string that can span multiple lines.
120A single at sign on a line terminates the description.
121At signs anywhere in the description itself
122are escaped by prefixing them with another at sign.
123.Ss List of deltatexts
124Finally, the RCS file contains the deltatexts.
125The list of deltatexts is ordered the same as the list of deltas.
126Deltatexts are separated by two lines.
127Each entry begins with the revision number, followed by a newline.
128The text
129.Dq Ic log
130follows on its own line.
131The log message follows on another new line;
132it consists of an at sign, the log message itself (which may span
133multiple lines), and finally an at sign on its own line.
134Then the text
135.Dq Ic text
136follows on its own line.
137The format is the same as for the description and log message.
138As with the description,
139at signs anywhere in the log message or in the deltatext itself
140are escaped by prefixing them with another at sign.
141The deltatext of the head consists of the full file contents.
142All subsequent deltatexts contain the differences to the previous
143deltatext in the format of
144.Xr diff 1
145.Fl n .
146.Sh SEE ALSO
147.Xr ci 1 ,
148.Xr co 1 ,
149.Xr cvs 1 ,
150.Xr ident 1 ,
151.Xr rcs 1 ,
152.Xr rcsclean 1 ,
153.Xr rcsdiff 1 ,
154.Xr rcsmerge 1
155