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