386BSD 0.1 development
[unix-history] / usr / src / usr.bin / rcs / man / rcs.1
CommitLineData
acec9572
WJ
1.TH RCS 1L "" "Purdue University"
2.SH NAME
3rcs \- change RCS file attributes
4.SH SYNOPSIS
5.B rcs
6[ options ]
7file ...
8.SH DESCRIPTION
9.I Rcs
10creates new RCS files or changes attributes of existing ones.
11An RCS file contains multiple revisions of text,
12an access list, a change log,
13descriptive text,
14and some control attributes.
15For \fIrcs\fR to work, the caller's login name must be on the access list,
16except if the access list is empty, the caller is the owner of the file
17or the superuser, or
18the \fB\-i\fR option is present.
19.PP
20Files ending in `,v' are RCS files, all others are working files. If
21a working file is given, \fIrcs\fR tries to find the corresponding
22RCS file first in directory ./RCS and then in the current directory,
23as explained in
24.IR co (1L).
25.TP 11
26.B \-i
27creates and initializes a new RCS file, but does not deposit any revision.
28If the RCS file has no path prefix, \fIrcs\fR tries to place it
29first into the subdirectory ./RCS, and then into the current directory.
30If the RCS file
31already exists, an error message is printed.
32.TP
33.BI \-a "logins"
34appends the login names appearing in the comma-separated list \fIlogins\fR
35to the access list of the RCS file.
36.TP
37.BI \-A "oldfile"
38appends the access list of \fIoldfile\fR to the access list of the RCS file.
39.TP
40.BR \-e [\fIlogins\fR]
41erases the login names appearing in the comma-separated list \fIlogins\fR
42from the access list of the RCS file.
43If \fIlogins\fR is omitted, the entire access list is erased.
44.TP
45.BR \-b [\fIrev\fR]
46sets the default branch to \fIrev\fR. If \fIrev\fR is omitted, the default
47branch is reset to the (dynamically) highest branch on the trunk.
48.TP
49.BI \-c "string"
50sets the comment leader to \fIstring\fR. The comment leader
51is printed before every log message line generated by the keyword
52$\&Log$ during checkout (see
53.IR co (1L)).
54This is useful for programming
55languages without multi-line comments. During \fBrcs -i\fR or initial
56\fBci\fR, the comment leader is guessed from the suffix of the working file.
57.TP
58.BR \-l [\fIrev\fR]
59locks the revision with number \fIrev\fR.
60If a branch is given, the latest revision on that branch is locked.
61If \fIrev\fR is omitted, the latest revision on the default branch is locked.
62Locking prevents overlapping changes.
63A lock is removed with \fBci\fR or \fBrcs -u\fR (see below).
64.TP
65.BR \-u [\fIrev\fR]
66unlocks the revision with number \fIrev\fR.
67If a branch is given, the latest revision on that branch is unlocked.
68If \fIrev\fR is omitted, the latest lock held by the caller is removed.
69Normally, only the locker of a revision may unlock it.
70Somebody else unlocking a revision breaks the lock.
71This causes a mail message to be sent to the original locker.
72The message contains a commentary solicited from the breaker.
73The commentary is terminated with a line containing a single `.' or
74control-D.
75.TP
76.B \-L
77sets locking to \fIstrict\fR. Strict locking means that the owner
78of an RCS file is not exempt from locking for checkin.
79This option should be used for files that are shared.
80.TP
81.B \-U
82sets locking to non-strict. Non-strict locking means that the owner of
83a file need not lock a revision for checkin.
84This option should NOT be used for files that are shared.
85The default (\fB\-L\fR or \fB\-U\fR) is determined by your system administrator.
86.TP
87.B \-n\fIname\fR[:\fIrev\fR]
88associates the symbolic name \fIname\fR with the branch or
89revision \fIrev\fR.
90\fIRcs\fR prints an error message if \fIname\fR is already associated with
91another number.
92If \fIrev\fR is omitted, the symbolic name is deleted.
93.TP
94.B \-N\fIname\fR[:\fIrev\fR]
95same as \fB\-n\fR, except that it overrides a previous assignment of
96\fIname\fR.
97.TP
98.BI \-o "range"
99deletes ("outdates") the revisions given by \fIrange\fR.
100A range consisting of a single revision number means that revision.
101A range consisting of a branch number means the latest revision on that
102branch.
103A range of the form \fIrev1-rev2\fR means
104revisions \fIrev1\fR to \fIrev2\fR on the same branch,
105\fI-rev\fR means from the beginning of the branch containing
106\fIrev\fR up to and including \fIrev\fR, and \fIrev-\fR means
107from revision \fIrev\fR to the end of the branch containing \fIrev\fR.
108None of the outdated revisions may have branches or locks.
109.TP
110.B \-q
111quiet mode; diagnostics are not printed.
112.TP
113.B \-s\fIstate\fR[:\fIrev\fR]
114sets the state attribute of the revision \fIrev\fR to \fIstate\fR.
115If \fIrev\fR is a branch number, the latest revision on that branch is
116assumed.
117If \fIrev\fR is omitted, the latest revision on the default branch is assumed.
118Any identifier is acceptable for \fIstate\fR.
119A useful set of states
120is \fIExp\fR (for experimental), \fIStab\fR (for stable), and \fIRel\fR (for
121released).
122By default,
123.IR ci (1L)
124sets the state of a revision to \fIExp\fR.
125.TP
126.BR \-t [\fItxtfile\fR]
127writes descriptive text into the RCS file (deletes the existing text).
128If \fItxtfile\fR is omitted,
129\fIrcs\fR prompts the user for text supplied from the standard input,
130terminated with a line containing a single `.' or control-D.
131Otherwise, the descriptive text is copied from the file \fItxtfile\fR.
132If the \fB\-i\fR option is present, descriptive text is requested
133even if \fB\-t\fR is not given.
134The prompt is suppressed if the standard input is not a terminal.
135.SH DIAGNOSTICS
136The RCS file name and the revisions outdated are written to
137the diagnostic output.
138The exit status always refers to the last RCS file operated upon,
139and is 0 if the operation was successful, 1 otherwise.
140.SH FILES
141The caller of the command
142must have read/write permission for the directory containing
143the RCS file and read permission for the RCS file itself.
144.I Rcs
145creates a semaphore file in the same directory as the RCS
146file to prevent simultaneous update.
147For changes, \fIrcs\fR always creates a new file. On successful completion,
148\fIrcs\fR deletes the old one and renames the new one.
149This strategy makes links to RCS files useless.
150.SH IDENTIFICATION
151.de VL
152\\$2
153..
154Author: Walter F. Tichy,
155Purdue University, West Lafayette, IN, 47907.
156.sp 0
157Revision Number:
158.VL $Revision: 1.3 $
159; Release Date:
160.VL $Date: 89/05/02 11:14:37 $
161\&.
162.sp 0
163Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
164.SH SEE ALSO
165co(1L), ci(1L), ident(1L), rcsdiff(1L), rcsintro(1L), rcsmerge(1L), rlog(1L),
166rcsfile(5L)
167.sp 0
168Walter F. Tichy, "Design, Implementation, and Evaluation of a Revision Control
169System," in \fIProceedings of the 6th International Conference on Software
170Engineering\fR, IEEE, Tokyo, Sept. 1982.