A.16.1 rdiff options
--------------------

These standard options are supported by `rdiff' (see Common options
for a complete description of them):

`-D DATE'
     Use the most recent revision no later than DATE.

`-f'
     If no matching revision is found, retrieve the most recent
     revision (instead of ignoring the file).

`-k KFLAG'
     Process keywords according to KFLAG.  See Keyword substitution.

`-l'
     Local; don't descend subdirectories.

`-R'
     Examine directories recursively.  This option is on by default.

`-r TAG'
     Use revision TAG.

   In addition to the above, these options are available:

`-c'
     Use the context diff format.  This is the default format.

`-s'
     Create a summary change report instead of a patch.  The summary
     includes information about files that were changed or added
     between the releases.  It is sent to the standard output device.
     This is useful for finding out, for example, which files have
     changed between two dates or revisions.

`-t'
     A diff of the top two revisions is sent to the standard output
     device.  This is most useful for seeing what the last change to a
     file was.

`-u'
     Use the unidiff format for the context diffs.  Remember that old
     versions of the `patch' program can't handle the unidiff format,
     so if you plan to post this patch to the net you should probably
     not use `-u'.

`-V VN'
     Expand keywords according to the rules current in RCS version VN
     (the expansion format changed with RCS version 5).  Note that this
     option is no longer accepted.  CVS will always expand keywords the
     way that RCS version 5 does.

A.16.2 rdiff examples
---------------------

Suppose you receive mail from foo@example.net asking for an update from
release 1.2 to 1.4 of the tc compiler.  You have no such patches on
hand, but with CVS that can easily be fixed with a command such as this:

     $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \
     > Mail -s 'The patches you asked for' foo@example.net

   Suppose you have made release 1.3, and forked a branch called
`R_1_3fix' for bug fixes.  `R_1_3_1' corresponds to release 1.3.1,
which was made some time ago.  Now, you want to see how much
development has been done on the branch.  This command can be used:

     $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
     cvs rdiff: Diffing module-name
     File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
     File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
     File bar.h,v changed from revision 1.29.2.1 to 1.2

A.17 release--Indicate that a Module is no longer in use
========================================================

   * release [-d] directories...

   * Requires: Working directory.

   * Changes: Working directory, history log.

   This command is meant to safely cancel the effect of `cvs checkout'.
Since CVS doesn't lock files, it isn't strictly necessary to use this
command.  You can always simply delete your working directory, if you
like; but you risk losing changes you may have forgotten, and you leave
no trace in the CVS history file (see history file) that you've
abandoned your checkout.

   Use `cvs release' to avoid these problems.  This command checks that
no uncommitted changes are present; that you are executing it from
immediately above a CVS working directory; and that the repository
recorded for your files is the same as the repository defined in the
module database.

   If all these conditions are true, `cvs release' leaves a record of
its execution (attesting to your intentionally abandoning your
checkout) in the CVS history log.

A.17.1 release options
----------------------

The `release' command supports one command option:

`-d'
     Delete your working copy of the file if the release succeeds.  If
     this flag is not given your files will remain in your working
     directory.

     *WARNING:  The `release' command deletes all directories and files
     recursively.  This has the very serious side-effect that any
     directory created inside checked-out sources, and not added to the
     repository (using the `add' command; see Adding files) will be
     silently deleted--even if it is non-empty!*

A.17.2 release output
---------------------

Before `release' releases your sources it will print a one-line message
for any file that is not up-to-date.

`U FILE'
`P FILE'
     There exists a newer revision of this file in the repository, and
     you have not modified your local copy of the file (`U' and `P'
     mean the same thing).

`A FILE'
     The file has been added to your private copy of the sources, but
     has not yet been committed to the repository.  If you delete your
     copy of the sources this file will be lost.

`R FILE'
     The file has been removed from your private copy of the sources,
     but has not yet been removed from the repository, since you have
     not yet committed the removal.  See commit.

`M FILE'
     The file is modified in your working directory.  There might also
     be a newer revision inside the repository.

`? FILE'
     FILE is in your working directory, but does not correspond to
     anything in the source repository, and is not in the list of files
     for CVS to ignore (see the description of the `-I' option, and
     cvsignore).  If you remove your working sources, this file
     will be lost.

A.17.3 release examples
-----------------------

Release the `tc' directory, and delete your local working copy of the
files.

     $ cd ..         # You must stand immediately above the
                     # sources when you issue `cvs release'.
     $ cvs release -d tc
     You have [0] altered files in this repository.
     Are you sure you want to release (and delete) directory `tc': y
     $

A.18 remove--Remove files from active use
=========================================

   * Synopsis: remove [-flR] [files...]

   * Requires: repository, working directory.

   * Changes: working directory.

   The `remove' command is used to remove unwanted files from active
use.  The user normally deletes the files from the working directory
prior to invocation of the `remove' command.  Only the working
directory is updated.  Changes to the repository are not made until the
`commit' command is run.

   The `remove' command does not delete files from from the repository.
CVS keeps all historical data in the repository so that it is possible
to reconstruct previous states of the projects under revision control.

   To undo CVS `remove' or to resurrect files that were previously
removed, see add.

A.18.1 remove options
---------------------

These standard options are supported by `remove' (see Common options
for a complete description of them):

`-l'
     Local; run only in current working directory.  See Recursive behavior.

`-R'
     Process directories recursively.  See Recursive behavior.

   In addition, these options are also supported:

`-f'
     Note that this is not the standard behavior of the `-f' option as
     defined in Common options.

     Delete files before removing them.

     Entire directory hierarchies are easily removed using `-f', but
     take note that it is not as easy to resurrect directory
     hierarchies as it is to remove them.

A.18.2 remove examples
----------------------

A.18.2.1 Removing a file
........................

     $ cvs remove remove.me
     cvs remove: file `remove.me' still in working directory
     cvs remove: 1 file exists; remove it first
     $ rm -f remove.me
     $ cvs remove remove.me
     cvs remove: scheduling `remove.me' for removal
     cvs remove: use 'cvs commit' to remove this file permanently

     $ ls remove.it
     remove.it
     $ cvs remove -f remove.it
     cvs remove: scheduling `remove.it' for removal
     cvs remove: use 'cvs commit' to remove this file permanently

A.18.2.2 Removing entire directories
....................................

     $ tree -d a
     a
     |-- CVS
     `-- b
         `-- CVS

     3 directories
     $ cvs remove -f a
     cvs remove: Removing a
     cvs remove: Removing a/b
     cvs remove: scheduling `a/b/c' for removal
     cvs remove: use 'cvs commit' to remove this file permanently

A.19 update--Bring work tree in sync with repository
====================================================

   * update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r
     tag|-D date] [-W spec] files...

   * Requires: repository, working directory.

   * Changes: working directory.

   After you've run checkout to create your private copy of source from
the common repository, other developers will continue changing the
central source.  From time to time, when it is convenient in your
development process, you can use the `update' command from within your
working directory to reconcile your work with any revisions applied to
the source repository since your last checkout or update.

A.19.1 update options
---------------------

These standard options are available with `update' (see Common options
for a complete description of them):

`-D date'
     Use the most recent revision no later than DATE.  This option is
     sticky, and implies `-P'.  See Sticky tags for more
     information on sticky tags/dates.

`-f'
     Only useful with the `-D DATE' or `-r TAG' flags.  If no matching
     revision is found, retrieve the most recent revision (instead of
     ignoring the file).

`-k KFLAG'
     Process keywords according to KFLAG.  See Keyword substitution.
     This option is sticky; future updates of this
     file in this working directory will use the same KFLAG.  The
     `status' command can be viewed to see the sticky options.  See
     Invoking CVS for more information on the `status' command.

`-l'
     Local; run only in current working directory.  See Recursive behavior.

`-P'
     Prune empty directories.  See Moving directories.

`-p'
     Pipe files to the standard output.

`-R'
     Update directories recursively (default).  See Recursive behavior.

`-r rev'
     Retrieve revision/tag REV.  This option is sticky, and implies
     `-P'.  See Sticky tags, for more information on sticky
     tags/dates.

   These special options are also available with `update'.

