Полезная информация

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: mergeChapter 18
The RCS Utility
Next: Reference: rcsclean
 

rcs

rcs [options] files

An administrative command for setting up or changing the default attributes of RCS files. 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, and -x.

Options

-ausers

Append the comma-separated list of users to the access list.

-Aotherfile

Append 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 character for $Log keywords is set to string s. By default, co expands embedded $Log keywords into comments preceded by #. 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.)

-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. (New in RCS Version 5.)

-kc

Use c as the default style for keyword substitution. (See co for values of c.) -kkv restores the default substitution style; all other styles create incompatibilities with RCS Version 4 or earlier.

-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.

-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.)

-mR:msg

Use the msg string to replace the log message of revision R. (New in RCS Version 5.6.)

-nflags

Add 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.

-Nflags

Same as -n but overwrite existing names.

-oR_list

Delete (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. RCS Version 5.6 has changed the range separator character to :, although - is still valid.

-sstate[: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 output.

-t-string

Replace 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 non-strict locking. Everyone except the file owner must use co -l to edit files. (See -L.)

Examples

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


Previous: Reference: mergeUNIX in a Nutshell: System V EditionNext: Reference: rcsclean
Reference: mergeBook IndexReference: rcsclean

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System