rcs
[options] filesAn administrative command for setting up or changing the default attributes of RCS files. rcs requires you to supply at least one option. (This is for "future expansion.")
Among other things, rcs lets you set strict locking (-L
), delete revisions (-o
), and override locks set by co (-l
and -u
). RCS files have an access list (created via -a
); anyone whose username is on the list can run rcs. The access list is often empty, meaning that rcs is available to everyone. In addition, you can always invoke rcs if you own the file, if you're a privileged user, or if you run rcs with -i
. rcs accepts the standard options -q
, -V
, -V
n, -T
, -x
, and -z
.
-a
usersAppend the comma-separated list of users to the access list.
-A
otherfileAppend otherfile's access list to the access list of files.
-b
[R]Set the default branch to R or, if R is omitted, to the highest branch on the trunk.
-c
'
s'
The comment leader for $Log$
keywords is set to string s. You could, for example, set s to .\"
for troff files or set s to *
for C programs. (You would need to manually insert an enclosing /*
and */
before and after $Log$
.)
-c
is obsolescent; RCS uses the character(s) preceding $Log$
in the file as the comment leader for log messages. You may wish to set this, though, if you are accessing the RCS file with older versions of RCS.
-e
[users]Erase everyone (or only the specified users) from the access list.
-i
Create (initialize) an RCS file, but don't deposit a revision.
-I
Interactive mode; prompt user even when standard input is not a terminal.
-k
cUse c as the default style for keyword substitution. (See co for values of c.) -kkv
restores the default substitution style.
-l
[R]Lock revision R or the latest revision. -l
"retroactively locks" a file and is useful if you checked out a file incorrectly by typing co instead of co -l
. rcs will ask you if it should break the lock if someone else has the file locked.
-L
Turn on strict locking (the default). This means that everyone, including the owner of the RCS file, must use co -l
to edit files. Strict locking is recommended when files are to be shared. (See -U
.)
-m
R:
msgUse the msg string to replace the log message of revision R.
-M
Do not send mail when breaking a lock. This is intended for use by RCS frontends, not for direct use by users!
-n
flagsAdd or delete an association between a revision and a name. flags can be:
name: R | Associate name with revision R. |
name: | Associate name with latest revision. |
name | Remove association of name. |
-N
flagsSame as -n
, but overwrite existing names.
-o
R_listDelete (outdate) revisions listed in R_list. R_list can be specified as: R1, R1:
R2, R1:
, or :
R2. When a branch is given, -o
deletes only the latest revision on it. The -
range separator character from RCS versions prior to 5.6 is still valid.
-s
state[:
R]Set the state of revision R (or the latest revision) to the word state.
-t
[file]Replace RCS file description with contents of file or, if no file is given, with standard input.
-t-
stringReplace RCS file description with string.
-u
[R]The complement of -l
: unlock a revision that was previously checked out via co -l
. If someone else did the check-out, you are prompted to state the reason for breaking the lock. This message is mailed to the original locker.
-U
Turn on nonstrict locking. Everyone except the file owner must use co -l
to edit files. (See -L
.)
Associate the label To_customer with the latest revision of all RCS files:
rcs -nTo_customer: RCS/*
Add three users to the access list of file beatle_deals:
rcs -ageorge,paul,ringo beatle_deals
Delete revisions 1.2 through 1.5:
rcs -o1.2:1.5 doc
Replace an RCS file description with the contents of a variable:
echo "$description" | rcs -t
file