`-A'
     Reset any sticky tags, dates, or `-k' options.  Does not reset
     sticky `-k' options on modified files.  See Sticky tags
     for more information on sticky tags/dates.

`-C'
     Overwrite locally modified files with clean copies from the
     repository (the modified file is saved in `.#FILE.REVISION',
     however).

`-d'
     Create any directories that exist in the repository if they're
     missing from the working directory.  Normally, `update' acts only
     on directories and files that were already enrolled in your
     working directory.

     This is useful for updating directories that were created in the
     repository since the initial checkout; but it has an unfortunate
     side effect.  If you deliberately avoided certain directories in
     the repository when you created your working directory (either
     through use of a module name or by listing explicitly the files
     and directories you wanted on the command line), then updating
     with `-d' will create those directories, which may not be what you
     want.

`-I NAME'
     Ignore files whose names match NAME (in your working directory)
     during the update.  You can specify `-I' more than once on the
     command line to specify several files to ignore.  Use `-I !' to
     avoid ignoring any files at all.  See cvsignore for other
     ways to make CVS ignore some files.

`-WSPEC'
     Specify file names that should be filtered during update.  You can
     use this option repeatedly.

     SPEC can be a file name pattern of the same type that you can
     specify in the `.cvswrappers' file.  See Wrappers.

`-jREVISION'
     With two `-j' options, merge changes from the revision specified
     with the first `-j' option to the revision specified with the
     second `j' option, into the working directory.

     With one `-j' option, merge changes from the ancestor revision to
     the revision specified with the `-j' option, into the working
     directory.  The ancestor revision is the common ancestor of the
     revision which the working directory is based on, and the revision
     specified in the `-j' option.

     Note that using a single `-j TAGNAME' option rather than `-j
     BRANCHNAME' to merge changes from a branch will often not remove
     files which were removed on the branch.  See Merging adds and removals
     for more information.

     In addition, each `-j' option can contain an optional date
     specification which, when used with branches, can limit the chosen
     revision to one within a specific date.  An optional date is
     specified by adding a colon (:) to the tag:
     `-jSYMBOLIC_TAG:DATE_SPECIFIER'.

     See Branching and merging.

A.19.2 update output
--------------------

`update' and `checkout' keep you informed of their progress by printing
a line for each file, preceded by one character indicating the status
of the file:

`U FILE'
     The file was brought up to date with respect to the repository.
     This is done for any file that exists in the repository but not in
     your working directory, and for files that you haven't changed but
     are not the most recent versions available in the repository.

`P FILE'
     Like `U', but the CVS server sends a patch instead of an entire
     file.  This accomplishes the same thing as `U' using less
     bandwidth.

`A FILE'
     The file has been added to your private copy of the sources, and
     will be added to the source repository when you run `commit' on
     the file.  This is a reminder to you that the file needs to be
     committed.

`R FILE'
     The file has been removed from your private copy of the sources,
     and will be removed from the source repository when you run
     `commit' on the file.  This is a reminder to you that the file
     needs to be committed.

`M FILE'
     The file is modified in  your  working  directory.

     `M' can indicate one of two states for a file you're working on:
     either there were no modifications to the same file in the
     repository, so that your file remains as you last saw it; or there
     were modifications in the repository as well as in your copy, but
     they were merged successfully, without conflict, in your working
     directory.

     CVS will print some messages if it merges your work, and a backup
     copy of your working file (as it looked before you ran `update')
     will be made.  The exact name of that file is printed while
     `update' runs.

`C FILE'
     A conflict was detected while trying to merge your changes to FILE
     with changes from the source repository.  FILE (the copy in your
     working directory) is now the result of attempting to merge the
     two revisions; an unmodified copy of your file is also in your
     working directory, with the name `.#FILE.REVISION' where REVISION
     is the revision that your modified file started from.  Resolve the
     conflict as described in Conflicts example.  (Note that
     some systems automatically purge files that begin with `.#' if
     they have not been accessed for a few days.  If you intend to keep
     a copy of your original file, it is a very good idea to rename
     it.)  Under VMS, the file name starts with `__' rather than `.#'.

`? FILE'
     FILE is in your working directory, but does not correspond to
     anything in the source repository, and is not in the list of files
     for CVS to ignore (see the description of the `-I' option, and
     cvsignore).

Appendix B Quick reference to CVS commands
******************************************

This appendix describes how to invoke CVS, with references to where
each command or feature is described in detail.  For other references
run the `cvs --help' command, or see Index.

   A CVS command looks like:

     cvs [ GLOBAL_OPTIONS ] COMMAND [ COMMAND_OPTIONS ] [ COMMAND_ARGS ]

   Global options:

`--allow-root=ROOTDIR'
     Specify legal CVSROOT directory (server only) (not in CVS 1.9 and
     older).  See Password authentication server.

`-a'
     Authenticate all communication (client only) (not in CVS 1.9 and
     older).  See Global options.

`-b'
     Specify RCS location (CVS 1.9 and older).  See Global options.

`-d ROOT'
     Specify the CVSROOT.  See Repository.

`-e EDITOR'
     Edit messages with EDITOR.  See Committing your changes.

`-f'
     Do not read the `~/.cvsrc' file.  See Global options.

`-H'
`--help'
     Print a help message.  See Global options.

`-n'
     Do not change any files.  See Global options.

`-Q'
     Be really quiet.  See Global options.

`-q'
     Be somewhat quiet.  See Global options.

`-r'
     Make new working files read-only.  See Global options.

`-s VARIABLE=VALUE'
     Set a user variable.  See Variables.

`-T TEMPDIR'
     Put temporary files in TEMPDIR.  See Global options.

`-t'
     Trace CVS execution.  See Global options.

`-v'

`--version'
     Display version and copyright information for CVS.

`-w'
     Make new working files read-write.  See Global options.

`-x'
     Encrypt all communication (client only).  See Global options.

`-z GZIP-LEVEL'
     Set the compression level (client only).  See Global options.

   Keyword expansion modes (see Substitution modes):

     -kkv  $Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp $
     -kkvl $Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
     -kk   $Id$
     -kv   file1,v 1.1 1993/12/09 03:21:13 joe Exp
     -ko   no expansion
     -kb   no expansion, file is binary

   Keywords (see Keyword list):

     $Author: joe $
     $Date: 1993/12/09 03:21:13 $
     $Header: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
     $Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
     $Locker: harry $
     $Name: snapshot_1_14 $
     $RCSfile: file1,v $
     $Revision: 1.1 $
     $Source: /home/files/file1,v $
     $State: Exp $
     $Log: file1,v $
     Revision 1.1  1993/12/09 03:30:17  joe
     Initial revision

   Commands, command options, and command arguments:

`add [OPTIONS] [FILES...]'
     Add a new file/directory.  See Adding files.

    `-k KFLAG'
          Set keyword expansion.

    `-m MSG'
          Set file description.

`admin [OPTIONS] [FILES...]'
     Administration of history files in the repository.  See
     admin.

    `-b[REV]'
          Set default branch.  See Reverting local changes.

    `-cSTRING'
          Set comment leader.

    `-kSUBST'
          Set keyword substitution.  See Keyword substitution.

    `-l[REV]'
          Lock revision REV, or latest revision.

    `-mREV:MSG'
          Replace the log message of revision REV with MSG.

    `-oRANGE'
          Delete revisions from the repository.  See admin options.

    `-q'
          Run quietly; do not print diagnostics.

    `-sSTATE[:REV]'
          Set the state.  See admin options for more
          information on possible states.

    `-t'
          Set file description from standard input.

    `-tFILE'
          Set file description from FILE.

    `-t-STRING'
          Set file description to STRING.

    `-u[REV]'
          Unlock revision REV, or latest revision.

`annotate [OPTIONS] [FILES...]'
     Show last revision where each line was modified.  See
     annotate.

    `-D DATE'
          Annotate the most recent revision no later than DATE.  See
          Common options.

    `-F'
          Force annotation of binary files.  (Without this option,
          binary files are skipped with a message.)

    `-f'
          Use head revision if tag/date not found.  See Common options.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r TAG'
          Annotate revision TAG.  See Common options.

`checkout [OPTIONS] MODULES...'
     Get a copy of the sources.  See checkout.

    `-A'
          Reset any sticky tags/date/options.  See Sticky tags
          and Keyword substitution.

    `-c'
          Output the module database.  See checkout options.

    `-D DATE'
          Check out revisions as of DATE (is sticky).  See Common options.

    `-d DIR'
          Check out into DIR.  See checkout options.

    `-f'
          Use head revision if tag/date not found.  See Common options.

    `-j REV'
          Merge in changes.  See checkout options.

    `-k KFLAG'
          Use KFLAG keyword expansion.  See Substitution modes.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-N'
          Don't "shorten" module paths if -d specified.  See
          checkout options.

    `-n'
          Do not run module program (if any).  See checkout options.

    `-P'
          Prune empty directories.  See Moving directories.

    `-p'
          Check out files to standard output (avoids stickiness).  See
          checkout options.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r TAG'
          Checkout revision TAG (is sticky).  See Common options.

    `-s'
          Like -c, but include module status.  See checkout options.

`commit [OPTIONS] [FILES...]'
     Check changes into the repository.  See commit.

    `-F FILE'
          Read log message from FILE.  See commit options.

    `-f'
          Force the file to be committed; disables recursion.  See
          commit options.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-m MSG'
          Use MSG as log message.  See commit options.

    `-n'
          Do not run module program (if any).  See commit options.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r REV'
          Commit to REV.  See commit options.

`diff [OPTIONS] [FILES...]'
     Show differences between revisions.  See diff.  In
     addition to the options shown below, accepts a wide variety of
     options to control output style, for example `-c' for context
     diffs.

    `-D DATE1'
          Diff revision for date against working file.  See diff options.

    `-D DATE2'
          Diff REV1/DATE1 against DATE2.  See diff options.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-N'
          Include diffs for added and removed files.  See diff options.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r REV1'
          Diff revision for REV1 against working file.  See diff options.

    `-r REV2'
          Diff REV1/DATE1 against REV2.  See diff options.

`edit [OPTIONS] [FILES...]'
     Get ready to edit a watched file.  See Editing files.

    `-a ACTIONS'
          Specify actions for temporary watch, where ACTIONS is `edit',
          `unedit', `commit', `all', or `none'.  See Editing files.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

`editors [OPTIONS] [FILES...]'
     See who is editing a watched file.  See Watch information.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

`export [OPTIONS] MODULES...'
     Export files from CVS.  See export.

    `-D DATE'
          Check out revisions as of DATE.  See Common options.

    `-d DIR'
          Check out into DIR.  See export options.

    `-f'
          Use head revision if tag/date not found.  See Common options.

    `-k KFLAG'
          Use KFLAG keyword expansion.  See Substitution modes.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-N'
          Don't "shorten" module paths if -d specified.  See
          export options.

    `-n'
          Do not run module program (if any).  See export options.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r TAG'
          Checkout revision TAG.  See Common options.

`history [OPTIONS] [FILES...]'
     Show repository access history.  See history.

    `-a'
          All users (default is self).  See history options.

    `-b STR'
          Back to record with STR in module/file/repos field.  See
          history options.

    `-c'
          Report on committed (modified) files.  See history options.

    `-D DATE'
          Since DATE.  See history options.

    `-e'
          Report on all record types.  See history options.

    `-l'
          Last modified (committed or modified report).  See
          history options.

    `-m MODULE'
          Report on MODULE (repeatable).  See history options.

    `-n MODULE'
          In MODULE.  See history options.

    `-o'
          Report on checked out modules.  See history options.

    `-p REPOSITORY'
          In REPOSITORY.  See history options.

    `-r REV'
          Since revision REV.  See history options.

    `-T'
          Produce report on all TAGs.  See history options.

    `-t TAG'
          Since tag record placed in history file (by anyone).  See
          history options.

    `-u USER'
          For user USER (repeatable).  See history options.

    `-w'
          Working directory must match.  See history options.

    `-x TYPES'
          Report on TYPES, one or more of `TOEFWUPCGMAR'.  See
          history options.

    `-z ZONE'
          Output for time zone ZONE.  See history options.

`import [OPTIONS] REPOSITORY VENDOR-TAG RELEASE-TAGS...'
     Import files into CVS, using vendor branches.  See import.

    `-b BRA'
          Import to vendor branch BRA.  See Multiple vendor branches.

    `-d'
          Use the file's modification time as the time of import.  See
          import options.

    `-k KFLAG'
          Set default keyword substitution mode.  See import options.

    `-m MSG'
          Use MSG for log message.  See import options.

    `-I IGN'
          More files to ignore (! to reset).  See import options.

    `-W SPEC'
          More wrappers.  See import options.

`init'
     Create a CVS repository if it doesn't exist.  See Creating a repository.

`kserver'
     Kerberos authenticated server.  See Kerberos authenticated.

`log [OPTIONS] [FILES...]'
     Print out history information for files.  See log.

    `-b'
          Only list revisions on the default branch.  See log options.

    `-d DATES'
          Specify dates (D1<D2 for range, D for latest before).  See
          log options.

    `-h'
          Only print header.  See log options.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-N'
          Do not list tags.  See log options.

    `-R'
          Only print name of RCS file.  See log options.

    `-rREVS'
          Only list revisions REVS.  See log options.

    `-s STATES'
          Only list revisions with specified states.  See log options.

    `-t'
          Only print header and descriptive text.  See log options.

    `-wLOGINS'
          Only list revisions checked in by specified logins.  See
          log options.

`login'
     Prompt for password for authenticating server.  See Password authentication client.

`logout'
     Remove stored password for authenticating server.  See
     Password authentication client.

`pserver'
     Password authenticated server.  See Password authentication server.

`rannotate [OPTIONS] [MODULES...]'
     Show last revision where each line was modified.  See
     annotate.

    `-D DATE'
          Annotate the most recent revision no later than DATE.  See
          Common options.

    `-F'
          Force annotation of binary files.  (Without this option,
          binary files are skipped with a message.)

    `-f'
          Use head revision if tag/date not found.  See Common options.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r TAG'
          Annotate revision TAG.  See Common options.

`rdiff [OPTIONS] MODULES...'
     Show differences between releases.  See rdiff.

    `-c'
          Context diff output format (default).  See rdiff options.

    `-D DATE'
          Select revisions based on DATE.  See Common options.

    `-f'
          Use head revision if tag/date not found.  See Common options.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r REV'
          Select revisions based on REV.  See Common options.

    `-s'
          Short patch - one liner per file.  See rdiff options.

    `-t'
          Top two diffs - last change made to the file.  See diff options.

    `-u'
          Unidiff output format.  See rdiff options.

    `-V VERS'
          Use RCS Version VERS for keyword expansion (obsolete).  See
          rdiff options.

`release [OPTIONS] DIRECTORY'
     Indicate that a directory is no longer in use.  See
     release.

    `-d'
          Delete the given directory.  See release options.

`remove [OPTIONS] [FILES...]'
     Remove an entry from the repository.  See Removing files.

    `-f'
          Delete the file before removing it.  See Removing files.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

`rlog [OPTIONS] [FILES...]'
     Print out history information for modules.  See log.

    `-b'
          Only list revisions on the default branch.  See log options.

    `-d DATES'
          Specify dates (D1<D2 for range, D for latest before).  See
          log options.

    `-h'
          Only print header.  See log options.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-N'
          Do not list tags.  See log options.

    `-R'
          Only print name of RCS file.  See log options.

    `-rREVS'
          Only list revisions REVS.  See log options.

    `-s STATES'
          Only list revisions with specified states.  See log options.

    `-t'
          Only print header and descriptive text.  See log options.

    `-wLOGINS'
          Only list revisions checked in by specified logins.  See
          log options.

`rtag [OPTIONS] TAG MODULES...'
     Add a symbolic tag to a module.  See Revisions and
     Branching and merging.

    `-a'
          Clear tag from removed files that would not otherwise be
          tagged.  See Tagging add/remove.

    `-b'
          Create a branch named TAG.  See Branching and merging.

    `-B'
          Used in conjunction with -F or -d, enables movement and
          deletion of branch tags.  Use with extreme caution.

    `-D DATE'
          Tag revisions as of DATE.  See Tagging by date/tag.

    `-d'
          Delete TAG.  See Modifying tags.

    `-F'
          Move TAG if it already exists.  See Modifying tags.

    `-f'
          Force a head revision match if tag/date not found.  See
          Tagging by date/tag.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-n'
          No execution of tag program.  See Common options.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r REV'
          Tag existing tag REV.  See Tagging by date/tag.

`server'
     Rsh server.  See Connecting via rsh.

`status [OPTIONS] FILES...'
     Display status information in a working directory.  See File status.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-v'
          Include tag information for file.  See Tags.

`tag [OPTIONS] TAG [FILES...]'
     Add a symbolic tag to checked out version of files.  See
     Revisions and Branching and merging.

    `-b'
          Create a branch named TAG.  See Branching and merging.

    `-c'
          Check that working files are unmodified.  See Tagging the working directory.

    `-D DATE'
          Tag revisions as of DATE.  See Tagging by date/tag.

    `-d'
          Delete TAG.  See Modifying tags.

    `-F'
          Move TAG if it already exists.  See Modifying tags.

    `-f'
          Force a head revision match if tag/date not found.  See
          Tagging by date/tag.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r REV'
          Tag existing tag REV.  See Tagging by date/tag.

`unedit [OPTIONS] [FILES...]'
     Undo an edit command.  See Editing files.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

`update [OPTIONS] [FILES...]'
     Bring work tree in sync with repository.  See update.

    `-A'
          Reset any sticky tags/date/options.  See Sticky tags
          and Keyword substitution.

    `-C'
          Overwrite locally modified files with clean copies from the
          repository (the modified file is saved in `.#FILE.REVISION',
          however).

    `-D DATE'
          Check out revisions as of DATE (is sticky).  See Common options.

    `-d'
          Create directories.  See update options.

    `-f'
          Use head revision if tag/date not found.  See Common options.

    `-I IGN'
          More files to ignore (! to reset).  See import options.

    `-j REV'
          Merge in changes.  See update options.

    `-k KFLAG'
          Use KFLAG keyword expansion.  See Substitution modes.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-P'
          Prune empty directories.  See Moving directories.

    `-p'
          Check out files to standard output (avoids stickiness).  See
          update options.

    `-R'
          Operate recursively (default).  See Recursive behavior.

    `-r TAG'
          Checkout revision TAG (is sticky).  See Common options.

    `-W SPEC'
          More wrappers.  See import options.

`version'
     Display the version of CVS being used.  If the repository is
     remote, display both the client and server versions.

`watch [on|off|add|remove] [OPTIONS] [FILES...]'
     on/off: turn on/off read-only checkouts of files.  See
     Setting a watch.

     add/remove: add or remove notification on actions.  See
     Getting Notified.

    `-a ACTIONS'
          Specify actions for temporary watch, where ACTIONS is `edit',
          `unedit', `commit', `all', or `none'.  See Editing files.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

`watchers [OPTIONS] [FILES...]'
     See who is watching a file.  See Watch information.

    `-l'
          Local; run only in current working directory.  See
          Recursive behavior.

    `-R'
          Operate recursively (default).  See Recursive behavior.

Appendix C Reference manual for Administrative files
****************************************************

Inside the repository, in the directory `$CVSROOT/CVSROOT', there are a
number of supportive files for CVS.  You can use CVS in a limited
fashion without any of them, but if they are set up properly they can
help make life easier.  For a discussion of how to edit them, see
Intro administrative files.

   The most important of these files is the `modules' file, which
defines the modules inside the repository.

C.1 The modules file
====================

The `modules' file records your definitions of names for collections of
source code.  CVS will use these definitions if you use CVS to update
the modules file (use normal commands like `add', `commit', etc).

   The `modules' file may contain blank lines and comments (lines
beginning with `#') as well as module definitions.  Long lines can be
continued on the next line by specifying a backslash (`\') as the last
character on the line.

   There are three basic types of modules: alias modules, regular
modules, and ampersand modules.  The difference between them is the way
that they map files in the repository to files in the working
directory.  In all of the following examples, the top-level repository
contains a directory called `first-dir', which contains two files,
`file1' and `file2', and a directory `sdir'.  `first-dir/sdir' contains
a file `sfile'.

C.1.1 Alias modules
-------------------

Alias modules are the simplest kind of module:

`MNAME -a ALIASES...'
     This represents the simplest way of defining a module MNAME.  The
     `-a' flags the definition as a simple alias: CVS will treat any
     use of MNAME (as a command argument) as if the list of names
     ALIASES had been specified instead.  ALIASES may contain either
     other module names or paths.  When you use paths in aliases,
     `checkout' creates all intermediate directories in the working
     directory, just as if the path had been specified explicitly in
     the CVS arguments.

   For example, if the modules file contains:

     amodule -a first-dir

then the following two commands are equivalent:

     $ cvs co amodule
     $ cvs co first-dir

and they each would provide output such as:

     cvs checkout: Updating first-dir
     U first-dir/file1
     U first-dir/file2
     cvs checkout: Updating first-dir/sdir
     U first-dir/sdir/sfile

C.1.2 Regular modules
---------------------

`MNAME [ options ] DIR [ FILES... ]'
     In the simplest case, this form of module definition reduces to
     `MNAME DIR'.  This defines all the files in directory DIR as
     module mname.  DIR is a relative path (from `$CVSROOT') to a
     directory of source in the source repository.  In this case, on
     checkout, a single directory called MNAME is created as a working
     directory; no intermediate directory levels are used by default,
     even if DIR was a path involving several directory levels.

   For example, if a module is defined by:

     regmodule first-dir

then regmodule will contain the files from first-dir:

     $ cvs co regmodule
     cvs checkout: Updating regmodule
     U regmodule/file1
     U regmodule/file2
     cvs checkout: Updating regmodule/sdir
     U regmodule/sdir/sfile
     $

   By explicitly specifying files in the module definition after DIR,
you can select particular files from directory DIR.  Here is an example:

     regfiles first-dir/sdir sfile

With this definition, getting the regfiles module will create a single
working directory `regfiles' containing the file listed, which comes
from a directory deeper in the CVS source repository:

     $ cvs co regfiles
     U regfiles/sfile
     $

C.1.3 Ampersand modules
-----------------------

A module definition can refer to other modules by including `&MODULE'
in its definition.
     MNAME [ options ] &MODULE...

   Then getting the module creates a subdirectory for each such module,
in the directory containing the module.  For example, if modules
contains

     ampermod &first-dir

then a checkout will create an `ampermod' directory which contains a
directory called `first-dir', which in turns contains all the
directories and files which live there.  For example, the command

     $ cvs co ampermod

will create the following files:

     ampermod/first-dir/file1
     ampermod/first-dir/file2
     ampermod/first-dir/sdir/sfile

   There is one quirk/bug: the messages that CVS prints omit the
`ampermod', and thus do not correctly display the location to which it
is checking out the files:

     $ cvs co ampermod
     cvs checkout: Updating first-dir
     U first-dir/file1
     U first-dir/file2
     cvs checkout: Updating first-dir/sdir
     U first-dir/sdir/sfile
     $

   Do not rely on this buggy behavior; it may get fixed in a future
release of CVS.

C.1.4 Excluding directories
---------------------------

An alias module may exclude particular directories from other modules
by using an exclamation mark (`!') before the name of each directory to
be excluded.

   For example, if the modules file contains:

     exmodule -a !first-dir/sdir first-dir

then checking out the module `exmodule' will check out everything in
`first-dir' except any files in the subdirectory `first-dir/sdir'.

C.1.5 Module options
--------------------

Either regular modules or ampersand modules can contain options, which
supply additional information concerning the module.

`-d NAME'
     Name the working directory something other than the module name.

`-e PROG'
     Specify a program PROG to run whenever files in a module are
     exported.  PROG runs with a single argument, the module name.

`-o PROG'
     Specify a program PROG to run whenever files in a module are
     checked out.  PROG runs with a single argument, the module name.
     See Module program options for information on how PROG is
     called.

`-s STATUS'
     Assign a status to the module.  When the module file is printed
     with `cvs checkout -s' the modules are sorted according to
     primarily module status, and secondarily according to the module
     name.  This option has no other meaning.  You can use this option
     for several things besides status: for instance, list the person
     that is responsible for this module.

`-t PROG'
     Specify a program PROG to run whenever files in a module are
     tagged with `rtag'.  PROG runs with two arguments: the module name
     and the symbolic tag specified to `rtag'.  It is not run when
     `tag' is executed.  Generally you will find that the `taginfo'
     file is a better solution (see taginfo).

   You should also see Module program options about how the
"program options" programs are run.

C.1.6 How the modules file "program options" programs are run
-------------------------------------------------------------

For checkout, rtag, and export, the program is server-based, and as
such the following applies:-

   If using remote access methods (pserver, ext, etc.), CVS will
execute this program on the server from a temporary directory. The path
is searched for this program.

   If using "local access" (on a local or remote NFS file system, i.e.,
repository set just to a path), the program will be executed from the
newly checked-out tree, if found there, or alternatively searched for
in the path if not.

   The programs are all run after the operation has effectively
completed.

C.2 The cvswrappers file
========================

Wrappers refers to a CVS feature which lets you control certain
settings based on the name of the file which is being operated on.  The
settings are `-k' for binary files, and `-m' for nonmergeable text
files.

   The `-m' option specifies the merge methodology that should be used
when a non-binary file is updated.  `MERGE' means the usual CVS
behavior: try to merge the files.  `COPY' means that `cvs update' will
refuse to merge files, as it also does for files specified as binary
with `-kb' (but if the file is specified as binary, there is no need to
specify `-m 'COPY'').  CVS will provide the user with the two versions
of the files, and require the user using mechanisms outside CVS, to
insert any necessary changes.

   *WARNING:  Do not use `COPY' with CVS 1.9 or earlier - such versions
of CVS will copy one version of your file over the other, wiping out
the previous contents.* The `-m' wrapper option only affects behavior
when merging is done on update; it does not affect how files are
stored.  See Binary files, for more on binary files.

   The basic format of the file `cvswrappers' is:

     wildcard     [option value][option value]...

     where option is one of
     -m           update methodology      value: MERGE or COPY
     -k           keyword expansion       value: expansion mode

     and value is a single-quote delimited value.

   For example, the following command imports a directory, treating
files whose name ends in `.exe' as binary:

     cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag

C.3 The Trigger Scripts
=======================

Several of the administrative files support triggers, or the launching
external scripts or programs at specific times before or after
particular events.  The individual files are discussed in the later
sections, see commit files and taginfo, but some of the
common elements are discussed here.

   All the trigger scripts are launched in a copy of the user sandbox
being committed, on the server, in client-server mode.  In local mode,
the scripts are actually launched directly from the user sandbox
directory being committed.  For most intents and purposes, the same
scripts can be run in both locations without alteration.

C.3.1 The common syntax
-----------------------

The administrative files such as `commitinfo', `loginfo', `rcsinfo',
`verifymsg', etc., all have a common format.  The purpose of the files
are described later on.  The common syntax is described here.

   Each line contains the following:
   * A regular expression.  This is a basic regular expression in the
     syntax used by GNU emacs.

   * A whitespace separator--one or more spaces and/or tabs.

   * A file name or command-line template.

Blank lines are ignored.  Lines that start with the character `#' are
treated as comments.  Long lines unfortunately can _not_ be broken in
two parts in any way.

   The first regular expression that matches the current directory name
in the repository is used.  The rest of the line is used as a file name
or command-line as appropriate.

C.3.2 Security and the Trigger Scripts
--------------------------------------

Security is a huge subject, and implementing a secure system is a
non-trivial task.  This section will barely touch on all the issues
involved, but it is well to note that, as with any script you will be
allowing an untrusted user to run on your server, there are measures
you can take to help prevent your trigger scripts from being abused.

   For instance, since the CVS trigger scripts all run in a copy of the
user's sandbox on the server, a naively coded Perl trigger script which
attempts to use a Perl module that is not installed on the system can
be hijacked by any user with commit access who is checking in a file
with the correct name.  Other scripting languages may be vulnerable to
similar hacks.

   One way to make a script more secure, at least with Perl, is to use
scripts which invoke the `-T', or "taint-check" switch on their `#!'
line.  In the most basic terms, this causes Perl to avoid running code
that may have come from an external source.  Please run the `perldoc
perlsec' command for more on Perl security.  Again, other languages may
implement other security verification hooks which look more or less
like Perl's "taint-check" mechanism.

C.4 The commit support files
============================

There are three kinds of trigger scripts (see Trigger Scripts) that
can be run at various times during a commit.  They are specified in
files in the repository, as described below.  The following table
summarizes the file names and the purpose of the corresponding programs.

`commitinfo'
     The program is responsible for checking that the commit is
     allowed.  If it exits with a non-zero exit status the commit will
     be aborted.

`verifymsg'
     The specified program is used to evaluate the log message, and
     possibly verify that it contains all required fields.  This is
     most useful in combination with the `rcsinfo' file, which can hold
     a log message template (see rcsinfo).

`editinfo'
     The specified program is used to edit the log message, and
     possibly verify that it contains all required fields.  This is
     most useful in combination with the `rcsinfo' file, which can hold
     a log message template (see rcsinfo).  (obsolete)

`loginfo'
     The specified program is called when the commit is complete.  It
     receives the log message and some additional information and can
     store the log message in a file, or mail it to appropriate
     persons, or maybe post it to a local newsgroup, or...  Your
     imagination is the limit!

C.4.1 Commitinfo
----------------

The `commitinfo' file defines programs to execute whenever `cvs commit'
is about to execute.  These programs are used for pre-commit checking
to verify that the modified, added and removed files are really ready
to be committed.  This could be used, for instance, to verify that the
changed files conform to to your site's standards for coding practice.

   As mentioned earlier, each line in the `commitinfo' file consists of
a regular expression and a command-line template.  The template can
include a program name and any number of arguments you wish to supply
to it.  The full path to the current source repository is appended to
the template, followed by the file names of any files involved in the
commit (added, removed, and modified files).

   The first line with a regular expression matching the directory
within the repository will be used.  If the command returns a non-zero
exit status the commit will be aborted.

   If the repository name does not match any of the regular expressions
in this file, the `DEFAULT' line is used, if it is specified.

   All occurrences of the name `ALL' appearing as a regular expression
are used in addition to the first matching regular expression or the
name `DEFAULT'.

   The command will be run in the root of the workspace containing the
new versions of any files the user would like to modify (commit), _or
in a copy of the workspace on the server (see Remote repositories)
_.  If a file is being removed, there will be no copy of
the file under the current directory.  If a file is being added, there
will be no corresponding archive file in the repository unless the file
is being resurrected.

   Note that both the repository directory and the corresponding Attic
(see Attic) directory may need to be checked to locate the archive
file corresponding to any given file being committed.  Much of the
information about the specific commit request being made, including the
destination branch, commit message, and command line options specified,
is not available to the command.

C.4.2 Verifying log messages
----------------------------

Once you have entered a log message, you can evaluate that message to
check for specific content, such as a bug ID.  Use the `verifymsg' file
to specify a program that is used to verify the log message.  This
program could be a simple script that checks that the entered message
contains the required fields.

   The `verifymsg' file is often most useful together with the
`rcsinfo' file, which can be used to specify a log message template.

   Each line in the `verifymsg' file consists of a regular expression
and a command-line template.  The template must include a program name,
and can include any number of arguments.  The full path to the current
log message template file is appended to the template.

   One thing that should be noted is that the `ALL' keyword is not
supported.  If more than one matching line is found, the first one is
used.  This can be useful for specifying a default verification script
in a directory, and then overriding it in a subdirectory.

   If the repository name does not match any of the regular expressions
in this file, the `DEFAULT' line is used, if it is specified.

   If the verification script exits with a non-zero exit status, the
commit is aborted.

   In the default configuration, CVS allows the verification script to
change the log message. This is controlled via the RereadLogAfterVerify
CVSROOT/config option.

   When `RereadLogAfterVerify=always' or `RereadLogAfterVerify=stat',
the log message will either always be reread after the verification
script is run or reread only if the log message file status has changed.

   See config, for more on CVSROOT/config options.

   It is NOT a good idea for a `verifymsg' script to interact directly
with the user in the various client/server methods. For the `pserver'
method, there is no protocol support for communicating between
`verifymsg' and the client on the remote end. For the `ext' and
`server' methods, it is possible for CVS to become confused by the
characters going along the same channel as the CVS protocol messages.
See Remote repositories, for more information on client/server
setups.  In addition, at the time the `verifymsg' script runs, the CVS
server has locks in place in the repository.  If control is returned to
the user here then other users may be stuck waiting for access to the
repository.

   This option can be useful if you find yourself using an rcstemplate
that needs to be modified to remove empty elements or to fill in
default values.  It can also be useful if the rcstemplate has changed
in the repository and the CVS/Template was not updated, but is able to
be adapted to the new format by the verification script that is run by
`verifymsg'.

   An example of an update might be to change all occurrences of
'BugId:' to be 'DefectId:' (which can be useful if the rcstemplate has
recently been changed and there are still checked-out user trees with
cached copies in the CVS/Template file of the older version).

   Another example of an update might be to delete a line that contains
'BugID: none' from the log message after validation of that value as
being allowed is made.

   The following is a little silly example of a `verifymsg' file,
together with the corresponding `rcsinfo' file, the log message
template and an verification  script.  We begin with the log message
template.  We want to always record a bug-id number on the first line
of the log message.  The rest of log message is free text.  The
following template is found in the file `/usr/cvssupport/tc.template'.

     BugId:

   The script `/usr/cvssupport/bugid.verify' is used to evaluate the
log message.

     #!/bin/sh
     #
     #       bugid.verify filename
     #
     #  Verify that the log message contains a valid bugid
     #  on the first line.
     #
     if sed 1q < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
         exit 0
     elif sed 1q < $1 | grep '^BugId:[ ]*none$' > /dev/null; then
         # It is okay to allow commits with 'BugId: none',
         # but do not put that text into the real log message.
         grep -v '^BugId:[ ]*none$' > $1.rewrite
         mv $1.rewrite $1
         exit 0
     else
         echo "No BugId found."
         exit 1
     fi

   The `verifymsg' file contains this line:

     ^tc     /usr/cvssupport/bugid.verify

   The `rcsinfo' file contains this line:

     ^tc     /usr/cvssupport/tc.template

   The `config' file contains this line:

     RereadLogAfterVerify=always

C.4.3 Editinfo
--------------

*The `editinfo' feature has been rendered obsolete.  To set a default
editor for log messages use the `CVSEDITOR', `EDITOR' environment
variables (see Environment variables) or the `-e' global option
(see Global options).  See verifymsg, for information on
the use of the `verifymsg' feature for evaluating log messages.*

   If you want to make sure that all log messages look the same way,
you can use the `editinfo' file to specify a program that is used to
edit the log message.  This program could be a custom-made editor that
always enforces a certain style of the log message, or maybe a simple
shell script that calls an editor, and checks that the entered message
contains the required fields.

   If no matching line is found in the `editinfo' file, the editor
specified in the environment variable `$CVSEDITOR' is used instead.  If
that variable is not set, then the environment variable `$EDITOR' is
used instead.  If that variable is not set a default will be used.  See
Committing your changes.

   The `editinfo' file is often most useful together with the `rcsinfo'
file, which can be used to specify a log message template.

   Each line in the `editinfo' file consists of a regular expression
and a command-line template.  The template must include a program name,
and can include any number of arguments.  The full path to the current
log message template file is appended to the template.

   One thing that should be noted is that the `ALL' keyword is not
supported.  If more than one matching line is found, the first one is
used.  This can be useful for specifying a default edit script in a
module, and then overriding it in a subdirectory.

   If the repository name does not match any of the regular expressions
in this file, the `DEFAULT' line is used, if it is specified.

   If the edit script exits with a non-zero exit status, the commit is
aborted.

   Note: when CVS is accessing a remote repository, or when the `-m' or
`-F' options to `cvs commit' are used, `editinfo' will not be consulted.
There is no good workaround for this; use `verifymsg' instead.

C.4.3.1 Editinfo example
........................

The following is a little silly example of a `editinfo' file, together
with the corresponding `rcsinfo' file, the log message template and an
editor script.  We begin with the log message template.  We want to
always record a bug-id number on the first line of the log message.
The rest of log message is free text.  The following template is found
in the file `/usr/cvssupport/tc.template'.

     BugId:

   The script `/usr/cvssupport/bugid.edit' is used to edit the log
message.

     #!/bin/sh
     #
     #       bugid.edit filename
     #
     #  Call $EDITOR on FILENAME, and verify that the
     #  resulting file contains a valid bugid on the first
     #  line.
     if [ "x$EDITOR" = "x" ]; then EDITOR=vi; fi
     if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi
     $CVSEDITOR $1
     until head -1|grep '^BugId:[ ]*[0-9][0-9]*$' < $1
     do  echo -n  "No BugId found.  Edit again? ([y]/n)"
         read ans
         case ${ans} in
             n*) exit 1;;
         esac
         $CVSEDITOR $1
     done

   The `editinfo' file contains this line:

     ^tc     /usr/cvssupport/bugid.edit

   The `rcsinfo' file contains this line:

     ^tc     /usr/cvssupport/tc.template

C.4.4 Loginfo
-------------

The `loginfo' file is used to control where `cvs commit' log
information is sent.  The first entry on a line is a regular expression
which is tested against the directory that the change is being made to,
relative to the `$CVSROOT'.  If a match is found, then the remainder of
the line is a filter program that should expect log information on its
standard input.  Note that the filter program *must* read *all* of the
log information or CVS may fail with a broken pipe signal.

   If the repository name does not match any of the regular expressions
in this file, the `DEFAULT' line is used, if it is specified.

   All occurrences of the name `ALL' appearing as a regular expression
are used in addition to the first matching regular expression or
`DEFAULT'.

   The first matching regular expression is used.

   See commit files, for a description of the syntax of the
`loginfo' file.

   The user may specify a format string as part of the filter.  The
string is composed of a `%' followed by a space, or followed by a single
format character, or followed by a set of format characters surrounded
by `{' and `}' as separators.  The format characters are:

s
     file name

V
     old version number (pre-checkin)

v
     new version number (post-checkin)

   All other characters that appear in a format string expand to an
empty field (commas separating fields are still provided).

   For example, some valid format strings are `%', `%s', `%{s}', and
`%{sVv}'.

   The output will be a space separated string of tokens enclosed in
quotation marks (").  Any embedded dollar signs ($), backticks (`),
backslashes (\), or quotation marks will be preceded by a backslash
(this allows the shell to correctly parse it as a single string,
reguardless of the characters it contains).  For backwards
compatibility, the first token will be the repository subdirectory.
The rest of the tokens will be comma-delimited lists of the information
requested in the format string.  For example, if
`/u/src/master/yoyodyne/tc' is the repository, `%{sVv}' is the format
string, and three files (ChangeLog, Makefile, foo.c) were modified, the
output might be:

     "yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13"

   As another example, `%{}' means that only the name of the repository
will be generated.

   Note: when CVS is accessing a remote repository, `loginfo' will be
run on the _remote_ (i.e., server) side, not the client side (see
Remote repositories).

C.4.4.1 Loginfo example
.......................

The following `loginfo' file, together with the tiny shell-script
below, appends all log messages to the file
`$CVSROOT/CVSROOT/commitlog', and any commits to the administrative
files (inside the `CVSROOT' directory) are also logged in
`/usr/adm/cvsroot-log'.  Commits to the `prog1' directory are mailed to
ceder.

     ALL             /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER
     ^CVSROOT        /usr/local/bin/cvs-log /usr/adm/cvsroot-log
     ^prog1          Mail -s %s ceder

   The shell-script `/usr/local/bin/cvs-log' looks like this:

     #!/bin/sh
     (echo "------------------------------------------------------";
      echo -n $2"  ";
      date;
      echo;
      cat) >> $1

C.4.4.2 Keeping a checked out copy
..................................

It is often useful to maintain a directory tree which contains files
which correspond to the latest version in the repository.  For example,
other developers might want to refer to the latest sources without
having to check them out, or you might be maintaining a web site with
CVS and want every checkin to cause the files used by the web server to
be updated.

   The way to do this is by having loginfo invoke `cvs update'.  Doing
so in the naive way will cause a problem with locks, so the `cvs update'
must be run in the background.  Here is an example for unix (this
should all be on one line):

     ^cyclic-pages		(date; cat; (sleep 2; cd /u/www/local-docs;
      cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1

   This will cause checkins to repository directories starting with
`cyclic-pages' to update the checked out tree in `/u/www/local-docs'.

C.5 Rcsinfo
===========

The `rcsinfo' file can be used to specify a form to edit when filling
out the commit log.  The `rcsinfo' file has a syntax similar to the
`verifymsg', `commitinfo' and `loginfo' files.  See syntax.  Unlike
the other files the second part is _not_ a command-line template.
Instead, the part after the regular expression should be a full
pathname to a file containing the log message template.

   If the repository name does not match any of the regular expressions
in this file, the `DEFAULT' line is used, if it is specified.

   All occurrences of the name `ALL' appearing as a regular expression
are used in addition to the first matching regular expression or
`DEFAULT'.

   The log message template will be used as a default log message.  If
you specify a log message with `cvs commit -m MESSAGE' or `cvs commit -f
FILE' that log message will override the template.

   See verifymsg, for an example `rcsinfo' file.

   When CVS is accessing a remote repository, the contents of `rcsinfo'
at the time a directory is first checked out will specify a template
which does not then change.  If you edit `rcsinfo' or its templates,
you may need to check out a new working directory.

C.6 Taginfo
===========

The `taginfo' file defines programs to execute when someone executes a
`tag' or `rtag' command.  The `taginfo' file has the standard form for
trigger scripts (see Trigger Scripts), where each line is a regular
expression followed by a command to execute (see syntax).  The
arguments passed to the command are, in order, the TAGNAME, OPERATION
(`add' for `tag', `mov' for `tag -F', and `del' for `tag -d'),
REPOSITORY, and any remaining are pairs of FILENAME REVISION.  A
non-zero exit of the filter program will cause the tag to be aborted.

   Here is an example of using the `taginfo' file to log `tag' and
`rtag' commands.  In the `taginfo' file put:

     ALL /usr/local/cvsroot/CVSROOT/loggit

Where `/usr/local/cvsroot/CVSROOT/loggit' contains the following script:

     #!/bin/sh
     echo "$@" >>/home/kingdon/cvsroot/CVSROOT/taglog

C.7 Ignoring files via cvsignore
================================

There are certain file names that frequently occur inside your working
copy, but that you don't want to put under CVS control.  Examples are
all the object files that you get while you compile your sources.
Normally, when you run `cvs update', it prints a line for each file it
encounters that it doesn't know about (see update output).

   CVS has a list of files (or sh(1) file name patterns) that it should
ignore while running `update', `import' and `release'.  This list is
constructed in the following way.

   * The list is initialized to include certain file name patterns:
     names associated with CVS administration, or with other common
     source control systems; common names for patch files, object files,
     archive files, and editor backup files; and other names that are
     usually artifacts of assorted utilities.  Currently, the default
     list of ignored file name patterns is:

              RCS     SCCS    CVS     CVS.adm
              RCSLOG  cvslog.*
              tags    TAGS
              .make.state     .nse_depinfo
              *~      #*      .#*     ,*      _$*     *$
              *.old   *.bak   *.BAK   *.orig  *.rej   .del-*
              *.a     *.olb   *.o     *.obj   *.so    *.exe
              *.Z     *.elc   *.ln
              core

   * The per-repository list in `$CVSROOT/CVSROOT/cvsignore' is
     appended to the list, if that file exists.

   * The per-user list in `.cvsignore' in your home directory is
     appended to the list, if it exists.

   * Any entries in the environment variable `$CVSIGNORE' is appended
     to the list.

   * Any `-I' options given to CVS is appended.

   * As CVS traverses through your directories, the contents of any
     `.cvsignore' will be appended to the list.  The patterns found in
     `.cvsignore' are only valid for the directory that contains them,
     not for any sub-directories.

   In any of the 5 places listed above, a single exclamation mark (`!')
clears the ignore list.  This can be used if you want to store any file
which normally is ignored by CVS.

   Specifying `-I !' to `cvs import' will import everything, which is
generally what you want to do if you are importing files from a
pristine distribution or any other source which is known to not contain
any extraneous files.  However, looking at the rules above you will see
there is a fly in the ointment; if the distribution contains any
`.cvsignore' files, then the patterns from those files will be
processed even if `-I !' is specified.  The only workaround is to
remove the `.cvsignore' files in order to do the import.  Because this
is awkward, in the future `-I !' might be modified to override
`.cvsignore' files in each directory.

   Note that the syntax of the ignore files consists of a series of
lines, each of which contains a space separated list of filenames.
This offers no clean way to specify filenames which contain spaces, but
you can use a workaround like `foo?bar' to match a file named `foo bar'
(it also matches `fooxbar' and the like).  Also note that there is
currently no way to specify comments.

C.8 The checkoutlist file
=========================

It may be helpful to use CVS to maintain your own files in the
`CVSROOT' directory.  For example, suppose that you have a script
`logcommit.pl' which you run by including the following line in the
`commitinfo' administrative file:

     ALL   $CVSROOT/CVSROOT/logcommit.pl

   To maintain `logcommit.pl' with CVS you would add the following line
to the `checkoutlist' administrative file:

     logcommit.pl

   The format of `checkoutlist' is one line for each file that you want
to maintain using CVS, giving the name of the file, followed optionally
by more whitespace and any error message that should print if the file
cannot be checked out into CVSROOT after a commit:

     logcommit.pl	Could not update CVSROOT/logcommit.pl.

   After setting up `checkoutlist' in this fashion, the files listed
there will function just like CVS's built-in administrative files.  For
example, when checking in one of the files you should get a message
such as:

     cvs commit: Rebuilding administrative file database

and the checked out copy in the `CVSROOT' directory should be updated.

   Note that listing `passwd' (see Password authentication server)
in `checkoutlist' is not recommended for security reasons.

   For information about keeping a checkout out copy in a more general
context than the one provided by `checkoutlist', see Keeping a checked out copy.

C.9 The history file
====================

The file `$CVSROOT/CVSROOT/history' is used to log information for the
`history' command (see history).  This file must be created to turn
on logging.  This is done automatically if the `cvs init' command is
used to set up the repository (see Creating a repository).

   The file format of the `history' file is documented only in comments
in the CVS source code, but generally programs should use the `cvs
history' command to access it anyway, in case the format changes with
future releases of CVS.

C.10 Expansions in administrative files
=======================================

Sometimes in writing an administrative file, you might want the file to
be able to know various things based on environment CVS is running in.
There are several mechanisms to do that.

   To find the home directory of the user running CVS (from the `HOME'
environment variable), use `~' followed by `/' or the end of the line.
Likewise for the home directory of USER, use `~USER'.  These variables
are expanded on the server machine, and don't get any reasonable
expansion if pserver (see Password authenticated) is in use;
therefore user variables (see below) may be a better choice to
customize behavior based on the user running CVS.

   One may want to know about various pieces of information internal to
CVS.  A CVS internal variable has the syntax `${VARIABLE}', where
VARIABLE starts with a letter and consists of alphanumeric characters
and `_'.  If the character following VARIABLE is a non-alphanumeric
character other than `_', the `{' and `}' can be omitted.  The CVS
internal variables are:

`CVSROOT'
     This is the absolute path to the current CVS root directory.
     See Repository, for a description of the various ways to
     specify this, but note that the internal variable contains just
     the directory and not any of the access method information.

`RCSBIN'
     In CVS 1.9.18 and older, this specified the directory where CVS
     was looking for RCS programs.  Because CVS no longer runs RCS
     programs, specifying this internal variable is now an error.

`CVSEDITOR'
`EDITOR'
`VISUAL'
     These all expand to the same value, which is the editor that CVS
     is using.  See Global options, for how to specify this.

`USER'
     Username of the user running CVS (on the CVS server machine).
     When using pserver, this is the user specified in the repository
     specification which need not be the same as the username the
     server is running as (see Password authentication server).  Do
     not confuse this with the environment variable of the same name.

   If you want to pass a value to the administrative files which the
user who is running CVS can specify, use a user variable.  To expand a
user variable, the administrative file contains `${=VARIABLE}'.  To set
a user variable, specify the global option `-s' to CVS, with argument
`VARIABLE=VALUE'.  It may be particularly useful to specify this option
via `.cvsrc' (see ~/.cvsrc).

   For example, if you want the administrative file to refer to a test
directory you might create a user variable `TESTDIR'.  Then if CVS is
invoked as

     cvs -s TESTDIR=/work/local/tests

and the administrative file contains `sh ${=TESTDIR}/runtests', then
that string is expanded to `sh /work/local/tests/runtests'.

   All other strings containing `$' are reserved; there is no way to
quote a `$' character so that `$' represents itself.

   Environment variables passed to administrative files are:

`CVS_USER'
     The CVS-specific username provided by the user, if it can be
     provided (currently just for the pserver access method), and to
     the empty string otherwise.  (`CVS_USER' and `USER' may differ
     when `$CVSROOT/CVSROOT/passwd' is used to map CVS usernames to
     system usernames.)

`LOGNAME'
     The username of the system user.

`USER'
     Same as `LOGNAME'.  Do not confuse this with the internal variable
     of the same name.

C.11 The CVSROOT/config configuration file
==========================================

The administrative file `config' contains various miscellaneous
settings which affect the behavior of CVS.  The syntax is slightly
different from the other administrative files.  Variables are not
expanded.  Lines which start with `#' are considered comments.  Other
lines consist of a keyword, `=', and a value.  Note that this syntax is
very strict.  Extraneous spaces or tabs are not permitted.

   Currently defined keywords are:

`RCSBIN=BINDIR'
     For CVS 1.9.12 through 1.9.18, this setting told CVS to look for
     RCS programs in the BINDIR directory.  Current versions of CVS do
     not run RCS programs; for compatibility this setting is accepted,
     but it does nothing.

`SystemAuth=VALUE'
     If VALUE is `yes', then pserver should check for users in the
     system's user database if not found in `CVSROOT/passwd'.  If it is
     `no', then all pserver users must exist in `CVSROOT/passwd'.  The
     default is `yes'.  For more on pserver, see Password authenticated.

`TopLevelAdmin=VALUE'
     Modify the `checkout' command to create a `CVS' directory at the
     top level of the new working directory, in addition to `CVS'
     directories created within checked-out directories.  The default
     value is `no'.

     This option is useful if you find yourself performing many
     commands at the top level of your working directory, rather than
     in one of the checked out subdirectories.  The `CVS' directory
     created there will mean you don't have to specify `CVSROOT' for
     each command.  It also provides a place for the `CVS/Template'
     file (see Working directory storage).

`LockDir=DIRECTORY'
     Put CVS lock files in DIRECTORY rather than directly in the
     repository.  This is useful if you want to let users read from the
     repository while giving them write access only to DIRECTORY, not
     to the repository.  It can also be used to put the locks on a very
     fast in-memory file system to speed up locking and unlocking the
     repository.  You need to create DIRECTORY, but CVS will create
     subdirectories of DIRECTORY as it needs them.  For information on
     CVS locks, see Concurrency.

     Before enabling the LockDir option, make sure that you have
     tracked down and removed any copies of CVS 1.9 or older.  Such
     versions neither support LockDir, nor will give an error
     indicating that they don't support it.  The result, if this is
     allowed to happen, is that some CVS users will put the locks one
     place, and others will put them another place, and therefore the
     repository could become corrupted.  CVS 1.10 does not support
     LockDir but it will print a warning if run on a repository with
     LockDir enabled.

`LogHistory=VALUE'
     Control what is logged to the `CVSROOT/history' file (see
     history).  Default of `TOEFWUPCGMAR' (or simply `all') will log
     all transactions.  Any subset of the default is legal.  (For
     example, to only log transactions that modify the `*,v' files, use
     `LogHistory=TMAR'.)

`RereadLogAfterVerify=VALUE'
     Modify the `commit' command such that CVS will reread the log
     message after running the program specified by `verifymsg'.  VALUE
     may be one of `yes' or `always', indicating that the log message
     should always be reread; `no' or `never', indicating that it
     should never be reread; or VALUE may be `stat', indicating that
     the file should be checked with the file system `stat()' function
     to see if it has changed (see warning below) before rereading.
     The default value is `always'.

     *The `stat' mode can cause CVS to pause for up to one extra second
     per directory committed.  This can be less IO and CPU intensive
     but is not recommended for use with large repositories*

     See verifymsg, for more information on how verifymsg may be
     used.

`IgnoreUnknownConfigKeys=VALUE'
     If VALUE is `yes', then CVS should ignore any keywords in
     `CVSROOT/config' which it does not recognize. This option is
     intended primarily for transitions between versions of CVS which
     support more configuration options in an environment where a
     read-only mirror of the current CVS server may be maintained by
     someone else who is not yet ready to upgrade to the same version.
     It is recommended that this option be used only for a short time
     so that problems with the `CVSROOT/config' file will be found
     quickly. The default is `no'.

Appendix D All environment variables which affect CVS
*****************************************************

This is a complete list of all environment variables that affect CVS.

`$CVSIGNORE'
     A whitespace-separated list of file name patterns that CVS should
     ignore. See cvsignore.

`$CVSWRAPPERS'
     A whitespace-separated list of file name patterns that CVS should
     treat as wrappers. See Wrappers.

`$CVSREAD'
     If this is set, `checkout' and `update' will try hard to make the
     files in your working directory read-only.  When this is not set,
     the default behavior is to permit modification of your working
     files.

`$CVSUMASK'
     Controls permissions of files in the repository.  See File permissions.

`$CVSROOT'
     Should contain the full pathname to the root of the CVS source
     repository (where the RCS files are kept).  This information must
     be available to CVS for most commands to execute; if `$CVSROOT' is
     not set, or if you wish to override it for one invocation, you can
     supply it on the command line: `cvs -d cvsroot cvs_command...'
     Once you have checked out a working directory, CVS stores the
     appropriate root (in the file `CVS/Root'), so normally you only
     need to worry about this when initially checking out a working
     directory.

`$CVSEDITOR'
`$EDITOR'
`$VISUAL'
     Specifies the program to use for recording log messages during
     commit.  `$CVSEDITOR' overrides `$EDITOR', which overrides
     `$VISUAL'.  See Committing your changes for more or
     Global options for alternative ways of specifying a log editor.

`$PATH'
     If `$RCSBIN' is not set, and no path is compiled into CVS, it will
     use `$PATH' to try to find all programs it uses.

`$HOME'

`$HOMEPATH'

`$HOMEDRIVE'
     Used to locate the directory where the `.cvsrc' file, and other
     such files, are searched.  On Unix, CVS just checks for `HOME'.
     On Windows NT, the system will set `HOMEDRIVE', for example to
     `d:' and `HOMEPATH', for example to `\joe'.  On Windows 95, you'll
     probably need to set `HOMEDRIVE' and `HOMEPATH' yourself.

`$CVS_RSH'
     Specifies the external program which CVS connects with, when
     `:ext:' access method is specified.  See Connecting via rsh.

`$CVS_SSH'
     Specifies the external program which CVS connects with, when
     `:extssh:' access method is specified.  See Connecting via rsh.

`$CVS_SERVER'
     Used in client-server mode when accessing a remote repository
     using RSH.  It specifies the name of the program to start on the
     server side (and any necessary arguments) when accessing a remote
     repository using the `:ext:', `:fork:', or `:server:' access
     methods.  The default value for `:ext:' and `:server:' is `cvs';
     the default value for `:fork:' is the name used to run the client.
     See Connecting via rsh

`$CVS_PASSFILE'
     Used in client-server mode when accessing the `cvs login server'.
     Default value is `$HOME/.cvspass'.  See Password authentication client

`$CVS_CLIENT_PORT'
     Used in client-server mode to set the port to use when accessing
     the server via Kerberos, GSSAPI, or CVS's password authentication
     protocol if the port is not specified in the CVSROOT.  See
     Remote repositories

`$CVS_RCMD_PORT'
     Used in client-server mode.  If set, specifies the port number to
     be used when accessing the RCMD demon on the server side.
     (Currently not used for Unix clients).

`$CVS_CLIENT_LOG'
     Used for debugging only in client-server mode.  If set, everything
     sent to the server is logged into ``$CVS_CLIENT_LOG'.in' and
     everything sent from the server is logged into
     ``$CVS_CLIENT_LOG'.out'.

`$CVS_SERVER_SLEEP'
     Used only for debugging the server side in client-server mode.  If
     set, delays the start of the server child process the specified
     amount of seconds so that you can attach to it with a debugger.

`$CVS_IGNORE_REMOTE_ROOT'
     For CVS 1.10 and older, setting this variable prevents CVS from
     overwriting the `CVS/Root' file when the `-d' global option is
     specified.  Later versions of CVS do not rewrite `CVS/Root', so
     `CVS_IGNORE_REMOTE_ROOT' has no effect.

`$COMSPEC'
     Used under OS/2 only.  It specifies the name of the command
     interpreter and defaults to CMD.EXE.

`$TMPDIR'
`$TMP'
`$TEMP'
     Directory in which temporary files are located.  The CVS server
     uses `TMPDIR'.  See Global options, for a description of how
     to specify this.  Some parts of CVS will always use `/tmp' (via
     the `tmpnam' function provided by the system).

     On Windows NT, `TMP' is used (via the `_tempnam' function provided
     by the system).

     The `patch' program which is used by the CVS client uses `TMPDIR',
     and if it is not set, uses `/tmp' (at least with GNU patch 2.1).
     Note that if your server and client are both running CVS 1.9.10 or
     later, CVS will not invoke an external `patch' program.

Appendix E Compatibility between CVS Versions
*********************************************

The repository format is compatible going back to CVS 1.3.  But see
Watches Compatibility, if you have copies of CVS 1.6 or older
and you want to use the optional developer communication features.

   The working directory format is compatible going back to CVS 1.5.
It did change between CVS 1.3 and CVS 1.5.  If you run CVS 1.5 or newer
on a working directory checked out with CVS 1.3, CVS will convert it,
but to go back to CVS 1.3 you need to check out a new working directory
with CVS 1.3.

   The remote protocol is interoperable going back to CVS 1.5, but no
further (1.5 was the first official release with the remote protocol,
but some older versions might still be floating around).  In many cases
you need to upgrade both the client and the server to take advantage of
new features and bug fixes, however.

Appendix F Troubleshooting
**************************

If you are having trouble with CVS, this appendix may help.  If there
is a particular error message which you are seeing, then you can look
up the message alphabetically.  If not, you can look through the
section on other problems to see if your problem is mentioned there.

F.1 Partial list of error messages
==================================

Here is a partial list of error messages that you may see from CVS.  It
is not a complete list--CVS is capable of printing many, many error
messages, often with parts of them supplied by the operating system,
but the intention is to list the common and/or potentially confusing
error messages.

   The messages are alphabetical, but introductory text such as `cvs
update: ' is not considered in ordering them.

   In some cases the list includes messages printed by old versions of
CVS (partly because users may not be sure which version of CVS they are
using at any particular moment).

`FILE:LINE: Assertion 'TEXT' failed'
     The exact format of this message may vary depending on your
     system.  It indicates a bug in CVS, which can be handled as
     described in BUGS.

`cvs COMMAND: authorization failed: server HOST rejected access'
     This is a generic response when trying to connect to a pserver
     server which chooses not to provide a specific reason for denying
     authorization.  Check that the username and password specified are
     correct and that the `CVSROOT' specified is allowed by
     `--allow-root' in `inetd.conf'.  See Password authenticated.

`cvs COMMAND: conflict: removed FILE was modified by second party'
     This message indicates that you removed a file, and someone else
     modified it.  To resolve the conflict, first run `cvs add FILE'.
     If desired, look at the other party's modification to decide
     whether you still want to remove it.  If you don't want to remove
     it, stop here.  If you do want to remove it, proceed with `cvs
     remove FILE' and commit your removal.

`cannot change permissions on temporary directory'
          Operation not permitted
     This message has been happening in a non-reproducible, occasional
     way when we run the client/server testsuite, both on Red Hat Linux
     3.0.3 and 4.1.  We haven't been able to figure out what causes it,
     nor is it known whether it is specific to Linux (or even to this
     particular machine!).  If the problem does occur on other unices,
     `Operation not permitted' would be likely to read `Not owner' or
     whatever the system in question uses for the unix `EPERM' error.
     If you have any information to add, please let us know as
     described in BUGS.  If you experience this error while
     using CVS, retrying the operation which produced it should work
     fine.

`cvs [server aborted]: Cannot check out files into the repository itself'
     The obvious cause for this message (especially for
     non-client/server CVS) is that the CVS root is, for example,
     `/usr/local/cvsroot' and you try to check out files when you are
     in a subdirectory, such as `/usr/local/cvsroot/test'.  However,
     there is a more subtle cause, which is that the temporary
     directory on the server is set to a subdirectory of the root
     (which is also not allowed).  If this is the problem, set the
     temporary directory to somewhere else, for example `/var/tmp'; see
     `TMPDIR' in Environment variables, for how to set the
     temporary directory.

`cannot commit files as 'root''
     See `'root' is not allowed to commit files'.

`cannot open CVS/Entries for reading: No such file or directory'
     This generally indicates a CVS internal error, and can be handled
     as with other CVS bugs (see BUGS).  Usually there is a
     workaround--the exact nature of which would depend on the
     situation but which hopefully could be figured out.

`cvs [init aborted]: cannot open CVS/Root: No such file or directory'
     This message is harmless.  Provided it is not accompanied by other
     errors, the operation has completed successfully.  This message
     should not occur with current versions of CVS, but it is documented
     here for the benefit of CVS 1.9 and older.

`cvs server: cannot open /root/.cvsignore: Permission denied'
`cvs [server aborted]: can't chdir(/root): Permission denied'
     See Connection.

`cvs [checkout aborted]: cannot rename file FILE to CVS/,,FILE: Invalid argument'
     This message has been reported as intermittently happening with
     CVS 1.9 on Solaris 2.5.  The cause is unknown; if you know more
     about what causes it, let us know as described in BUGS.

`cvs [COMMAND aborted]: cannot start server via rcmd'
     This, unfortunately, is a rather nonspecific error message which
     CVS 1.9 will print if you are running the CVS client and it is
     having trouble connecting to the server.  Current versions of CVS
     should print a much more specific error message.  If you get this
     message when you didn't mean to run the client at all, you
     probably forgot to specify `:local:', as described in
     Repository.

`ci: FILE,v: bad diff output line: Binary files - and /tmp/T2a22651 differ'
     CVS 1.9 and older will print this message when trying to check in
     a binary file if RCS is not correctly installed.  Re-read the
     instructions that came with your RCS distribution and the INSTALL
     file in the CVS distribution.  Alternately, upgrade to a current
     version of CVS, which checks in files itself rather than via RCS.

`cvs checkout: could not check out FILE'
     With CVS 1.9, this can mean that the `co' program (part of RCS)
     returned a failure.  It should be preceded by another error
     message, however it has been observed without another error
     message and the cause is not well-understood.  With the current
     version of CVS, which does not run `co', if this message occurs
     without another error message, it is definitely a CVS bug (see
     BUGS).

`cvs [login aborted]: could not find out home directory'
     This means that you need to set the environment variables that CVS
     uses to locate your home directory.  See the discussion of `HOME',
     `HOMEDRIVE', and `HOMEPATH' in Environment variables.

`cvs update: could not merge revision REV of FILE: No such file or directory'
     CVS 1.9 and older will print this message if there was a problem
     finding the `rcsmerge' program.  Make sure that it is in your
     `PATH', or upgrade to a current version of CVS, which does not
     require an external `rcsmerge' program.

`cvs [update aborted]: could not patch FILE: No such file or directory'
     This means that there was a problem finding the `patch' program.
     Make sure that it is in your `PATH'.  Note that despite
     appearances the message is _not_ referring to whether it can find
     FILE.  If both the client and the server are running a current
     version of CVS, then there is no need for an external patch
     program and you should not see this message.  But if either client
     or server is running CVS 1.9, then you need `patch'.

`cvs update: could not patch FILE; will refetch'
     This means that for whatever reason the client was unable to apply
     a patch that the server sent.  The message is nothing to be
     concerned about, because inability to apply the patch only slows
     things down and has no effect on what CVS does.

`dying gasps from SERVER unexpected'
     There is a known bug in the server for CVS 1.9.18 and older which
     can cause this.  For me, this was reproducible if I used the `-t'
     global option.  It was fixed by Andy Piper's 14 Nov 1997 change to
     src/filesubr.c, if anyone is curious.  If you see the message, you
     probably can just retry the operation which failed, or if you have
     discovered information concerning its cause, please let us know as
     described in BUGS.

`end of file from server (consult above messages if any)'
     The most common cause for this message is if you are using an
     external `rsh' or `ssh' program and it exited with an error.  In
     this case the `rsh' program should have printed a message, which
     will appear before the above message.  For more information on
     setting up a CVS client and server, see Remote repositories.

`cvs [update aborted]: EOF in key in RCS file FILE,v'
`cvs [checkout aborted]: EOF while looking for end of string in RCS file FILE,v'
     This means that there is a syntax error in the given RCS file.
     Note that this might be true even if RCS can read the file OK; CVS
     does more error checking of errors in the RCS file.  That is why
     you may see this message when upgrading from CVS 1.9 to CVS 1.10.
     The likely cause for the original corruption is hardware, the
     operating system, or the like.  Of course, if you find a case in
     which CVS seems to corrupting the file, by all means report it,
     (see BUGS).  There are quite a few variations of this error
     message, depending on exactly where in the RCS file CVS finds the
     syntax error.

`cvs commit: Executing 'mkmodules''
     This means that your repository is set up for a version of CVS
     prior to CVS 1.8.  When using CVS 1.8 or later, the above message
     will be preceded by

          cvs commit: Rebuilding administrative file database

     If you see both messages, the database is being rebuilt twice,
     which is unnecessary but harmless.  If you wish to avoid the
     duplication, and you have no versions of CVS 1.7 or earlier in
     use, remove `-i mkmodules' every place it appears in your `modules'
     file.  For more information on the `modules' file, see
     modules.

`missing author'
     Typically this can happen if you created an RCS file with your
     username set to empty.  CVS will, bogusly, create an illegal RCS
     file with no value for the author field.  The solution is to make
     sure your username is set to a non-empty value and re-create the
     RCS file.

`cvs [checkout aborted]: no such tag TAG'
     This message means that CVS isn't familiar with the tag TAG.
     Usually this means that you have mistyped a tag name; however
     there are (relatively obscure) cases in which CVS will require you
     to try a few other CVS commands involving that tag, before you
     find one which will cause CVS to update the `val-tags' file; see
     discussion of val-tags in File permissions.  You only need
     to worry about this once for a given tag; when a tag is listed in
     `val-tags', it stays there.  Note that using `-f' to not require
     tag matches does not override this check; see Common options.

`cvs [COMMAND aborted]: out of memory'
     There is insufficient (virtual) memory available to continue.  In
     client/server mode, the problem is almost certainly on the server
     rather than the client; see Server requirements for memory
     estimates.  Many systems have limits on the amount of virtual
     memory that a single process can use, so a process can run out of
     virtual memory long before the system itself has run out.  The
     method of increasing the per-process limits varies depending on
     the operating system.

`*PANIC* administration files missing'
     This typically means that there is a directory named CVS but it
     does not contain the administrative files which CVS puts in a CVS
     directory.  If the problem is that you created a CVS directory via
     some mechanism other than CVS, then the answer is simple, use a
     name other than CVS.  If not, it indicates a CVS bug (see
     BUGS).

`rcs error: Unknown option: -x,v/'
     This message will be followed by a usage message for RCS.  It
     means that you have an old version of RCS (probably supplied with
     your operating system), as well as an old version of CVS.  CVS
     1.9.18 and earlier only work with RCS version 5 and later; current
     versions of CVS do not run RCS programs.

`cvs [server aborted]: received broken pipe signal'
     This message can be caused by a loginfo program that fails to read
     all of the log information from its standard input.  If you find
     it happening in any other circumstances, please let us know as
     described in BUGS.

`'root' is not allowed to commit files'
     When committing a permanent change, CVS makes a log entry of who
     committed the change.  If you are committing the change logged in
     as "root" (not under "su" or other root-priv giving program), CVS
     cannot determine who is actually making the change.  As such, by
     default, CVS disallows changes to be committed by users logged in
     as "root".  (You can disable this option by passing the
     `--enable-rootcommit' option to `configure' and recompiling CVS.
     On some systems this means editing the appropriate `config.h' file
     before building CVS.)

`Terminated with fatal signal 11'
     This message usually indicates that CVS (the server, if you're
     using client/server mode) has run out of (virtual) memory.
     Although CVS tries to catch the error and issue a more meaningful
     message, there are many circumstances where that is not possible.
     If you appear to have lots of memory available to the system, the
     problem is most likely that you're running into a system-wide
     limit on the amount of memory a single process can use or a
     similar process-specific limit.  The mechanisms for displaying and
     setting such limits vary from system to system, so you'll have to
     consult an expert for your particular system if you don't know how
     to do that.

`Too many arguments!'
     This message is typically printed by the `log.pl' script which is
     in the `contrib' directory in the CVS source distribution.  In
     some versions of CVS, `log.pl' has been part of the default CVS
     installation.  The `log.pl' script gets called from the `loginfo'
     administrative file.  Check that the arguments passed in `loginfo'
     match what your version of `log.pl' expects.  In particular, the
     `log.pl' from CVS 1.3 and older expects the log file as an
     argument whereas the `log.pl' from CVS 1.5 and newer expects the
     log file to be specified with a `-f' option.  Of course, if you
     don't need `log.pl' you can just comment it out of `loginfo'.

`cvs [update aborted]: unexpected EOF reading FILE,v'
     See `EOF in key in RCS file'.

`cvs [login aborted]: unrecognized auth response from SERVER'
     This message typically means that the server is not set up
     properly.  For example, if `inetd.conf' points to a nonexistent
     cvs executable.  To debug it further, find the log file which
     inetd writes (`/var/log/messages' or whatever inetd uses on your
     system).  For details, see Connection, and Password authentication server.

`cvs commit: Up-to-date check failed for `FILE''
     This means that someone else has committed a change to that file
     since the last time that you did a `cvs update'.  So before
     proceeding with your `cvs commit' you need to `cvs update'.  CVS
     will merge the changes that you made and the changes that the
     other person made.  If it does not detect any conflicts it will
     report `M FILE' and you are ready to `cvs commit'.  If it detects
     conflicts it will print a message saying so, will report `C FILE',
     and you need to manually resolve the conflict.  For more details
     on this process see Conflicts example.

`Usage:	diff3 [-exEX3 [-i | -m] [-L label1 -L label3]] file1 file2 file3'
          Only one of [exEX3] allowed
     This indicates a problem with the installation of `diff3' and
     `rcsmerge'.  Specifically `rcsmerge' was compiled to look for GNU
     diff3, but it is finding unix diff3 instead.  The exact text of
     the message will vary depending on the system.  The simplest
     solution is to upgrade to a current version of CVS, which does not
     rely on external `rcsmerge' or `diff3' programs.

`warning: unrecognized response `TEXT' from cvs server'
     If TEXT contains a valid response (such as `ok') followed by an
     extra carriage return character (on many systems this will cause
     the second part of the message to overwrite the first part), then
     it probably means that you are using the `:ext:' access method
     with a version of rsh, such as most non-unix rsh versions, which
     does not by default provide a transparent data stream.  In such
     cases you probably want to try `:server:' instead of `:ext:'.  If
     TEXT is something else, this may signify a problem with your CVS
     server.  Double-check your installation against the instructions
     for setting up the CVS server.

`cvs commit: [TIME] waiting for USER's lock in DIRECTORY'
     This is a normal message, not an error.  See Concurrency,
     for more details.

`cvs commit: warning: editor session failed'
     This means that the editor which CVS is using exits with a nonzero
     exit status.  Some versions of vi will do this even when there was
     not a problem editing the file.  If so, point the `CVSEDITOR'
     environment variable to a small script such as:

          #!/bin/sh
          vi $*
          exit 0

`cvs update: warning: FILE was lost'
     This means that the working copy of FILE has been deleted but it
     has not been removed from CVS.  This is nothing to be concerned
     about, the update will just recreate the local file from the
     repository.  (This is a convenient way to discard local changes to
     a file: just delete it and then run `cvs update'.)

`cvs update: warning: FILE is not (any longer) pertinent'
     This means that the working copy of FILE has been deleted, it has
     not been removed from CVS in the current working directory, but it
     has been removed from CVS in some other working directory.  This
     is nothing to be concerned about, the update would have removed
     the local file anyway.

F.2 Trouble making a connection to a CVS server
===============================================

This section concerns what to do if you are having trouble making a
connection to a CVS server.  If you are running the CVS command line
client running on Windows, first upgrade the client to CVS 1.9.12 or
later.  The error reporting in earlier versions provided much less
information about what the problem was.  If the client is non-Windows,
CVS 1.9 should be fine.

   If the error messages are not sufficient to track down the problem,
the next steps depend largely on which access method you are using.

`:ext:'
     Try running the rsh program from the command line.  For example:
     "rsh servername cvs -v" should print CVS version information.  If
     this doesn't work, you need to fix it before you can worry about
     CVS problems.

`:server:'
     You don't need a command line rsh program to use this access
     method, but if you have an rsh program around, it may be useful as
     a debugging tool.  Follow the directions given for :ext:.

`:pserver:'
     Errors along the lines of "connection refused" typically indicate
     that inetd isn't even listening for connections on port 2401
     whereas errors like "connection reset by peer", "received broken
     pipe signal", "recv() from server: EOF", or "end of file from
     server" typically indicate that inetd is listening for connections
     but is unable to start CVS (this is frequently caused by having an
     incorrect path in `inetd.conf' or by firewall software rejecting
     the connection).  "unrecognized auth response" errors are caused
     by a bad command line in `inetd.conf', typically an invalid option
     or forgetting to put the `pserver' command at the end of the line.
     Another less common problem is invisible control characters that
     your editor "helpfully" added without you noticing.

     One good debugging tool is to "telnet servername 2401".  After
     connecting, send any text (for example "foo" followed by return).
     If CVS is working correctly, it will respond with

          cvs [pserver aborted]: bad auth protocol start: foo

     If instead you get:

          Usage: cvs [cvs-options] command [command-options-and-arguments]
          ...

     then you're missing the `pserver' command at the end of the line
     in `inetd.conf'; check to make sure that the entire command is on
     one line and that it's complete.

     Likewise, if you get something like:

          Unknown command: `pserved'

          CVS commands are:
                  add          Add a new file/directory to the repository
          ...

     then you've misspelled `pserver' in some way.  If it isn't
     obvious, check for invisible control characters (particularly
     carriage returns) in `inetd.conf'.

     If it fails to work at all, then make sure inetd is working right.
     Change the invocation in `inetd.conf' to run the echo program
     instead of cvs.  For example:

          2401  stream  tcp  nowait  root /bin/echo echo hello

     After making that change and instructing inetd to re-read its
     configuration file, "telnet servername 2401" should show you the
     text hello and then the server should close the connection.  If
     this doesn't work, you need to fix it before you can worry about
     CVS problems.

     On AIX systems, the system will often have its own program trying
     to use port 2401.  This is AIX's problem in the sense that port
     2401 is registered for use with CVS.  I hear that there is an AIX
     patch available to address this problem.

     Another good debugging tool is the `-d' (debugging) option to
     inetd.  Consult your system documentation for more information.

     If you seem to be connecting but get errors like:

          cvs server: cannot open /root/.cvsignore: Permission denied
          cvs [server aborted]: can't chdir(/root): Permission denied

     then you probably haven't specified `-f' in `inetd.conf'.  (In
     releases prior to CVS 1.11.1, this problem can be caused by your
     system setting the `$HOME' environment variable for programs being
     run by inetd.  In this case, you can either have inetd run a shell
     script that unsets `$HOME' and then runs CVS, or you can use `env'
     to run CVS with a pristine environment.)

     If you can connect successfully for a while but then can't, you've
     probably hit inetd's rate limit.  (If inetd receives too many
     requests for the same service in a short period of time, it
     assumes that something is wrong and temporarily disables the
     service.)  Check your inetd documentation to find out how to
     adjust the rate limit (some versions of inetd have a single rate
     limit, others allow you to set the limit for each service
     separately.)

F.3 Other common problems
=========================

Here is a list of problems which do not fit into the above categories.
They are in no particular order.

   * On Windows, if there is a 30 second or so delay when you run a CVS
     command, it may mean that you have your home directory set to
     `C:/', for example (see `HOMEDRIVE' and `HOMEPATH' in
     Environment variables).  CVS expects the home directory to not
     end in a slash, for example `C:' or `C:\cvs'.

   * If you are running CVS 1.9.18 or older, and `cvs update' finds a
     conflict and tries to merge, as described in Conflicts example,
     but doesn't tell you there were conflicts, then you may
     have an old version of RCS.  The easiest solution probably is to
     upgrade to a current version of CVS, which does not rely on
     external RCS programs.

Appendix G Credits
******************

Roland Pesch, then of Cygnus Support <roland@wrs.com> wrote the manual
pages which were distributed with CVS 1.3.  Much of their text was
copied into this manual.  He also read an early draft of this manual
and contributed many ideas and corrections.

   The mailing-list `info-cvs' is sometimes informative. I have
included information from postings made by the following persons: David
G. Grubbs <dgg@think.com>.

   Some text has been extracted from the man pages for RCS.

   The CVS FAQ by David G. Grubbs has provided useful material.  The
FAQ is no longer maintained, however, and this manual is about the
closest thing there is to a successor (with respect to documenting how
to use CVS, at least).

   In addition, the following persons have helped by telling me about
mistakes I've made:

     Roxanne Brunskill <rbrunski@datap.ca>,
     Kathy Dyer <dyer@phoenix.ocf.llnl.gov>,
     Karl Pingle <pingle@acuson.com>,
     Thomas A Peterson <tap@src.honeywell.com>,
     Inge Wallin <ingwa@signum.se>,
     Dirk Koschuetzki <koschuet@fmi.uni-passau.de>
     and Michael Brown <brown@wi.extrel.com>.

   The list of contributors here is not comprehensive; for a more
complete list of who has contributed to this manual see the file
`doc/ChangeLog' in the CVS source distribution.

Appendix H Dealing with bugs in CVS or this manual
**************************************************

Neither CVS nor this manual is perfect, and they probably never will
be.  If you are having trouble using CVS, or think you have found a
bug, there are a number of things you can do about it.  Note that if
the manual is unclear, that can be considered a bug in the manual, so
these problems are often worth doing something about as well as
problems with CVS itself.

   * If you want someone to help you and fix bugs that you report,
     there are companies which will do that for a fee.  One such
     company is:

          Ximbiot LLC
          Suite 230
          200 Diversion St.
          Rochester Hills, MI  48307-6636
          USA
          Email: info@ximbiot.com
          Phone: (248) 835-1260
          Fax:   (248) 835-1263
          `http://ximbiot.com/'

   * If you got CVS through a distributor, such as an operating system
     vendor or a vendor of freeware CD-ROMs, you may wish to see
     whether the distributor provides support.  Often, they will provide
     no support or minimal support, but this may vary from distributor
     to distributor.

   * If you have the skills and time to do so, you may wish to fix the
     bug yourself.  If you wish to submit your fix for inclusion in
     future releases of CVS, see the file HACKING in the CVS source
     distribution.  It contains much more information on the process of
     submitting fixes.

   * There may be resources on the net which can help.  A good place to
     start is:

          `http://cvs.nongnu.org/'

     If you are so inspired, increasing the information available on
     the net is likely to be appreciated.  For example, before the
     standard CVS distribution worked on Windows 95, there was a web
     page with some explanation and patches for running CVS on Windows
     95, and various people helped out by mentioning this page on
     mailing lists or newsgroups when the subject came up.

   * It is also possible to report bugs to <bug-cvs@nongnu.org>.  Note
     that someone may or may not want to do anything with your bug
     report--if you need a solution consider one of the options
     mentioned above.  People probably do want to hear about bugs which
     are particularly severe in consequences and/or easy to fix,
     however.  You can also increase your odds by being as clear as
     possible about the exact nature of the bug and any other relevant
     information.  The way to report bugs is to send email to
     <bug-cvs@nongnu.org>.  Note that submissions to
     <bug-cvs@nongnu.org> may be distributed under the terms of the GNU
     Public License, so if you don't like this, don't submit them.
     There is usually no justification for sending mail directly to one
     of the CVS maintainers rather than to <bug-cvs@nongnu.org>; those
     maintainers who want to hear about such bug reports read
     <bug-cvs@nongnu.org>.  Also note that sending a bug report to
     other mailing lists or newsgroups is _not_ a substitute for
     sending it to <bug-cvs@nongnu.org>.  It is fine to discuss CVS
     bugs on whatever forum you prefer, but there are not necessarily
     any maintainers reading bug reports sent anywhere except
     <bug-cvs@nongnu.org>.

   People often ask if there is a list of known bugs or whether a
particular bug is a known one.  The file BUGS in the CVS source
distribution is one list of known bugs, but it doesn't necessarily try
to be comprehensive.  Perhaps there will never be a comprehensive,
detailed list of known bugs.