rcs(1) General Commands Manual rcs(1)
NAME
rcs - change RCS file attributes
SYNOPSIS
[options] file...
DESCRIPTION
creates new RCS files or changes attributes of existing ones. An RCS file contains multiple revisions of text, an access list, a change
log, descriptive text, and some control attributes. For to work, the user's login name must be on the access list, except if the access
list is empty, if the user is the owner of the file or the superuser, or if the option is present.
The user of the command must have read/write permission for the directory containing the RCS file and read permission for the RCS file
itself. creates a semaphore file in the same directory as the RCS file to prevent simultaneous update. For changes, always creates a new
file. On successful completion, deletes the old one and renames the new one. This strategy makes links to RCS files useless.
Files ending in are RCS files; all others are working files. If a working file is given, tries to find the corresponding RCS file first in
directory then in the current directory, as explained in rcsintro(5).
Options
recognizes the following options:
Appends the login names appearing in the comma-separated list
logins to the access list of the RCS file.
Appends the access list of
oldfile to the access list of the RCS file.
Sets the comment leader to
string. The comment leader is printed before every log message line generated by the keyword during check out (see
co(1)). This is useful for programming languages without multi-line comments. During or initial the comment leader
is guessed from the suffix of the working file. Note, a comment leader is inserted at the beginning of each line of
log information. The comment leader is determined by the suffix used with the file name, as in foo.c, or foo.sh, or
foo.p. Note you can specify a different comment leader through the "rcs" command. The following table shows the
comment leader associated with each file name suffix:
SUFFIX FILES Comment Character
--------------------------------------------
c c '*'
C C Header '*'
sh shell '#'
s Assembly '#'
p pascal '*'
r ratfor '#'
e efl '#'
l lex '*'
y yacc '*'
yr yacc-rarfor '*'
ye yacc-efl '*'
ml mocklisp ';'
mac macro ';'
f fortran 'c'
ms ms-macros ''
me me-macros ''
"" empty suffix '#'
nil unknown suffix '""'
Erases the login names
appearing in the comma-separated list logins from the access list of the RCS file. If logins is omitted, the entire
access list is erased.
Creates and initializes a new
RCS file, but does not deposit any revision. If the RCS file has no path prefix, tries to place it first into the
subdirectory then into the current directory. If the RCS file already exists, an error message is printed.
Locks the revision with number
rev. If a branch is given, the latest revision on that branch is locked. If rev is omitted, the latest revision on
the trunk is locked. Locking prevents overlapping changes. A lock is removed with or (see below).
Sets locking to
Strict locking means that the owner of an RCS file is not exempt from locking for check in. This option should be
used for files that are shared.
Associates the symbolic name
name with the branch or revision rev. prints an error message if name is already associated with another number. If
rev is omitted, the symbolic name is associated with the latest revision on the trunk. If is omitted, the symbolic
name is deleted.
Same as except that it overrides a previous assignment of name.
Deletes ("obsoletes") the revisions given by
range. A range consisting of a single revision number means that revision. A range consisting of a branch number
means the latest revision on that branch. A range of the form rev1-rev2 means revisions rev1 to rev2 on the same
branch, means from the beginning of the branch containing rev up to and including rev, and means from revision rev to
the head of the branch containing rev. None of the outdated revisions can have branches or locks.
Quiet mode; diagnostics are not printed.
Sets the state attribute of the revision
rev to state. If rev is omitted, the latest revision on the trunk is assumed. If rev is a branch number, the latest
revision on that branch is assumed. Any identifier is acceptable for state. A useful set of states is (for experi-
mental), (for stable), and (for released). By default, sets the state of a revision to
Writes descriptive text into the
RCS file (deletes the existing text). If txtfile is omitted, prompts the user for text supplied from the standard
input, terminated with a line containing a single or Ctrl-D. Otherwise, the descriptive text is copied from the file
txtfile. If the option is present, descriptive text is requested even if is not given. The prompt is suppressed if
the standard input is not a terminal.
Unlocks the revision with number
rev. If a branch is given, the latest revision on that branch is unlocked. If rev is omitted, the latest lock held
by the user is removed. Normally, only the locker of a revision may unlock it. Somebody else unlocking a revision
breaks the lock. This causes a mail message to be sent to the original locker. The message contains a commentary
solicited from the breaker. The commentary is terminated with a line containing a single or Control-D.
Sets locking to non-strict.
Non-strict locking means that the owner of a file need not lock a revision for check in. This option should be used
for files that are shared. The default or is determined by the system administrator.
Access Control Lists (ACLs)
Do not add optional ACL entries to an RCS file, because they are deleted when the file is updated. The resulting access modes for the new
file might not be as desired.
DIAGNOSTICS
The RCS filename and the revisions outdated are written to the diagnostic output. The exit status always refers to the last RCS file oper-
ated upon, and is 0 if the operation was successful; 1 if unsuccessful.
EXAMPLES
Add the names and to the access list of RCS file
Set the comment leader to for file
Associate the symbolic name with revision of file
Lock revision of file so that only the locker is permitted to check in (see ci(1)) the next revision of the file. This command prevents
two or more people from simultaneously revising the same file and inadvertently overwriting each other's work.
WARNINGS
All command options are available to anyone whose name appears in the file access list, including those to add and delete names in the
access list, change strict locking, etc. If these options must be restricted, other security methods should be employed. Also see previ-
ous note regarding Access Control Lists.
AUTHOR
was developed by Walter F. Tichy.
SEE ALSO
co(1), ci(1), rcsdiff(1), rcsmerge(1), rlog(1), rcsfile(4), acl(5), rcsintro(5).
rcs(1)