1991/04/21 NAME rcsintro - introduction to RCS commands DESCRIPTION The Revision Control System (RCS) manages multiple revisions of files. RCS automates the storing, retrieval, logging, identification, and merging of revisions. RCS is useful for text that is revised frequently, for example programs, documentation, graphics, papers, and form letters. The basic user interface is extremely simple. The novice only needs to learn two commands: ci(1) and co(1). ci, short for check in, deposits the contents of a file into an archival file called an RCS file. An RCS file contains all revisions of a particular file. co, short for check out, retrieves revisions from an RCS file. Functions of RCS + Store and retrieve multiple revisions of text. RCS saves all old revisions in a space efficient way. Changes no longer destroy the original, because the previous revisions remain accessible. Revisions can be retrieved according to ranges of revision numbers, symbolic names, dates, authors, and states. + Maintain a complete history of changes. RCS logs all changes automatically. Besides the text of each revision, RCS stores the author, the date and time of check-in, and a log message summarizing the change. The logging makes it easy to find out what happened to a module, without having to compare source listings or having to track down colleagues. + Resolve access conflicts. When two or more programmers wish to modify the same revision, RCS alerts the programmers and prevents one modification from corrupting the other. + Maintain a tree of revisions. RCS can maintain separate lines of development for each module. It stores a tree structure that represents the ancestral relationships among revisions. + Merge revisions and resolve conflicts. Two separate lines of development of a module can be coalesced by merging. If the revisions to be merged affect the same sections of code, RCS alerts the user about the overlapping changes. + Control releases and configurations. Revisions can be assigned symbolic names and marked as released, stable, experimental, etc. With these facilities, configurations of modules can be described simply and directly. + Automatically identify each revision with name, revision number, creation time, author, etc. The identification is like a stamp that can be embedded at an appropriate place in the text of a - 1 - Formatted: February 11, 1994 1991/04/21 revision. The identification makes it simple to determine which revisions of which modules make up a given configuration. + Minimize secondary storage. RCS needs little extra space for the revisions (only the differences). If intermediate revisions are deleted, the corresponding deltas are compressed accordingly. Getting Started with RCS Suppose you have a file f.c that you wish to put under control of RCS. If you have not already done so, make an RCS directory with the command mkdir RCS Then invoke the check-in command ci f.c This command creates an RCS file in the RCS directory, stores f.c into it as revision 1.1, and deletes f.c. It also asks you for a description. The description should be a synopsis of the contents of the file. All later check-in commands will ask you for a log entry, which should summarize the changes that you made. Files in the RCS directory are called RCS files; the others are called working files. To get back the working file f.c in the previous example, use the check-out command co f.c This command extracts the latest revision from the RCS file and writes it into f.c. If you want to edit f.c, you must lock it as you check it out with the command co -l f.c You can now edit f.c. Suppose after some editing you want to know what changes that you have made. The command rcsdiff f.c tells you the difference between the most recently checked-in version and the working file. You can check the file back in by invoking ci f.c This increments the revision number properly. If ci complains with the message ci error: no lock set by your name then you have tried to check in a file even though you did not lock it when you checked it out. Of course, it is too late now to do the check-out with locking, because another check-out would overwrite your modifications. Instead, invoke rcs -l f.c This command will lock the latest revision for you, unless somebody else got ahead of you already. In this case, you'll have to negotiate with that person. - 2 - Formatted: February 11, 1994 1991/04/21 Locking assures that you, and only you, can check in the next update, and avoids nasty problems if several people work on the same file. Even if a revision is locked, it can still be checked out for reading, compiling, etc. All that locking prevents is a check-in by anybody but the locker. If your RCS file is private, i.e., if you are the only person who is going to deposit revisions into it, strict locking is not needed and you can turn it off. If strict locking is turned off, the owner of the RCS file need not have a lock for check-in; all others still do. Turning strict locking off and on is done with the commands rcs -U f.c and rcs -L f.c If you don't want to clutter your working directory with RCS files, create a subdirectory called RCS in your working directory, and move all your RCS files there. RCS commands will look first into that directory to find needed files. All the commands discussed above will still work, without any modification. (Actually, pairs of RCS and working files can be specified in three ways: (a) both are given, (b) only the working file is given, (c) only the RCS file is given. Both RCS and working files may have arbitrary path prefixes; RCS commands pair them up intelligently.) To avoid the deletion of the working file during check-in (in case you want to continue editing or compiling), invoke ci -l f.c or ci -u f.c These commands check in f.c as usual, but perform an implicit check-out. The first form also locks the checked in revision, the second one doesn't. Thus, these options save you one check-out operation. The first form is useful if you want to continue editing, the second one if you just want to read the file. Both update the identification markers in your working file (see below). You can give ci the number you want assigned to a checked in revision. Assume all your revisions were numbered 1.1, 1.2, 1.3, etc., and you would like to start release 2. The command ci -r2 f.c or ci -r2.1 f.c assigns the number 2.1 to the new revision. From then on, ci will number the subsequent revisions with 2.2, 2.3, etc. The corresponding co commands co -r2 f.c and co -r2.1 f.c retrieve the latest revision numbered 2.x and the revision 2.1, respectively. co without a revision number selects the latest revision on the trunk, i.e. the highest revision with a number consisting of two fields. Numbers with more than two fields are needed for branches. For example, to start a branch at revision 1.3, invoke - 3 - Formatted: February 11, 1994 1991/04/21 ci -r1.3.1 f.c This command starts a branch numbered 1 at revision 1.3, and assigns the number 1.3.1.1 to the new revision. For more information about branches, see rcsfile(5). Automatic Identification RCS can put special strings for identification into your source and object code. To obtain such identification, place the marker $Id$ into your text, for instance inside a comment. RCS will replace this marker with a string of the form $Id: filename revision date time author state $ With such a marker on the first page of each module, you can always see with which revision you are working. RCS keeps the markers up to date automatically. To propagate the markers into your object code, simply put them into literal character strings. In C, this is done as follows: static char rcsid[] = "$Id$"; The command ident extracts such markers from any file, even object code and dumps. Thus, ident lets you find out which revisions of which modules were used in a given program. You may also find it useful to put the marker $Log$ into your text, inside a comment. This marker accumulates the log messages that are requested during check-in. Thus, you can maintain the complete history of your file directly inside it. There are several additional identification markers; see co(1) for details. IDENTIFICATION Author: Walter F. Tichy. Revision Number: 5.1; Release Date: 1991/04/21. Copyright c 1982, 1988, 1989 by Walter F. Tichy. Copyright c 1990, 1991 by Paul Eggert. SEE ALSO ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. - 4 - Formatted: February 11, 1994 1991/09/26 NAME rcs - change RCS file attributes SYNOPSIS rcs [ options ] file ... DESCRIPTION rcs 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 rcs to work, the caller's login name must be on the access list, except if the access list is empty, the caller is the owner of the file or the superuser, or the -i option is present. Pathnames matching an RCS suffix denote RCS files; all others denote working files. Names are paired as explained in ci(1). Revision numbers use the syntax described in ci(1). OPTIONS -i Create and initialize a new RCS file, but do not deposit any revision. If the RCS file has no path prefix, try to place it first into the subdirectory ./RCS, and then into the current directory. If the RCS file already exists, print an error message. -alogins Append the login names appearing in the comma-separated list logins to the access list of the RCS file. -Aoldfile Append the access list of oldfile to the access list of the RCS file. -e[logins] Erase the login names appearing in the comma-separated list logins from the access list of the RCS file. If logins is omitted, erase the entire access list. -b[rev] Set the default branch to rev. If rev is omitted, the default branch is reset to the (dynamically) highest branch on the trunk. -cstring sets the comment leader to string. The comment leader is printed before every log message line generated by the keyword $Log$ during checkout (see co(1)). This is useful for programming languages without multi-line comments. An initial ci , or an rcs -i without -c, guesses the comment leader from the suffix of the working file. - 1 - Formatted: January 26, 1994 1991/09/26 -ksubst Set the default keyword substitution to subst. The effect of keyword substitution is described in co(1). Giving an explicit -k option to co, rcsdiff, and rcsmerge overrides this default. Beware rcs -kv, because -kv is incompatible with co -l. Use rcs -kkv to restore the normal default keyword substitution. -l[rev] Lock the revision with number rev. If a branch is given, lock the latest revision on that branch. If rev is omitted, lock the latest revision on the default branch. Locking prevents overlapping changes. A lock is removed with ci or rcs -u (see below). -u[rev] Unlock the revision with number rev. If a branch is given, unlock the latest revision on that branch. If rev is omitted, remove the latest lock held by the caller. 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 by end-of-file or by a line containing . by itself. -L Set locking to strict. Strict locking means that the owner of an RCS file is not exempt from locking for checkin. This option should be used for files that are shared. -U Set locking to non-strict. Non-strict locking means that the owner of a file need not lock a revision for checkin. This option should not be used for files that are shared. Whether default locking is strict is determined by your system administrator, but it is normally strict. -mrev:msg Replace revision rev's log message with msg. -nname[:[rev]] Associate the symbolic name name with the branch or revision rev. Delete the symbolic name if both : and rev are omitted; otherwise, print an error message if name is already associated with another number. If rev is symbolic, it is expanded before association. A rev consisting of a branch number followed by a . stands for the current latest revision in the branch. A : with an empty rev stands for the current latest revision on the default branch, normally the trunk. For example, rcs -nname: RCS/* associates name with the current latest revision of all the named RCS files; this contrasts with rcs -nname:$ RCS/* which associates name with the revision numbers extracted from keyword strings in the corresponding working files. - 2 - Formatted: January 26, 1994 1991/09/26 -Nname[:[rev]] Act like -n, except override any previous assignment of name. -orange deletes (outdates) 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, :rev means from the beginning of the branch containing rev up to and including rev, and rev: means from revision rev to the end of the branch containing rev. None of the outdated revisions may have branches or locks. -q Run quietly; do not print diagnostics. -I Run interactively, even if the standard input is not a terminal. -sstate[:rev] Set the state attribute of the revision rev to state . If rev is a branch number, assume the latest revision on that branch. If rev is omitted, assume the latest revision on the default branch. Any identifier is acceptable for state. A useful set of states is Exp (for experimental), Stab (for stable), and Rel (for released). By default, ci(1) sets the state of a revision to Exp. -t[file] Write descriptive text from the contents of the named file into the RCS file, deleting the existing text. The file pathname may not begin with -. If file is omitted, obtain the text from standard input, terminated by end-of-file or by a line containing . by itself. Prompt for the text if interaction is possible; see -I. With -i, descriptive text is obtained even if -t is not given. -t-string Write descriptive text from the string into the RCS file, deleting the existing text. -Vn Emulate RCS version n. See co(1) for details. -xsuffixes Use suffixes to characterize RCS files. See ci(1) for details. COMPATIBILITY The -brev option generates an RCS file that cannot be parsed by RCS version 3 or earlier. The -ksubst options (except -kkv) generate an RCS file that cannot be parsed by RCS version 4 or earlier. - 3 - Formatted: January 26, 1994 1991/09/26 Use rcs -Vn to make an RCS file acceptable to RCS version n by discarding information that would confuse version n. RCS version 5.5 and earlier does not support the -x option, and requires a ,v suffix on an RCS pathname. FILES rcs accesses files much as ci(1) does, except that it uses the effective user for all accesses, it does not write the working file or its directory, and it does not even read the working file unless a revision number of $ is specified. ENVIRONMENT RCSINIT options prepended to the argument list, separated by spaces. See ci(1) for details. DIAGNOSTICS The RCS pathname and the revisions outdated are written to the diagnostic output. The exit status is zero if and only if all operations were successful. IDENTIFICATION Author: Walter F. Tichy. Revision Number: 5.6; Release Date: 1991/09/26. Copyright c 1982, 1988, 1989 by Walter F. Tichy. Copyright c 1990, 1991 by Paul Eggert. SEE ALSO co(1), ci(1), ident(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. BUGS The separator for revision ranges in the -o option used to be - instead of :, but this leads to confusion when symbolic names contain -. For backwards compatibility rcs -o still supports the old - separator, but it warns about this obsolete use. Symbolic names need not refer to existing revisions or branches. For example, the -o option does not remove symbolic names for the outdated revisions; you must use -n to remove the names. - 4 - Formatted: January 26, 1994 1991/08/19 NAME co - check out RCS revisions SYNOPSIS co [options] file ... DESCRIPTION co retrieves a revision from each RCS file and stores it into the corresponding working file. Pathnames matching an RCS suffix denote RCS files; all others denote working files. Names are paired as explained in ci(1). Revisions of an RCS file may be checked out locked or unlocked. Locking a revision prevents overlapping updates. A revision checked out for reading or processing (e.g., compiling) need not be locked. A revision checked out for editing and later checkin must normally be locked. Checkout with locking fails if the revision to be checked out is currently locked by another user. (A lock may be broken with rcs(1).) Checkout with locking also requires the caller to be on the access list of the RCS file, unless he is the owner of the file or the superuser, or the access list is empty. Checkout without locking is not subject to accesslist restrictions, and is not affected by the presence of locks. A revision is selected by options for revision or branch number, checkin date/time, author, or state. When the selection options are applied in combination, co retrieves the latest revision that satisfies all of them. If none of the selection options is specified, co retrieves the latest revision on the default branch (normally the trunk, see the -b option of rcs(1)). A revision or branch number may be attached to any of the options -f, -I, -l, -M, -p, -q, -r, or -u. The options -d (date), -s (state), and -w (author) retrieve from a single branch, the selected branch, which is either specified by one of -f, ..., -u, or the default branch. A co command applied to an RCS file with no revisions creates a zero- length working file. co always performs keyword substitution (see below). OPTIONS -r[rev] retrieves the latest revision whose number is less than or equal to rev. If rev indicates a branch rather than a revision, the latest revision on that branch is retrieved. If rev is omitted, the latest revision on the default branch (see the -b option of rcs(1)) is retrieved. If rev is $, co determines the revision number from keyword values in the working file. Otherwise, a revision is composed of one or more numeric or symbolic fields separated by periods. The numeric equivalent of a symbolic field is specified with the -n option of the commands ci(1) and rcs(1). - 1 - Formatted: December 22, 1993 1991/08/19 -l[rev] same as -r, except that it also locks the retrieved revision for the caller. -u[rev] same as -r, except that it unlocks the retrieved revision if it was locked by the caller. If rev is omitted, -u retrieves the revision locked by the caller, if there is one; otherwise, it retrieves the latest revision on the default branch. -f[rev] forces the overwriting of the working file; useful in connection with -q. See also FILE MODES below. -kkv Generate keyword strings using the default form, e.g. $Revision: 5.7 $ for the Revision keyword. A locker's name is inserted in the value of the Header, Id, and Locker keyword strings only as a file is being locked, i.e. by ci -l and co -l. This is the default. -kkvl Like -kkv, except that a locker's name is always inserted if the given revision is currently locked. -kk Generate only keyword names in keyword strings; omit their values. See KEYWORD SUBSTITUTION below. For example, for the Revision keyword, generate the string $Revision$ instead of $Revision: 5.7 $. This option is useful to ignore differences due to keyword substitution when comparing different revisions of a file. -ko Generate the old keyword string, present in the working file just before it was checked in. For example, for the Revision keyword, generate the string $Revision: 1.1 $ instead of $Revision: 5.7 $ if that is how the string appeared when the file was checked in. This can be useful for binary file formats that cannot tolerate any changes to substrings that happen to take the form of keyword strings. -kv Generate only keyword values for keyword strings. For example, for the Revision keyword, generate the string 5.7 instead of $Revision: 5.7 $. This can help generate files in programming languages where it is hard to strip keyword delimiters like $Revision: $ from a string. However, further keyword substitution cannot be performed once the keyword names are removed, so this option should be used with care. Because of this danger of losing keywords, this option cannot be combined with -l, and the owner write permission of the working file is turned off; to edit the file later, check it out again without -kv. - 2 - Formatted: December 22, 1993 1991/08/19 -p[rev] prints the retrieved revision on the standard output rather than storing it in the working file. This option is useful when co is part of a pipe. -q[rev] quiet mode; diagnostics are not printed. -I[rev] interactive mode; the user is prompted and questioned even if the standard input is not a terminal. -ddate retrieves the latest revision on the selected branch whose checkin date/time is less than or equal to date. The date and time may be given in free format. The time zone LT stands for local time; other common time zone names are understood. For example, the following dates are equivalent if local time is January 11, 1990, 8pm Pacific Standard Time, eight hours west of Coordinated Universal Time (UTC): 8:00 pm lt 4:00 AM, Jan. 12, 1990 note: default is UTC 1990/01/12 04:00:00 RCS date format Thu Jan 11 20:00:00 1990 LT output of ctime(3) + LT Thu Jan 11 20:00:00 PST 1990 output of date(1) Fri Jan 12 04:00:00 GMT 1990 Thu, 11 Jan 1990 20:00:00 -0800 Fri-JST, 1990, 1pm Jan 12 12-January-1990, 04:00-WET Most fields in the date and time may be defaulted. The default time zone is UTC. The other defaults are determined in the order year, month, day, hour, minute, and second (most to least significant). At least one of these fields must be provided. For omitted fields that are of higher significance than the highest provided field, the time zone's current values are assumed. For all other omitted fields, the lowest possible values are assumed. For example, the date 20, 10:30 defaults to 10:30:00 UTC of the 20th of the UTC time zone's current month and year. The date/time must be quoted if it contains spaces. -M[rev] Set the modification time on the new working file to be the date of the retrieved revision. Use this option with care; it can confuse make(1). -sstate retrieves the latest revision on the selected branch whose state is set to state. -w[login] retrieves the latest revision on the selected branch which was - 3 - Formatted: December 22, 1993 1991/08/19 checked in by the user with login name login. If the argument login is omitted, the caller's login is assumed. -jjoinlist generates a new revision which is the join of the revisions on joinlist. This option is largely obsoleted by rcsmerge(1) but is retained for backwards compatibility. The joinlist is a comma-separated list of pairs of the form rev2:rev3, where rev2 and rev3 are (symbolic or numeric) revision numbers. For the initial such pair, rev1 denotes the revision selected by the above options -f, ..., -w. For all other pairs, rev1 denotes the revision generated by the previous pair. (Thus, the output of one join becomes the input to the next.) For each pair, co joins revisions rev1 and rev3 with respect to rev2. This means that all changes that transform rev2 into rev1 are applied to a copy of rev3. This is particularly useful if rev1 and rev3 are the ends of two branches that have rev2 as a common ancestor. If rev1f.merged.c Then examine f.merged.c. Alternatively, if you want to save the updates to 2.8 in the RCS file, check them in as revision 2.8.1.1 and execute co -j: ci -r2.8.1.1 f.c co -r3.4 -j2.8:2.8.1.1 f.c As another example, the following command undoes the changes between revision 2.4 and 2.8 in your currently checked out revision in f.c. rcsmerge -r2.8 -r2.4 f.c Note the order of the arguments, and that f.c will be overwritten. ENVIRONMENT RCSINIT options prepended to the argument list, separated by spaces. See ci(1) for details. DIAGNOSTICS Exit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble. IDENTIFICATION Author: Walter F. Tichy. Revision Number: 5.3; Release Date: 1991/08/19. Copyright c 1982, 1988, 1989 by Walter F. Tichy. Copyright c 1990, 1991 by Paul Eggert. SEE ALSO ci(1), co(1), ident(1), merge(1), rcs(1), rcsdiff(1), rcsintro(1), rlog(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. - 2 - Formatted: February 11, 1994 1991/08/22 NAME rlog - print log messages and other information about RCS files SYNOPSIS rlog [ options ] file ... DESCRIPTION rlog prints information about RCS files. Pathnames matching an RCS suffix denote RCS files; all others denote working files. Names are paired as explained in ci(1). rlog prints the following information for each RCS file: RCS pathname, working pathname, head (i.e., the number of the latest revision on the trunk), default branch, access list, locks, symbolic names, suffix, total number of revisions, number of revisions selected for printing, and descriptive text. This is followed by entries for the selected revisions in reverse chronological order for each branch. For each revision, rlog prints revision number, author, date/time, state, number of lines added/deleted (with respect to the previous revision), locker of the revision (if any), and log message. All times are displayed in Coordinated Universal Time (UTC). Without options, rlog prints complete information. The options below restrict this output. -L Ignore RCS files that have no locks set. This is convenient in combination with -h, -l, and -R. -R Print only the name of the RCS file. This is convenient for translating a working pathname into an RCS pathname. -h Print only the RCS pathname, working pathname, head, default branch, access list, locks, symbolic names, and suffix. -t Print the same as -h, plus the descriptive text. -b Print information about the revisions on the default branch, normally the highest branch on the trunk. -ddates Print information about revisions with a checkin date/time in the ranges given by the semicolon-separated list of dates. A range of the form d1d1 selects the revisions that were deposited between d1 and d2 inclusive. A range of the form selects all revisions dated d or earlier. A range of the form d< or >d selects all revisions dated d or later. A range of the form d selects the single, latest revision dated d or earlier. The date/time strings d, d1, and d2 are in the free format explained in co(1). Quoting is normally necessary, especially for < and >. Note that the separator is a semicolon. - 1 - Formatted: February 11, 1994 1991/08/22 -l[lockers] Print information about locked revisions only. In addition, if the comma-separated list lockers of login names is given, ignore all locks other than those held by the lockers. For example, rlog -L -R -lwft RCS/* prints the name of RCS files locked by the user wft. -r[revisions] prints information about revisions given in the comma-separated list revisions of revisions and ranges. A range rev1:rev2 means revisions rev1 to rev2 on the same branch, :rev means revisions from the beginning of the branch up to and including rev, and rev: means revisions starting with rev to the end of the branch containing rev. An argument that is a branch means all revisions on that branch. A range of branches means all revisions on the branches in that range. A branch followed by a . means the latest revision in that branch. A bare -r with no revisions means the latest revision on the default branch, normally the trunk. -sstates prints information about revisions whose state attributes match one of the states given in the comma-separated list states. -w[logins] prints information about revisions checked in by users with login names appearing in the comma-separated list logins. If logins is omitted, the user's login is assumed. -Vn Emulate RCS version n when generating logs. See co(1) for more. -xsuffixes Use suffixes to characterize RCS files. See ci(1) for details. rlog prints the intersection of the revisions selected with the options -d, -l, -s, and -w, intersected with the union of the revisions selected by -b and -r. EXAMPLES rlog -L -R RCS/* rlog -L -h RCS/* rlog -L -l RCS/* rlog RCS/* The first command prints the names of all RCS files in the subdirectory RCS that have locks. The second command prints the headers of those files, and the third prints the headers plus the log messages of the locked revisions. The last command prints complete information. ENVIRONMENT RCSINIT options prepended to the argument list, separated by spaces. See - 2 - Formatted: February 11, 1994 1991/08/22 ci(1) for details. DIAGNOSTICS The exit status is zero if and only if all operations were successful. IDENTIFICATION Author: Walter F. Tichy. Revision Number: 5.3; Release Date: 1991/08/22. Copyright c 1982, 1988, 1989 by Walter F. Tichy. Copyright c 1990, 1991 by Paul Eggert. SEE ALSO ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. BUGS The separator for revision ranges in the -r option used to be - instead of :, but this leads to confusion when symbolic names contain -. For backwards compatibility rlog -r still supports the old - separator, but it warns about this obsolete use. - 3 - Formatted: February 11, 1994 1991/11/03 NAME rcsclean - clean up working files SYNOPSIS rcsclean [options] [ file ... ] DESCRIPTION rcsclean removes working files that were checked out and never modified. For each file given, rcsclean compares the working file and a revision in the corresponding RCS file. If it finds a difference, it does nothing. Otherwise, it first unlocks the revision if the -u option is given, and then removes the working file unless the working file is writable and the revision is locked. It logs its actions by outputting the corresponding rcs -u and rm -f commands on the standard output. If no file is given, all working files in the current directory are cleaned. Pathnames matching an RCS suffix denote RCS files; all others denote working files. Names are paired as explained in ci(1). The number of the revision to which the working file is compared may be attached to any of the options -n, -q, -r, or -u. If no revision number is specified, then if the -u option is given and the caller has one revision locked, rcsclean uses that revision; otherwise rcsclean uses the latest revision on the default branch, normally the root. rcsclean is useful for clean targets in Makefiles. See also rcsdiff(1), which prints out the differences, and ci(1), which normally asks whether to check in a file if it was not changed. OPTIONS -ksubst Use subst style keyword substitution when retrieving the revision for comparison. See co(1) for details. -n[rev] Do not actually remove any files or unlock any revisions. Using this option will tell you what rcsclean would do without actually doing it. -q[rev] Do not log the actions taken on standard output. -r[rev] This option has no effect other than specifying the revision for comparison. -u[rev] Unlock the revision if it is locked and no difference is found. - 1 - Formatted: February 11, 1994 1991/11/03 -Vn Emulate RCS version n. See co(1) for details. -xsuffixes Use suffixes to characterize RCS files. See ci(1) for details. EXAMPLES rcsclean *.c *.h removes all working files ending in .c or .h that were not changed since their checkout. rcsclean removes all working files in the current directory that were not changed since their checkout. FILES rcsclean accesses files much as ci(1) does. ENVIRONMENT RCSINIT options prepended to the argument list, separated by spaces. A backslash escapes spaces within an option. The RCSINIT options are prepended to the argument lists of most RCS commands. Useful RCSINIT options include -q, -V, and -x. DIAGNOSTICS The exit status is zero if and only if all operations were successful. Missing working files and RCS files are silently ignored. IDENTIFICATION Author: Walter F. Tichy. Revision Number: 1.8; Release Date: 1991/11/03. Copyright c 1982, 1988, 1989 by Walter F. Tichy. Copyright c 1990, 1991 by Paul Eggert. SEE ALSO ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. BUGS At least one file must be given in older Unix versions that do not provide the needed directory scanning operations. - 2 - Formatted: February 11, 1994