1.de Id
2.ds Rv \\$3
3.ds Dt \\$4
4..
5.Id $FreeBSD$
6.ds r \&\s-1RCS\s0
7.if n .ds - \%--
8.if t .ds - \(em
9.if !\n(.g \{\
10.	if !\w|\*(lq| \{\
11.		ds lq ``
12.		if \w'\(lq' .ds lq "\(lq
13.	\}
14.	if !\w|\*(rq| \{\
15.		ds rq ''
16.		if \w'\(rq' .ds rq "\(rq
17.	\}
18.\}
19.TH RCS 1 \*(Dt GNU
20.SH NAME
21rcs \- change RCS file attributes
22.SH SYNOPSIS
23.B rcs
24.IR "options file " .\|.\|.
25.SH DESCRIPTION
26.B rcs
27creates new \*r files or changes attributes of existing ones.
28An \*r file contains multiple revisions of text,
29an access list, a change log,
30descriptive text,
31and some control attributes.
32For
33.B rcs
34to work, the caller's login name must be on the access list,
35except if the access list is empty, the caller is the owner of the file
36or the superuser, or
37the
38.B \-i
39option is present.
40.PP
41Pathnames matching an \*r suffix denote \*r files;
42all others denote working files.
43Names are paired as explained in
44.BR ci (1).
45Revision numbers use the syntax described in
46.BR ci (1).
47.SH OPTIONS
48.TP
49.B \-i
50Create and initialize a new \*r file, but do not deposit any revision.
51If the \*r file has no path prefix, try to place it
52first into the subdirectory
53.BR ./RCS ,
54and then into the current directory.
55If the \*r file
56already exists, print an error message.
57.TP
58.BI \-a "logins"
59Append the login names appearing in the comma-separated list
60.I logins
61to the access list of the \*r file.
62.TP
63.BI \-A "oldfile"
64Append the access list of
65.I oldfile
66to the access list of the \*r file.
67.TP
68.BR \-e [\f2logins\fP]
69Erase the login names appearing in the comma-separated list
70.I logins
71from the access list of the \*r file.
72If
73.I logins
74is omitted, erase the entire access list.
75.TP
76.BR \-b [\f2rev\fP]
77Set the default branch to
78.IR rev .
79If
80.I rev
81is omitted, the default
82branch is reset to the (dynamically) highest branch on the trunk.
83.TP
84.BI \-c string
85Set the comment leader to
86.IR string .
87An initial
88.BR ci ,
89or an
90.B "rcs\ \-i"
91without
92.BR \-c ,
93guesses the comment leader from the suffix of the working filename.
94.RS
95.PP
96This option is obsolescent, since \*r normally uses the preceding
97.B $\&Log$
98line's prefix when inserting log lines during checkout (see
99.BR co (1)).
100However, older versions of \*r use the comment leader instead of the
101.B $\&Log$
102line's prefix, so
103if you plan to access a file with both old and new versions of \*r,
104make sure its comment leader matches its
105.B $\&Log$
106line prefix.
107.RE
108.TP
109.BI \-k subst
110Set the default keyword substitution to
111.IR subst .
112The effect of keyword substitution is described in
113.BR co (1).
114Giving an explicit
115.B \-k
116option to
117.BR co ,
118.BR rcsdiff ,
119and
120.B rcsmerge
121overrides this default.
122Beware
123.BR "rcs\ \-kv",
124because
125.B \-kv
126is incompatible with
127.BR "co\ \-l".
128Use
129.B "rcs\ \-kkv"
130to restore the normal default keyword substitution.
131.TP
132.BR \-l [\f2rev\fP]
133Lock the revision with number
134.IR rev .
135If a branch is given, lock the latest revision on that branch.
136If
137.I rev
138is omitted, lock the latest revision on the default branch.
139Locking prevents overlapping changes.
140If someone else already holds the lock, the lock is broken as with
141.B "rcs\ \-u"
142(see below).
143.TP
144.BR \-u [\f2rev\fP]
145Unlock the revision with number
146.IR rev .
147If a branch is given, unlock the latest revision on that branch.
148If
149.I rev
150is omitted, remove the latest lock held by the caller.
151Normally, only the locker of a revision can unlock it.
152Somebody else unlocking a revision breaks the lock.
153This causes a mail message to be sent to the original locker.
154The message contains a commentary solicited from the breaker.
155The commentary is terminated by end-of-file or by a line containing
156.BR \&. "\ by"
157itself.
158.TP
159.B \-L
160Set locking to
161.IR strict .
162Strict locking means that the owner
163of an \*r file is not exempt from locking for checkin.
164This option should be used for files that are shared.
165.TP
166.B \-U
167Set locking to non-strict.  Non-strict locking means that the owner of
168a file need not lock a revision for checkin.
169This option should
170.I not
171be used for files that are shared.
172Whether default locking is strict is determined by your system administrator,
173but it is normally strict.
174.TP
175\f3\-m\fP\f2rev\fP\f3:\fP\f2msg\fP
176Replace revision
177.IR rev 's
178log message with
179.IR msg .
180.TP
181.B \-M
182Do not send mail when breaking somebody else's lock.
183This option is not meant for casual use;
184it is meant for programs that warn users by other means, and invoke
185.B "rcs\ \-u"
186only as a low-level lock-breaking operation.
187.TP
188\f3\-n\fP\f2name\fP[\f3:\fP[\f2rev\fP]]
189Associate the symbolic name
190.I name
191with the branch or
192revision
193.IR rev .
194Delete the symbolic name if both
195.B :
196and
197.I rev
198are omitted; otherwise, print an error message if
199.I name
200is already associated with
201another number.
202If
203.I rev
204is symbolic, it is expanded before association.
205A
206.I rev
207consisting of a branch number followed by a
208.B .\&
209stands for the current latest revision in the branch.
210A
211.B :
212with an empty
213.I rev
214stands for the current latest revision on the default branch,
215normally the trunk.
216For example,
217.BI "rcs\ \-n" name ":\ RCS/*"
218associates
219.I name
220with the current latest revision of all the named \*r files;
221this contrasts with
222.BI "rcs\ \-n" name ":$\ RCS/*"
223which associates
224.I name
225with the revision numbers extracted from keyword strings
226in the corresponding working files.
227.TP
228\f3\-N\fP\f2name\fP[\f3:\fP[\f2rev\fP]]
229Act like
230.BR \-n ,
231except override any previous assignment of
232.IR name .
233.TP
234.BI \-o range
235deletes (\*(lqoutdates\*(rq) the revisions given by
236.IR range .
237A range consisting of a single revision number means that revision.
238A range consisting of a branch number means the latest revision on that
239branch.
240A range of the form
241.IB rev1 : rev2
242means
243revisions
244.I rev1
245to
246.I rev2
247on the same branch,
248.BI : rev
249means from the beginning of the branch containing
250.I rev
251up to and including
252.IR rev ,
253and
254.IB rev :
255means
256from revision
257.I rev
258to the end of the branch containing
259.IR rev .
260None of the outdated revisions can have branches or locks.
261.TP
262.B \-q
263Run quietly; do not print diagnostics.
264.TP
265.B \-I
266Run interactively, even if the standard input is not a terminal.
267.TP
268.B \-s\f2state\fP\f1[\fP:\f2rev\fP\f1]\fP
269Set the state attribute of the revision
270.I rev
271to
272.IR state .
273If
274.I rev
275is a branch number, assume the latest revision on that branch.
276If
277.I rev
278is omitted, assume the latest revision on the default branch.
279Any identifier is acceptable for
280.IR state .
281A useful set of states
282is
283.B Exp
284(for experimental),
285.B Stab
286(for stable), and
287.B Rel
288(for
289released).
290By default,
291.BR ci (1)
292sets the state of a revision to
293.BR Exp .
294.TP
295.BR \-t [\f2file\fP]
296Write descriptive text from the contents of the named
297.I file
298into the \*r file, deleting the existing text.
299The
300.IR file
301pathname cannot begin with
302.BR \- .
303If
304.I file
305is omitted, obtain the text from standard input,
306terminated by end-of-file or by a line containing
307.BR \&. "\ by"
308itself.
309Prompt for the text if interaction is possible; see
310.BR \-I .
311With
312.BR \-i ,
313descriptive text is obtained
314even if
315.B \-t
316is not given.
317.TP
318.BI \-t\- string
319Write descriptive text from the
320.I string
321into the \*r file, deleting the existing text.
322.TP
323.B \-T
324Preserve the modification time on the \*r file
325unless a revision is removed.
326This option can suppress extensive recompilation caused by a
327.BR make (1)
328dependency of some copy of the working file on the \*r file.
329Use this option with care; it can suppress recompilation even when it is needed,
330i.e. when a change to the \*r file
331would mean a change to keyword strings in the working file.
332.TP
333.BI \-V
334Print \*r's version number.
335.TP
336.BI \-V n
337Emulate \*r version
338.IR n .
339See
340.BR co (1)
341for details.
342.TP
343.BI \-x "suffixes"
344Use
345.I suffixes
346to characterize \*r files.
347See
348.BR ci (1)
349for details.
350.TP
351.BI \-z zone
352Use
353.I zone
354as the default time zone.
355This option has no effect;
356it is present for compatibility with other \*r commands.
357.PP
358At least one explicit option must be given,
359to ensure compatibility with future planned extensions
360to the
361.B rcs
362command.
363.SH COMPATIBILITY
364The
365.BI \-b rev
366option generates an \*r file that cannot be parsed by \*r version 3 or earlier.
367.PP
368The
369.BI \-k subst
370options (except
371.BR \-kkv )
372generate an \*r file that cannot be parsed by \*r version 4 or earlier.
373.PP
374Use
375.BI "rcs \-V" n
376to make an \*r file acceptable to \*r version
377.I n
378by discarding information that would confuse version
379.IR n .
380.PP
381\*r version 5.5 and earlier does not support the
382.B \-x
383option, and requires a
384.B ,v
385suffix on an \*r pathname.
386.SH FILES
387.B rcs
388accesses files much as
389.BR ci (1)
390does,
391except that it uses the effective user for all accesses,
392it does not write the working file or its directory,
393and it does not even read the working file unless a revision number of
394.B $
395is specified.
396.SH ENVIRONMENT
397.TP
398.B \s-1RCSINIT\s0
399options prepended to the argument list, separated by spaces.
400See
401.BR ci (1)
402for details.
403.SH DIAGNOSTICS
404The \*r pathname and the revisions outdated are written to
405the diagnostic output.
406The exit status is zero if and only if all operations were successful.
407.SH IDENTIFICATION
408Author: Walter F. Tichy.
409.br
410Manual Page Revision: \*(Rv; Release Date: \*(Dt.
411.br
412Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
413.br
414Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
415.SH "SEE ALSO"
416rcsintro(1), co(1), ci(1), ident(1), rcsclean(1), rcsdiff(1),
417rcsmerge(1), rlog(1), rcsfile(5)
418.br
419Walter F. Tichy,
420\*r\*-A System for Version Control,
421.I "Software\*-Practice & Experience"
422.BR 15 ,
4237 (July 1985), 637-654.
424.SH BUGS
425A catastrophe (e.g. a system crash) can cause \*r to leave behind
426a semaphore file that causes later invocations of \*r to claim
427that the \*r file is in use.
428To fix this, remove the semaphore file.
429A semaphore file's name typically begins with
430.B ,
431or ends with
432.BR _ .
433.PP
434The separator for revision ranges in the
435.B \-o
436option used to be
437.B \-
438instead of
439.BR : ,
440but this leads to confusion when symbolic names contain
441.BR \- .
442For backwards compatibility
443.B "rcs \-o"
444still supports the old
445.B \-
446separator, but it warns about this obsolete use.
447.PP
448Symbolic names need not refer to existing revisions or branches.
449For example, the
450.B \-o
451option does not remove symbolic names for the outdated revisions; you must use
452.B \-n
453to remove the names.
454.br
455