.\" $OpenBSD: cvs.1,v 1.66 2005/05/24 04:12:25 jfb Exp $ .\" .\" Copyright (c) 2004 Jean-Francois Brousseau .\" Copyright (c) 2004, 2005 Xavier Santolaria .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY .\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL .\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, .\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; .\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd May 16, 2004 .Dt CVS 1 .Os .Sh NAME .Nm cvs .Nd OpenCVS Concurrent Versioning System client .Sh SYNOPSIS .Nm .Op Fl flQqtv .Op Fl d Ar root .Op Fl e Ar editor .Xo .Oo Fl s .Ar var Ns = Ns Ar val Oc .Xc .Op Fl z Ar level .Ar command Op Ar ... .Sh DESCRIPTION The .Nm program acts as both client and server for the use of and administration of a CVS source repository. CVS is used to maintain version information on files that are kept in a repository. Although it is more commonly used to track changes in source code, there are no real limitations to the type of files that you can store in a repository. For a general introduction to CVS, see .Xr cvsintro 7 . .Pp .Nm reads its startup configuration file, .Pa .cvsrc , from the home directory of the user who invoked it. This file is used to specify implicit options passed to .Nm or one of its commands whenever it is invoked. The defaults in the configuration file can be overridden with the .Fl f option (see below). See .Xr cvsrc 5 for further information. .Pp The following options are supported: .Bl -tag -width Ds .It Fl d Ar root Use .Ar root as the path to the root directory of the CVS repository. The value must specify an absolute path. .It Fl e Ar editor Use the program .Ar editor whenever editing log information. This option overrides the environment variables CVSEDITOR, VISUAL, and EDITOR. .It Fl f Do not read the user's configuration file on startup. .It Fl l Suppress logging of history information. .It Fl Q Be extra quiet. Only error messages will be displayed. .It Fl q Be quiet about reporting. .It Fl s Ar var Ns = Ns Ar val Set the value of the internal variable .Ar var to the string .Ar val . .It Fl t Trace program execution. .It Fl v Display version information and exit. .It Fl z Ar level Specify the compression level to .Xr gzip 1 when transferring files. The compression level ranges from 1 to 9, with 1 being the fastest, and 9 providing the best level of compression. The default is 6. .El .Sh KEYWORD SUBSTITUTION As long as you edit source files inside a working directory you can always find out the state of your files via the .Ic status or .Ic log commands, but as soon as files get exported from your local working copy, it becomes harder to identify which revisions they are. .Pp .Nm can use a mechanism known as .Sq keyword substitution to help identify the files. Embedded strings of the form $keyword$ and $keyword:...$ in a file are replaced with strings of the form $keyword: value$ whenever you obtain a new revision of the file. The possible keywords are as follows: .Bl -tag -width Ds .It $\&Author$ The name of the user who checked in the revision. .It $\&Date$ The date and hour (UTC) the revision was checked in. .It $\&Header$ Standard header containing the full pathname of the RCS file, the revision number, the date (UTC), the author and the state. .It $\&Id$ The same content as $\&Header$ but without the path of the RCS file. .It $\&Log$ The log message supplied during commit, preceded by a header containing the RCS filename, the revision number, the author, and the date (UTC). .It $\&Name$ The tag name used to check out the file. .It $\&RCSfile$ The name of the RCS file, but without a path. .It $\&Revision$ The revision number assigned to the revision. .It $\&Source$ The full pathname of the RCS file. .It $\&State$ The state assigned to the revision. .El .Pp Keyword substitution has its disadvantages: sometimes the literal text string $\&Author$ is wanted inside a file without .Nm interpreting it as a keyword and expanding it into something like $\&Author$. The .Fl k Ar o option can be used to turn off keyword substitution entirely though. There is unfortunately no way to selectively turn off keyword substitution. .Pp Each file and working directory copy of a file have a stored default substitution mode. Substitution modes on files are set by the .Fl k Ar mode option to the .Ic add and .Ic admin commands or by the .Fl k Ar mode or .Fl A options to the .Ic checkout or .Ic update commands. .Pp The possible substitution modes are as follows: .Bl -tag -width Ds -offset 3n .It Fl k Ar b Like .Fl k Ar o , but also avoids the conversion of line endings. This option is used to handle binary files. .It Fl k Ar k Does not substitute the keywords. Useful with the .Ic diff command to avoid displaying the differences between keyword substitutions. .It Fl k Ar kv The default behaviour. Keywords are normally substituted i.e. $\&Revision$ becomes $\&Revision: 1.1 $. .It Fl k Ar kvl Like .Fl k Ar kv , except that the locker's name is displayed along with the version if the given revision is currently locked. This option is normally not useful as .Nm does not use file locking by default. .It Fl k Ar o No substitutions are done. This option is often used with the .Ic import command to guarantee that files that already contain external keywords do not get modified. .It Fl k Ar v Substitute the value of keywords instead of keywords themselves e.g. instead of $\&Revision$, only insert 1.1 and not $\&Revision: 1.1 $. This option must be used with care, as it can only be used once. It is often used with the .Ic export command to freeze the values before releasing software. .El .Sh COMMANDS The following commands are supported by .Nm : .Bl -tag -width Ds .It Xo Ic add .Op Fl k Ar mode .Op Fl m Ar msg .Ar file ... .Xc Before a file is known to .Nm , it must be added to the repository using this command. Adding a file does not actually publish the contents of the file: the .Ic commit command must also be used to publish it into the repository, and thus let others access the file. .Pp Note: since directories have no versioning system, it is sufficient to add them with the .Ic add command alone; the .Ic commit command is not necessary. .Pp The .Ic add command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl k Ar mode Specify the keyword substitution mode. .It Fl m Ar msg Attach log message .Ar msg . By default, no log message is required. .El .Pp Aliases: .Ic ad , .Ic new . .It Xo Ic admin .Op Fl Iq .Op Fl b Ar branch .Op Fl k Ar mode .Op Fl m Ar rev : Ns Ar msg .Oo Fl N Ar tag Ns .Op : Ns Ar rev Oc .Oo Fl n Ar tag Ns .Op : Ns Ar rev Oc .Op Fl o Ar rev .Oo Fl s Ar state Ns .Op : Ns Ar rev Oc .Oo Fl t Ar file \*(Ba .Ar str Oc .Xc The .Ic admin command is used to directly modify the RCS files. .Pp The .Ic admin command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl b Ar branch Set the default branch to .Ar branch . .It Fl I Command is interactive. .It Fl k Specify the keyword substitution mode. .It Fl m Ar rev : Ns Ar msg Change the log message of a revision. .It Xo Fl N .Ar tag Ns Op : Ns Ar rev .Xc Same as .Fl n , but override tag if it already exists. .It Xo Fl n .Ar tag Ns Op : Ns Ar rev .Xc Associate the .Ar tag with the .Ar rev or the branch given as argument. If the revision or the branch is not specified, the tag is deleted. The .Sq \&: character means the association of the tag and the latest revision of the default branch. A branch number ending with the .Sq \&. character means the current latest revision in the branch. This option is functionally the same as the .Ic rtag command, but it avoids the check of the tags done with the .Pa CVSROOT/taginfo file. .It Fl o Ar rev Delete one or more revisions. The specifications of the values or revisions are as follows: .Bl -tag -width Ds .It rev Specific revision. .It rev1:rev2 Delete all revisions of a branch between .Ar rev1 and .Ar rev2 . .It rev1::rev2 Delete all revisions of a branch between .Ar rev1 and .Ar rev2 without deleting revisions .Ar rev1 and .Ar rev2 . .It :rev Delete all revisions of the branch until revision .Ar rev . .It rev: Delete all revisions of the branch from revision .Ar rev until the last revision of the branch. .El .It Fl q Quiet mode. .It Xo Fl s .Ar state Ns Op : Ns Ar rev .Xc Change state of a revision. If the revision is not specified, the last revision of the default branch changes state. The .Ic state is a string of characters of your choice. The state of a revision can be modified without having to .Ic commit a new revision. The default .Ic state is .Sq Exp (Experimental). For instance, you could also use .Sq Dev or .Sq Reviewed . .It Fl t Ar file \*(Ba Ar str Change the descriptive text. The descriptive text is taken from the .Ar file specified as argument or from the string .Ar str given as argument if it is preceded by the .Sq - character. If no argument is used, the descriptive text is taken from standard input. .El .Pp Aliases: .Ic adm , .Ic rcs . .It Xo Ic annotate .Op Fl flR .Oo Fl D Ar date \*(Ba .Fl r Ar rev Oc .Op Ar file ... .Xc For each line of any files specified, show information about its last revision. The information given is the last revision when a modification occurred, the author's name, and the date of the revision. .Pp The .Ic annotate command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl D Ar date Show the annotations as of the latest revision no later than .Ar date . .It Fl f Force the use of the head revision if the specified tag or date is not found. This can be used in combination with .Fl D or .Fl r to ensure that there is some output from the .Ic annotate command, even if only to show Revision 1.1 of the file. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .It Fl r Ar rev Show annotations as of revision .Ar rev (can be a revision number or a tag). .El .Pp Aliases: .Ic ann , .Ic blame . .It Xo Ic checkout .Op Fl AcflNnPpRs .Op Fl d Ar dir .Op Fl j Ar rev .Op Fl k Ar mode .Fl D Ar date \*(Ba .Fl r Ar rev .Ar module ... .Xc .Pp The .Ic checkout command is used to create a local copy of one or more modules present on the target CVS repository. .Pp The .Ic checkout command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl A Reset any sticky tags, dates, or keyword substitution modes that have been set on the tree. .It Fl c Display the list of available modules. .It Fl D Ar date Check out as of the latest revision no later than .Ar date (is sticky). .It Fl d Ar dir Check out in directory .Ar dir instead of the directory bearing the same name as the .Ar module . .It Fl f Force the use of the head revision if the specified tag or date is not found. .It Fl j Ar rev Merge in changes made between current revision and .Ar rev . If two .Fl j options are specified, only merge the differences between the two revisions of the branch. This allows successive merges without having to resolve already resolved conflicts again. .It Fl k Ar mode Specify the keyword substitution mode (is sticky). .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl N If used in conjunction with the .Fl d option, files are placed in local directory .Ar module , located in directory .Ar dir . .It Fl n Do not execute programs listed in the .Pa CVSROOT/modules file. .It Fl P Prune empty directories. .It Fl p Check out files to standard output (avoids stickiness). .It Fl R Enable recursive behaviour. This is the default. .It Fl r Ar rev Check out from a particular revision or branch (implies .Fl P ) (is sticky). .It Fl s Like .Fl c , but include module status. .El .Pp Aliases: .Ic co , .Ic get . .It Xo Ic commit .Op Fl flnR .Oo Fl F Ar logfile \*(Ba .Fl m Ar msg Oc .Op Fl r Ar rev .Op Ar file ... .Xc .Pp The .Ic commit command is used to send local changes back to the server and update the repository's information to reflect the changes. .Pp The .Ic commit command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl F Ar logfile Specify a .Ar file which contains the log message. .It Fl f Force a file to be committed, even though it is unchanged. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl m Ar msg Specify a log message on the command line (suppresses the editor invocation). .It Fl n Do not execute programs listed in the .Pa CVSROOT/modules file. .It Fl R Enable recursive behaviour. This is the default. .It Fl r Ar rev Commit to a particular symbolic or numerical revision. .El .Pp Aliases: .Ic ci , .Ic com . .It Xo Ic diff .Op Fl cilNnpRu .Oo Oo Fl D .Ar date1 \*(Ba .Fl r Ar rev1 Oc .Oo Fl D Ar date2 \*(Ba .Fl r Ar rev2 Oc Oc .Op Fl k Ar mode .Op Ar file ... .Xc .Pp The .Ic diff command is very similar to the .Xr diff 1 program, except that the differential comparisons that it generates are between local or remote revisions of files stored in the CVS repository. .Pp The .Ic diff command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl c Produces a diff with three lines of context. See .Xr diff 1 for more information. .It Xo Fl D Ar date1 .Op Fl D Ar date2 .Xc Differences between the revision at .Ar date1 and the working copy or .Ar date1 and .Ar date2 (if specified). .It Fl i Ignore the case of letters. For example, .Sq A will compare equal to .Sq a . .It Fl k Ar mode Specify the keyword substitution mode. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl N Include added or removed files. .It Fl n Produces a diff in the same format as that used by .Xr rcsdiff 1 , with a count of changed lines on each insert or delete command. .It Fl p With unified and context diffs, show with each change the first 40 characters of the last line before the context beginning with a letter, an underscore or a dollar sign. See .Xr diff 1 for more information. .It Fl R Enable recursive behaviour. This is the default. .It Xo Fl r Ar rev1 .Op Fl r Ar rev2 .Xc Differences between revision .Ar rev1 and the working copy or .Ar rev1 and .Ar rev2 (if specified). .It Fl u Produces a unified diff with three lines of context. See .Xr diff 1 for more information. .El .Pp Aliases: .Ic di , .Ic dif . .It Xo Ic edit Op Fl lR .Op Fl a Ar action .Op Ar file ... .Xc .Pp The .Ic edit command is used to make a file that is being watched (and therefore read-only) readable and writable and to inform others that you are planning to edit it. Notifications terminate when the .Ic commit command is issued. Editing rights on the file can be given up using the .Ic unedit command, which terminates the temporary notifications. .Pp The .Ic edit command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl a Ar action Specify the temporary notification wanted: .Pp .Bl -tag -width Ds -compact .It Cm commit Another user has committed changes to the file. .It Cm edit Another user has issued the .Ic edit command on the file. .It Cm unedit Another user has issued the .Ic unedit command on the file. .It Cm all All of the above. .It Cm none None of the above. .El .Pp The .Fl a flag may appear more than once, or not at all. If omitted, the action defaults to .Cm all . .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .El .It Xo Ic editors .Op Fl lR .Op Ar file ... .Xc .Pp The .Ic editors command lists the users with edition rights on a file. For that, pseudo-lock mode must be enabled (see the .Ic watch command). The e-mail address of the user editing the file, the timestamp when the edition first started, the host from where the edition has been requested and the path to the edited file are listed. .Pp The .Ic editors command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .El .It Xo Ic export .Op Fl flNnR .Op Fl d Ar dir .Op Fl k Ar mode .Fl D Ar date \*(Ba .Fl r Ar rev .Ar module ... .Xc .Pp The .Ic export command extracts a copy of .Ar module without including the directories used for management by .Nm . This eases production of a software release. A date or a revision must be specified for the command to be valid, which ensures that later extractions can be reproduced with the same options as the release. .Pp The checked out module's files will be placed in a directory bearing the same name as the checked out module, by default. .Pp The .Ic export command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl D Ar date Export as of the latest revision no later than .Ar date . .It Fl d Ar dir Export in directory .Ar dir instead of the directory bearing the same name as the .Ar module . .It Fl f Force the use of the head revision if the specified tag or date is not found. This can be used in combination with .Fl D or .Fl r to ensure that the .Ic export command is valid. .It Fl k Ar mode Specify the keyword substitution mode: the .Fl k Ar v option is often used to avoid substitution of keywords during a release cycle. However, be aware that it does not handle an export containing binary files correctly. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl N If used in conjunction with the .Fl d option, files are placed in local directory .Ar module , located in directory .Ar dir . .It Fl n Do not execute programs listed in the .Pa CVSROOT/modules file. .It Fl R Enable recursive behaviour. This is the default. .It Fl r Ar rev Export from a particular symbolic or numerical revision. .El .Pp Aliases: .Ic ex , .Ic exp . .It Xo Ic history .Op Fl aceloTw .Op Fl b Ar str .Op Fl D Ar date .Op Fl f Ar file .Op Fl m Ar module .Op Fl n Ar module .Op Fl p Ar path .Op Fl r Ar rev .Op Fl t Ar tag .Op Fl u Ar user .Op Fl x Ar ACEFGMORTUW .Op Fl z Ar tz .Op Ar file ... .Xc .Pp The .Ic history command is used to display the history of actions done in the base repository. This functionality is only available if the .Pa CVSROOT/history file has been created. Only the .Ic checkout , .Ic commit , .Ic export , .Ic release , .Ic rtag , and .Ic update commands are logged into this file. .Pp The .Ic history command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl a Display records for all users. By default, only records from the user issuing the .Ic history command are displayed. .It Fl b Ar str Display everything back to a record containing the string .Ar str in either the module name, the file name, or the repository path. .It Fl c Display the archived files .Pf ( Ic commit command). .It Fl D Ar date Report no later than .Ar date . .It Fl e Select all records (same as .Fl x with all types). .It Fl f Ar file Display records related to .Ar file . .It Fl l Show last checkouts of modules with the .Ic checkout command. .It Fl m Ar module Look for the .Ar module (can be used several times). .It Fl n Ar module Search into the .Ar module . .It Fl o Report on modules checked out by users. .It Fl p Ar path Display records from the base repository being in the directory specified by the .Ar path . .It Fl r Ar rev Report for a particular revision (checks in the RCS file). .It Fl t Ar tag Report since tag record placed in the .Pa CVSROOT/history file by any user. .It Fl T Report on all tags. .It Fl u Ar user Report for a specified .Ar user . Can be used several times to match many users. .It Fl w Check that records match the current working directory. .It Fl x Ar ACEFGMORTUW Extract by a specific record type specified by a single letter. They can be used in combination. The available types are as follows: .Bl -tag -width Ds .It A A file has been added with the .Ic add command. .It C A merge has been done, but unresolved conflicts still remain. .It E Export. .It F Release. .It G A merge has been done without conflict. .It M A file has been modified (using the .Ic commit command). .It O Checkout. .It R A file has been removed with the .Ic remove command. .It T Rtag. .It U Normal update. .It W The file has been deleted from the directory because it does not exist anymore in the base repository. .El .It Fl z Ar tz Display records with time synchronized with the .Ar timezone passed as argument. .El .Pp All records have the following five first columns: .Pp .Bl -dash -compact .It The record type (the .Fl x option). .It The date of the action. .It The time of the action. .It The time zone. .It The user who made the action. .El .Pp The other columns vary depending on the command issued: .Pp For records coming from the .Ic rtag command, the additional columns are as follows: .Bd -literal -offset indent [:] {} .Ed .Pp For records coming from the .Ic checkout and .Ic export commands, the additional columns are as follows: .Bd -literal -offset indent == .Ed .Pp For records coming from the .Ic release command, the additional columns are as follows: .Bd -literal -offset indent == .Ed .Pp For records coming from the .Ic commit and .Ic update commands, the additional columns are as follows: .Bd -literal -offset indent == .Ed .Pp Aliases: .Ic hi , .Ic his . .It Xo Ic import .Op Fl b Ar branch .Op Fl m Ar msg .Ar repository .Ar vendortag .Ar releasetag .Xc .Pp Import sources into CVS using vendor branches. .Pp At least three arguments are required: .Ar repository specifies the location of the sources to be imported; .Ar vendortag is a tag for the entire branch; .Ar releasetag is used to identify the files you created with .Ic cvs import . .Pp The .Ic import command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl b Ar branch Specify the first-level branch number. .It Fl m Ar msg Specify the log message to send. .El .Pp Aliases: .Ic im , .Ic imp . .It Ic init Create a CVS repository if it doesn't exist. .It Ic kserver Start a Kerberos authentication server. .It Xo Ic log .Op Fl bhlNRt .Op Fl d Ar dates .Op Fl r Ar revs .Op Fl s Ar state .Op Fl w Ar users .Op Ar file ... .Xc .Pp The .Ic log command displays information on a .Ar file such as its different revisions, description, different tags, as well as the comments, dates, and authors of these revisions. By default, the .Ic log command displays all the available information; the options are only used to restrict the displayed information. .Pp The .Ic log command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl b List revisions of the default branch only. .It Fl d Ar dates Specify revisions with dates matching the specification. The specification might be as follows: .Bl -tag -width Ds .It D1>D2 or D2>D1 Select all revisions between .Ar \&D1 and .Ar D2 . .It Select all revisions before .Ar D . .It >D or D< Select all revisions after .Ar D . .It D Select the latest revision before or equal to .Ar D . .El .Pp The .Sq \*(Gt and .Sq \*(Lt characters can be followed by the .Sq = character to imply an inclusive specification. Several specifications can be used by separating them with the .Sq \&; character. .It Fl h Print header only. .It Fl l Limit the scope of the search to the local directory only. .It Fl N Do not list tags. .It Fl R Print name of RCS file only. .It Fl r Ar revs Specify revision(s) to list: .Bl -tag -width Ds .It REV1,REV2,..., A list of revisions is specified by separating names or numbers of revisions by the .Sq \&, character. .It REV1:REV2 List all revisions between .Ar REV1 and .Ar REV2 (they must be on the same branch). .It :REV List all revisions since the beginning of the branch until .Ar REV included. .It REV: List all revisions of the branch beginning with .Ar REV . .It BRANCH List all revisions of a branch. .It BRANCH. List the latest revision of the branch .Ar BRANCH . .It BRANCH1:BRANCH2 List all revisions of branches between .Ar BRANCH1 and .Ar BRANCH2 . .El .Pp Without argument, the .Fl r option means the latest revision of the default branch. .It Fl s Ar state List revisions of the specified .Ar state only. Several states can be listed by separating them with the .Sq \&, character. .It Fl t Print header and description only. .It Fl w Ar users Do not list revisions made by specified .Ar users . Usernames should be separated by the .Sq \&, character. .El .Pp Aliases: .Ic lo . .It Ic login Prompt for a password for an authenticating server. .It Ic logout Remove an entry in .Pa .cvspass for a remote repository. .It Xo Ic rdiff .Op Fl flR .Oo Fl c \*(Ba .Fl u Oc .Oo Fl s \*(Ba .Fl t Oc .Op Fl V Ar ver .Fl D Ar date \*(Ba .Fl r Ar rev .Oo Fl D Ar date2 \*(Ba .Fl r Ar rev2 Oc .Ar module ... .Xc .Pp The .Ic rdiff command lists differences between two revisions in a .Xr patch 1 compatible format. This command does not need a local checkout of the repository to work. .Pp The .Ic rdiff command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl c Produces a diff with three lines of context. See .Xr diff 1 for more information. This is the default. .It Xo Fl D Ar date .Op Fl D Ar date2 .Xc Differences between the revision at .Ar date and the working copy or .Ar date and .Ar date2 (if specified). .It Fl f Force the use of the head revision if the specified date or revision is not found. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .It Xo Fl r Ar rev .Op Fl r Ar rev2 .Xc Differences between revision .Ar rev and the working copy or .Ar rev and .Ar rev2 (if specified). .It Fl s Create a summary change instead of a whole patch. .It Fl t Lists differences between the last two revisions of each file. .It Fl u Produces a diff in unidiff format. .It Fl V Ar ver Use the RCS version .Ar ver for keyword substitution. .El .Pp Aliases: .Ic pa , .Ic patch . .It Xo Ic release .Op Fl d .Ar dir ... .Xc The .Ic release command indicates to .Nm that the working copy of a module is no longer in use and checks that non archived modifications in the base repository do exist. This command is not mandatory. Local directories could always be removed without using it, but in this case the handling of history information will no longer be correct (see the .Ic history command). .Pp The .Ic release command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl d Ar dir Remove the directory .Ar dir . Be aware that this option silently removes any directories that have been added to the local working copy without using the .Ic add command. .El .Pp For each file not being synchronized with the base repository, a single letter prefix is given to specify the state of the file. The possible prefixes are as follows: .Bl -tag -width Ds .It \&? The file is unknown to .Nm and is not in the list of files to ignore. Any new directories which have not been added with the .Ic add command are silently ignored as well as their content. .It A The file has been added with the .Ic add command, but has not been committed to the repository with the .Ic commit command. .It M The file has been locally modified; a more recent version might exist in the base repository. .It R The file has been removed with the .Ic remove command, but has not been committed to the repository with the .Ic commit command. .It U A more recent version of the file does exist but it is not locally up to date. .El .Pp Aliases: .Ic re , .Ic rel . .It Xo Ic remove .Op Fl flR .Op Ar file ... .Xc The .Ic remove command is used to inform .Nm that .Ar file is scheduled to be removed from the repository. Files are not actually removed from the repository until the .Ic commit command has been run subsequently. .Pp The .Ic remove command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl f Force local file removal. If this flag is not used, the file must be locally removed beforehand for the command to be valid. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .El .Pp Aliases: .Ic rm , .Ic delete . .It Ic rlog Print out history information for a module. .It Xo Ic rtag .Op Fl abdFflnR .Oo Fl D Ar date \*(Ba .Fl r Ar rev Oc .Ar symbolic_tag .Ar modules ... .Xc The .Ic rtag command adds a symbolic tag to one or more modules. It is often used to create a new branch using the .Fl b option. .Pp The .Ic rtag command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl a Clear tag from files already removed with the .Ic remove command. .It Fl b Create a branch. .It Fl D Ar date Tag the most recent revision before .Ar date . .It Fl d Delete tag. .It Fl F Move tag if it already exists. If this option is not used and a tag is used a second time, .Nm will not execute the action. .It Fl f Force the use of the head revision if the specified revision or date is not found. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl n Do not execute programs listed in the .Pa CVSROOT/modules file. .It Fl R Enable recursive behaviour. This is the default. .It Fl r Ar rev Tag at revision .Ar rev . .El .Pp Aliases: .Ic rt , .Ic rfreeze . .It Ic server Server mode. .It Xo Ic status .Op Fl lRv .Op Ar file ... .Xc The .Ic status command is used to display the state of checked out files. .Pp The .Ic status command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .It Fl v Display symbolic tags for .Ar file . .Pp The state may be one of the following: .Bl -tag -width Ds .It Cm Locally Added The file has been added with the .Ic add command, but has not been committed to the repository with the .Ic commit command. .It Cm Locally Modified The file is up to date, but has been locally modified. .It Cm Locally Removed The file has been removed with the .Ic remove command, but has not been committed to the repository with the .Ic commit command. .It Cm Needs Checkout The file has not been modified; a new version is available. .It Cm Needs Merge The file has been modified and a newer version is available. .It Cm Needs Patch Same as .Ic Needs Checkout but, in client-server mode, only the differences are sent to save network resources. .It Cm Unresolved Conflict A merge has been done, but unresolved conflicts still remain. .It Cm Up-to-date The file is up to date. .El .El .Pp Aliases: .Ic st , .Ic stat . .It Xo Ic tag .Op Fl bcdFflR .Oo Fl D Ar date \*(Ba .Fl r Ar rev Oc .Op Ar symbolic_tag .Op Ar file ... .Xc .Pp The .Ic tag command adds a symbolic tag to a checked out version of one or more files. .Pp The .Ic tag command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl b Create a branch. .It Fl c Check that working files are not modified. .It Fl D Ar date Tag the most recent revision before .Ar date . .It Fl d Delete tag. .It Fl F Move tag if it already exists. If this option is not used and a tag is used a second time, .Nm will not execute the action. .It Fl f Force the use of the head revision if the specified revision or date is not found. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .It Fl r Ar rev Tag at revision .Ar rev . .El .Pp Aliases: .Ic ta , .Ic freeze . .It Xo Ic unedit Op Fl lR .Op Ar file ... .Xc .Pp The .Ic unedit command is used to give up an edition on a file and thus cancel the wanted temporary notifications. If the file has been modified since the .Ic edit command has been issued, .Nm will ask if you want to go back to the previous version, and lose the modifications done on the file, or stay in edition mode on it. .Pp The .Ic unedit command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .El .It Xo Ic update .Op Fl AdflPpR .Oo Fl D Ar date \*(Ba .Fl r Ar rev Oc .Op Fl I Ar ign .Op Fl j Ar rev .Op Fl k Ar mode .Op Fl W Ar spec .Op Ar file ... .Xc .Pp The .Ic update command is used to merge any of the changes that have occurred on the remote repository into the local one where the command was run. .Pp The .Ic update command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl A Reset any sticky tags, dates, or keyword substitution modes that have been set on the tree. .It Fl D Ar date Update as of the latest revision no later than .Ar date (is sticky). .It Fl d Create any new directories. Without this option, .Nm does not create any new files sitting in these new directories added in the base repository since the last update of the working copy, or since the last update with the .Fl d option. .It Fl f Force the use of the head revision if the specified tag or date is not found. .It Fl I Ar ign Ignore files specified by .Ar ign . This option can be used several times on the command line. To see all files, use the .Fl I Ar !\& specification. .It Fl j Ar rev Merge in changes made between current revision and .Ar rev . If two .Fl j options are specified, only merge the differences between the two revisions of the branch. This allows successive merges without having to resolve already resolved conflicts again. .It Fl k Ar mode Specify the keyword substitution mode (is sticky). .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl P Prune any directories that have become empty as a result of the update. .It Fl p Send the result of the update to standard output (avoids stickiness). .It Fl R Enable recursive behaviour. This is the default. .It Fl r Ar rev Update from a particular revision or branch (is sticky). .It Fl W Ar spec Wrappers specification line. .El .Pp By default, the .Ic update command does not create new directories; the .Fl d option must be used for that. .Pp For each file updated, a single letter prefix is given to specify the state of the file. The possible prefixes are as follows: .Bl -tag -width Ds .It \&? The file is unknown to .Nm . .It A The file has been added with the .Ic add command, but has not been committed to the repository with the .Ic commit command. .It C A merge, with a more recent version of the file, has been done, but unresolved conflicts still remain. .It M The file has been locally modified; if a more recent version is available, the merge has been done without conflict. .It P The same as .Sq U , but, in client-server mode, only differences are sent to save network resources. .It R The file has been removed with the .Ic remove command, but has not been committed to the repository with the .Ic commit command. .It U The file is up to date. .El .Pp Aliases: .Ic up , .Ic upd . .It Ic version Causes .Nm to print its version information. If this command is issued within a local copy of a remote repository or if either the .Ev CVSROOT environment variable or the .Fl d flag specify a remote repository, .Nm will also connect to the server and ask it to print its version information. .Pp Aliases: .Ic ve , .Ic ver . .It Xo Ic watch .Ar on | off | add | remove .Op Fl lR .Op Fl a Ar action .Op Ar file ... .Xc .Pp The .Ic watch command switches a file from normal mode to pseudo-lock mode as well as handling the notifications associated with it. Pseudo-lock mode means knowing who is editing a file: for that, .Nm extracts the file in read-only mode. Users must use the .Ic edit command to get the editing rights on the file. .Pp One of the following arguments to the .Ic watch command is mandatory: on, off, add, or remove. .Ar on switches the file into pseudo-lock mode; .Ar off switches it back to normal mode; .Ar add adds notifications for specific actions on the file; .Ar remove removes those notifications. .Pp The notifications are permanent. They remain in place until the .Ic watch remove command is issued while the temporary notifications are made available with the .Ic edit command. .Pp The .Ic watch command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl a Ar action Specify the permanent notification wanted for .Ar add | remove : .Pp .Bl -tag -width Ds -compact .It Cm commit Another user has committed changes to the file. .It Cm edit Another user is editing the file. .It Cm unedit Another user has finished editing the file. .It Cm all All of the above. .It Cm none No notification. .El .Pp If no specification is requested using the .Ar add or .Ar remove arguments, it implies the .Fl a Ar all option. .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .El .It Xo Ic watchers .Op Fl lR .Op Ar file ... .Xc .Pp The .Ic watchers command lists the users who asked for notifications as well as the notifications details. The possible notifications are as follows: .Bl -tag -width Ds .It Cm commit Permanent watch of a commit of a new version of a file. .It Cm edit Permanent watch of the start of file edition. .It Cm tcommit Temporary watch of a commit of new version of a file. .It Cm tedit Temporary watch of the start of file edition. .It Cm tunedit Temporary watch of the end of file edition. .It Cm unedit Permanent watch of the end of file edition. .El .Pp The temporary watches are set using the .Ic edit command, until the .Ic commit or .Ic unedit command is issued on a file. .Pp The .Ic watchers command takes the following options: .Bl -tag -width Ds -offset 3n .It Fl l Limit the scope of the search to the local directory only and disable recursive behaviour. .It Fl R Enable recursive behaviour. This is the default. .El .El .Sh ENVIRONMENT .Bl -tag -width Ds .It Ev CVS_CLIENT_LOG This variable enables logging of all communications between the client and server when running in non-local mode. If set, this environment variable must contain a base path from which two paths will be generated by appending ".in" to the value for the server's input and ".out" for the server's output. .Pp The path can contain the following substitutes: .Pp .Bl -tag -width Ds -offset indent -compact .It %c the command being run .It %d the date .It %p the process ID .It %u the username of the person running it .El .Pp The substitutes are only supported by OpenCVS. .It Ev CVS_RSH Name of the program to use when connecting to the server through a remote shell. The default is to use the .Xr ssh 1 program. .It Ev CVS_SERVER If set, gives the name of the program to invoke as a .Nm server when using remote shell. The default is to use `cvs'. .It Ev CVSEDITOR Name of the editor to use when editing commit messages. Checked before .Ev EDITOR and .Ev VISUAL . .It Ev CVSROOT When set, this variable should contain the string pointing to the root directory of the CVS repository. The contents of this variable are ignored when the .Fl d option is given or if `Root' files exist in the checked-out copy. .It Ev EDITOR Name of the editor to use when editing commit messages. This is traditionally a line-oriented editor, such as .Xr ex 1 . .It Ev VISUAL Name of the editor to use when editing commit messages. This is traditionally a screen-oriented editor, such as .Xr vi 1 . .El .Sh FILES .Bl -tag -width Ds .It Pa $HOME/.cvsrc File containing a list of implicit options to pass to certain commands. This file is read on startup unless the .Fl f option is specified. .It Pa $CVSROOT/CVSROOT Directory containing repository administrative files. .It Pa $CVSROOT/CVSROOT/loginfo File containing associations between modules and handlers for post-commit logging. .El .Sh SEE ALSO .Xr diff 1 , .Xr gzip 1 , .Xr patch 1 , .Xr rcs 1 , .Xr cvsrc 5 , .Xr cvsintro 7 .Sh HISTORY The OpenCVS project is a BSD-licensed rewrite of the original Concurrent Versioning System written by Jean-Francois Brousseau. The original CVS code was written in large parts by Dick Grune, Brian Berliner and Jeff Polk. .Sh AUTHORS .An Jean-Francois Brousseau .An Vincent Labrecque .An Joris Vink .An Xavier Santolaria .Sh CAVEATS This CVS implementation does not fully conform to the GNU CVS version. In some cases, this was done explicitly because GNU CVS has inconsistencies or ambiguous behaviour. Some things have also been left out or modified to enhance the overall security of the system. .Pp Among other things, support for the pserver connection mechanism has been dropped because of security issues with the authentication mechanism.