== CVS&mdash;Concurrent Versions System v4.2 ==

<div id="Top"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[ &lt; ]</td>
<td valign="middle" align="left">|[[#Overview| &gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="SEC_Top"></div>

This info manual describes how to use and administer
<small>CVS</small> version 4.2.


 [[#Overview|&bull; Overview]]::                    An introduction to CVS
 [[#The Repository|&bull; Repository]]::                  Where all your sources are stored
 [[#Starting a project with CVS|&bull; Starting a new project]]::      Starting a project with CVS
 [[#Revisions|&bull; Revisions]]::                   Numeric and symbolic names for revisions
 [[#Branching and merging|&bull; Branching and merging]]::       Diverging/rejoining branches of development
 [[#Recursive behavior|&bull; Recursive behavior]]::          CVS descends directories
 [[#Adding, removing, and renaming files and directories|&bull; Adding and removing]]::         Adding/removing/renaming files/directories
 [[#History browsing|&bull; History browsing]]::            Viewing the history of files in various ways
 
 CVS and the Real World.
 -----------------------
 [[#Handling binary files|&bull; Binary files]]::                CVS can handle binary files
 [[#Multiple developers|&bull; Multiple developers]]::         How CVS helps a group of developers
 [[#Revision management|&bull; Revision management]]::         Policy questions for revision management
 [[#Keyword substitution|&bull; Keyword substitution]]::        CVS can include the revision inside the file
 [[#Tracking third-party sources|&bull; Tracking sources]]::            Tracking third-party sources
 [[#How your build system interacts with CVS|&bull; Builds]]::                      Issues related to CVS and builds
 [[#Special Files|&bull; Special Files]]::		Devices, links and other non-regular files
 
 References.
 -----------
 [[#Guide to CVS commands|&bull; CVS commands]]::                CVS commands share some things
 [[#Quick reference to CVS commands|&bull; Invoking CVS]]::                Quick reference to CVS commands
 [[#Reference manual for Administrative files|&bull; Administrative files]]::        Reference manual for the Administrative files
 [[#All environment variables which affect CVS|&bull; Environment variables]]::       All environment variables which affect CVS
 [[#Compatibility between CVS Versions|&bull; Compatibility]]::               Upgrading CVS versions
 [[#Troubleshooting|&bull; Troubleshooting]]::             Some tips when nothing works
 [[#Credits|&bull; Credits]]::                     Some of the contributors to this manual
 [[#Dealing with bugs in CVS or this manual|&bull; BUGS]]::                        Dealing with bugs in CVS or this manual
 [[#Index|&bull; Index]]::                       Index

<hr size="6">
<div id="Overview"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Top| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#What is CVS?| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Overview-1"></div>
== Overview ==
<div id="index-Overview"></div>

This chapter is for people who have never used
<small>CVS</small>, and perhaps have never used version control
software before.

If you are already familiar with <small>CVS</small> and are just
trying to learn a particular feature or remember a
certain command, you can probably skip everything here.

 [[#What is CVS?|&bull; What is CVS?]]::                What you can do with CVS
 [[#What is CVS not?|&bull; What is CVS not?]]::            Problems CVS doesn't try to solve
 [[#A sample session|&bull; A sample session]]::            A tour of basic CVS usage


----

<div id="What-is-CVS_003f"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Overview| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Overview| Up ]]|</td>
<td valign="middle" align="left">|[[#What is CVS not?| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="What-is-CVS_003f-1"></div>
=== What is CVS? ===
<div id="index-What-is-CVS_003f"></div>
<div id="index-Introduction-to-CVS"></div>
<div id="index-CVS_002c-introduction-to"></div>

<small>CVS</small> is a version control system.  Using it, you can
record the history of your source files.


For example, bugs sometimes creep in when
software is modified, and you might not detect the bug
until a long time after you make the modification.
With <small>CVS</small>, you can easily retrieve old versions to see
exactly which change caused the bug.  This can
sometimes be a big help.

You could of course save every version of every file
you have ever created.  This would
however waste an enormous amount of disk space.  <small>CVS</small>
stores all the versions of a file in a single file in a
clever way that only stores the differences between
versions.

<small>CVS</small> also helps you if you are part of a group of people working
on the same project.  It is all too easy to overwrite
each others&rsquo; changes unless you are extremely careful.
Some editors, like <small>GNU</small> Emacs, try to make sure that
the same file is never modified by two people at the
same time.  Unfortunately, if someone is using another
editor, that safeguard will not work.  <small>CVS</small> solves this problem
by insulating the different developers from each other.  Every
developer works in his own directory, and <small>CVS</small> merges
the work when each developer is done.

<div id="index-History-of-CVS"></div>
<div id="index-CVS_002c-history-of"></div>
<div id="index-Credits-_0028CVS-program_0029"></div>
<div id="index-Contributors-_0028CVS-program_0029"></div>
<small>CVS</small> started out as a bunch of shell scripts written by
Dick Grune, posted to the newsgroup
<code>comp.sources.unix</code> in the volume 6
release of July, 1986.  While no actual code from
these shell scripts is present in the current version
of <small>CVS</small> much of the <small>CVS</small> conflict resolution algorithms
come from them.

In April, 1989, Brian Berliner designed and coded <small>CVS</small>.
Jeff Polk later helped Brian with the design of the <small>CVS</small>
module and vendor branch support.

<div id="index-Source_002c-getting-CVS-source"></div>
You can get <small>CVS</small> in a variety of ways, including
free download from the internet.  For more information
on downloading <small>CVS</small> and other <small>CVS</small> topics, see:

<div class="example" style="margin-left: 3.2em">
 http://www.cvshome.org/
 http://www.loria.fr/~molli/cvs-index.html
</div>

<div id="index-Mailing-list"></div>
<div id="index-List_002c-mailing-list"></div>
<div id="index-Newsgroups"></div>
There is a mailing list, known as <code><span class="nolinebreak" style="white-space:pre">info-cvs</span></code>,
devoted to <small>CVS</small>.  To subscribe or
unsubscribe
write to
<code><span class="nolinebreak" style="white-space:pre">info-cvs-request</span>@gnu.org</code>.
If you prefer a usenet group, the right
group is <code>comp.software.config-mgmt</code> which is for
<small>CVS</small> discussions (along with other configuration
management systems).  In the future, it might be
possible to create a
<code>comp.software.config-mgmt.cvs</code>, but probably only
if there is sufficient <small>CVS</small> traffic on
<code>comp.software.config-mgmt</code>.

You can also subscribe to the <code>bug-cvs</code> mailing list,
described in more detail in [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]].  To subscribe
send mail to <code>bug-cvs-request@gnu.org</code>.


----

<div id="What-is-CVS-not_003f"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#What is CVS?| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Overview| Up ]]|</td>
<td valign="middle" align="left">|[[#A sample session| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="What-is-CVS-not_003f-1"></div>
=== What is CVS not? ===
<div id="index-What-is-CVS-not_003f"></div>

<small>CVS</small> can do a lot of things for you, but it does
not try to be everything for everyone.

;<small>CVS</small> is not a build system.

: Though the structure of your repository and modules file interact with your build system (e.g. &lsquo;<tt>Makefile</tt>&rsquo;s), they are essentially independent.

: <small>CVS</small> does not dictate how you build anything.  It merely stores files for retrieval in a tree structure you devise.

: <small>CVS</small> does not dictate how to use disk space in the checked out working directories.  If you write your &lsquo;<tt>Makefile</tt>&rsquo;s or scripts in every directory so they have to know the relative positions of everything else, you wind up requiring the entire repository to be checked out.

: If you modularize your work, and construct a build system that will share files (via links, mounts, <code>VPATH</code> in &lsquo;<tt>Makefile</tt>&rsquo;s, etc.), you can arrange your disk usage however you like.

: But you have to remember that ''any'' such system is a lot of work to construct and maintain.  <small>CVS</small> does not address the issues involved.

: Of course, you should place the tools created to support such a build system (scripts, &lsquo;<tt>Makefile</tt>&rsquo;s, etc) under <small>CVS</small>.

: Figuring out what files need to be rebuilt when something changes is, again, something to be handled outside the scope of <small>CVS</small>.  One traditional approach is to use <code>make</code> for building, and use some automated tool for generating the dependencies which <code>make</code> uses.

: See [[#How your build system interacts with CVS|How your build system interacts with CVS]], for more information on doing builds in conjunction with <small>CVS</small>.

;<small>CVS</small> is not a substitute for management.

: Your managers and project leaders are expected to talk to you frequently enough to make certain you are aware of schedules, merge points, branch names and release dates.  If they don&rsquo;t, <small>CVS</small> can&rsquo;t help.

: <small>CVS</small> is an instrument for making sources dance to your tune.  But you are the piper and the composer.  No instrument plays itself or writes its own music.

;<small>CVS</small> is not a substitute for developer communication.

: When faced with conflicts within a single file, most developers manage to resolve them without too much effort.  But a more general definition of &ldquo;conflict&rdquo; includes problems too difficult to solve without communication between developers.

: <small>CVS</small> cannot determine when simultaneous changes within a single file, or across a whole collection of files, will logically conflict with one another.  Its concept of a <em>conflict</em> is purely textual, arising when two changes to the same base file are near enough to spook the merge (i.e. <code>diff3</code>) command.

: <small>CVS</small> does not claim to help at all in figuring out non-textual or distributed conflicts in program logic.

: For example: Say you change the arguments to function <code>X</code> defined in file &lsquo;<tt>A</tt>&rsquo;.  At the same time, someone edits file &lsquo;<tt>B</tt>&rsquo;, adding new calls to function <code>X</code> using the old arguments.  You are outside the realm of <small>CVS</small>&rsquo;s competence.

: Acquire the habit of reading specs and talking to your peers.


;<small>CVS</small> does not have change control

: Change control refers to a number of things.  First of all it can mean <em>bug-tracking</em>, that is being able to keep a database of reported bugs and the status of each one (is it fixed?  in what release?  has the bug submitter agreed that it is fixed?).  For interfacing <small>CVS</small> to an external bug-tracking system, see the &lsquo;<tt>rcsinfo</tt>&rsquo; and &lsquo;<tt>verifymsg</tt>&rsquo; files (see section [[#Reference manual for Administrative files|Reference manual for Administrative files]]).

: Another aspect of change control is keeping track of the fact that changes to several files were in fact changed together as one logical change.  If you check in several files in a single <code>cvs commit</code> operation, <small>CVS</small> then forgets that those files were checked in together, and the fact that they have the same log message is the only thing tying them together.  Keeping a <small>GNU</small> style &lsquo;<tt>ChangeLog</tt>&rsquo; can help somewhat.

: Another aspect of change control, in some systems, is the ability to keep track of the status of each change.  Some changes have been written by a developer, others have been reviewed by a second developer, and so on.  Generally, the way to do this with <small>CVS</small> is to generate a diff (using <code>cvs diff</code> or <code>diff</code>) and email it to someone who can then apply it using the <code>patch</code> utility.  This is very flexible, but depends on mechanisms outside <small>CVS</small> to make sure nothing falls through the cracks.

;<small>CVS</small> is not an automated testing program

: It should be possible to enforce mandatory use of a testsuite using the <code>commitinfo</code> file.  I haven&rsquo;t heard a lot about projects trying to do that or whether there are subtle gotchas, however.

;<small>CVS</small> does not have a builtin process model

: Some systems provide ways to ensure that changes or releases go through various steps, with various approvals as needed.  Generally, one can accomplish this with <small>CVS</small> but it might be a little more work. In some cases you&rsquo;ll want to use the &lsquo;<tt>commitinfo</tt>&rsquo;, &lsquo;<tt>loginfo</tt>&rsquo;, &lsquo;<tt>rcsinfo</tt>&rsquo;, or &lsquo;<tt>verifymsg</tt>&rsquo; files, to require that certain steps be performed before cvs will allow a checkin.  Also consider whether features such as branches and tags can be used to perform tasks such as doing work in a development tree and then merging certain changes over to a stable tree only once they have been proven.


----

<div id="A-sample-session"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#What is CVS not?| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Overview| Up ]]|</td>
<td valign="middle" align="left">|[[#Getting the source| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="A-sample-session-1"></div>
=== A sample session ===
<div id="index-Example-of-a-work_002dsession"></div>
<div id="index-Getting-started"></div>
<div id="index-Work_002dsession_002c-example-of"></div>
<div id="index-tc_002c-Trivial-Compiler-_0028example_0029"></div>
<div id="index-Trivial-Compiler-_0028example_0029"></div>


As a way of introducing <small>CVS</small>, we&rsquo;ll go through a
typical work-session using <small>CVS</small>.  The first thing
to understand is that <small>CVS</small> stores all files in a
centralized <em>repository</em> (see section [[#The Repository|The Repository]]); this
section assumes that a repository is set up.

Suppose you are working on a simple compiler.  The source
consists of a handful of C files and a &lsquo;<tt>Makefile</tt>&rsquo;.
The compiler is called &lsquo;<code>tc</code>&rsquo; (Trivial Compiler),
and the repository is set up so that there is a module
called &lsquo;<code>tc</code>&rsquo;.

 [[#Getting the source|&bull; Getting the source]]::          Creating a workspace
 [[#Committing your changes|&bull; Committing your changes]]::     Making your work available to others
 [[#Cleaning up|&bull; Cleaning up]]::                 Cleaning up
 [[#Viewing differences|&bull; Viewing differences]]::         Viewing differences


----

<div id="Getting-the-source"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#A sample session| &lt; ]]|</td>
<td valign="middle" align="left">|[[#A sample session| Up ]]|</td>
<td valign="middle" align="left">|[[#Committing your changes| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Getting-the-source-1"></div>
==== Getting the source ====
<div id="index-Getting-the-source"></div>
<div id="index-Checking-out-source"></div>
<div id="index-Fetching-source"></div>
<div id="index-Source_002c-getting-from-CVS"></div>
<div id="index-Checkout_002c-example"></div>

The first thing you must do is to get your own working copy of the
source for &lsquo;<code>tc</code>&rsquo;.  For this, you use the <code>checkout</code> command:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout tc
</div>

This will create a new directory called &lsquo;<tt>tc</tt>&rsquo; and populate it with
the source files.

<div class="example" style="margin-left: 3.2em">
 $ cd tc
 $ ls
 CVS         Makefile    backend.c   driver.c    frontend.c  parser.c
</div>

The &lsquo;<tt>CVS</tt>&rsquo; directory is used internally by
<small>CVS</small>.  Normally, you should not modify or remove
any of the files in it.

You start your favorite editor, hack away at &lsquo;<tt>backend.c</tt>&rsquo;, and a couple
of hours later you have added an optimization pass to the compiler.
A note to <small>RCS</small> and <small>SCCS</small> users: There is no need to lock the files that
you want to edit.  See section [[#Multiple developers|Multiple developers]], for an explanation.


----

<div id="Committing-your-changes"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Getting the source| &lt; ]]|</td>
<td valign="middle" align="left">|[[#A sample session| Up ]]|</td>
<td valign="middle" align="left">|[[#Cleaning up| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Committing-your-changes-1"></div>
==== Committing your changes ====
<div id="index-Committing-changes-to-files"></div>
<div id="index-Log-message-entry"></div>

When you have checked that the compiler is still compilable you decide
to make a new version of &lsquo;<tt>backend.c</tt>&rsquo;.  This will
store your new &lsquo;<tt>backend.c</tt>&rsquo; in the repository and
make it available to anyone else who is using that same
repository.

<div class="example" style="margin-left: 3.2em">
 $ cvs commit backend.c
</div>

<small>CVS</small> starts an editor, to allow you to enter a log
message.  You type in &ldquo;Added an optimization pass.&rdquo;,
save the temporary file, and exit the editor.

<div id="index-CVSEDITOR_002c-environment-variable"></div>
<div id="index-EDITOR_002c-environment-variable"></div>
The environment variable <code>$CVSEDITOR</code> determines
which editor is started.  If <code>$CVSEDITOR</code> is not
set, then if the environment variable <code>$EDITOR</code> is
set, it will be used. If both <code>$CVSEDITOR</code> and
<code>$EDITOR</code> are not set then there is a default
which will vary with your operating system, for example
<code>vi</code> for unix or <code>notepad</code> for Windows
NT/95.

<div id="index-VISUAL_002c-environment-variable"></div>
In addition, <small>CVS</small> checks the <code>$VISUAL</code> environment
variable.  Opinions vary on whether this behavior is desirable and
whether future releases of <small>CVS</small> should check <code>$VISUAL</code> or
ignore it.  You will be OK either way if you make sure that
<code>$VISUAL</code> is either unset or set to the same thing as
<code>$EDITOR</code>.

When <small>CVS</small> starts the editor, it includes a list of
files which are modified.  For the <small>CVS</small> client,
this list is based on comparing the modification time
of the file against the modification time that the file
had when it was last gotten or updated.  Therefore, if
a file&rsquo;s modification time has changed but its contents
have not, it will show up as modified.  The simplest
way to handle this is simply not to worry about it&mdash;if
you proceed with the commit <small>CVS</small> will detect that
the contents are not modified and treat it as an
unmodified file.  The next <code>update</code> will clue
<small>CVS</small> in to the fact that the file is unmodified,
and it will reset its stored timestamp so that the file
will not show up in future editor sessions.

If you want to avoid
starting an editor you can specify the log message on
the command line using the &lsquo;<code>-m</code>&rsquo; flag instead, like
this:

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -m &quot;Added an optimization pass&quot; backend.c
</div>


----

<div id="Cleaning-up"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Committing your changes| &lt; ]]|</td>
<td valign="middle" align="left">|[[#A sample session| Up ]]|</td>
<td valign="middle" align="left">|[[#Viewing differences| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Cleaning-up-1"></div>
==== Cleaning up ====
<div id="index-Cleaning-up"></div>
<div id="index-Working-copy_002c-removing"></div>
<div id="index-Removing-your-working-copy"></div>
<div id="index-Releasing-your-working-copy"></div>

Before you turn to other tasks you decide to remove your working copy of
tc.  One acceptable way to do that is of course

<div class="example" style="margin-left: 3.2em">
 $ cd ..
 $ rm -r tc
</div>

but a better way is to use the <code>release</code> command (see section [[#release&mdash;Indicate that a Module is no longer in use|release&mdash;Indicate that a Module is no longer in use]]):

<div class="example" style="margin-left: 3.2em">
 $ cd ..
 $ cvs release -d tc
 M driver.c
 ? tc
 You have <nowiki>[</nowiki>1<nowiki>]</nowiki> altered files in this repository.
 Are you sure you want to release (and delete) directory `tc': n
 ** `release' aborted by user choice.
</div>

The <code>release</code> command checks that all your modifications have been
committed.  If history logging is enabled it also makes a note in the
history file.  See section [[#The history file|The history file]].

When you use the &lsquo;<code>-d</code>&rsquo; flag with <code>release</code>, it
also removes your working copy.

In the example above, the <code>release</code> command wrote a couple of lines
of output.  &lsquo;<code>? tc</code>&rsquo; means that the file &lsquo;<tt>tc</tt>&rsquo; is unknown to <small>CVS</small>.
That is nothing to worry about: &lsquo;<tt>tc</tt>&rsquo; is the executable compiler,
and it should not be stored in the repository.  See section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]],
for information about how to make that warning go away.
See section [[#release output|release output]], for a complete explanation of
all possible output from <code>release</code>.

&lsquo;<code>M driver.c</code>&rsquo; is more serious.  It means that the
file &lsquo;<tt>driver.c</tt>&rsquo; has been modified since it was
checked out.

The <code>release</code> command always finishes by telling
you how many modified files you have in your working
copy of the sources, and then asks you for confirmation
before deleting any files or making any note in the
history file.

You decide to play it safe and answer <code>n &lt;RET&gt;</code>
when <code>release</code> asks for confirmation.


----

<div id="Viewing-differences"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Cleaning up| &lt; ]]|</td>
<td valign="middle" align="left">|[[#A sample session| Up ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Viewing-differences-1"></div>
==== Viewing differences ====
<div id="index-Viewing-differences"></div>
<div id="index-Diff"></div>

You do not remember modifying &lsquo;<tt>driver.c</tt>&rsquo;, so you want to see what
has happened to that file.

<div class="example" style="margin-left: 3.2em">
 $ cd tc
 $ cvs diff driver.c
</div>

This command runs <code>diff</code> to compare the version of &lsquo;<tt>driver.c</tt>&rsquo;
that you checked out with your working copy.  When you see the output
you remember that you added a command line option that enabled the
optimization pass.  You check it in, and release the module.

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -m &quot;Added an optimization pass&quot; driver.c
 Checking in driver.c;
 /usr/local/cvsroot/tc/driver.c,v  &lt;--  driver.c
 new revision: 1.2; previous revision: 1.1
 done
 $ cd ..
 $ cvs release -d tc
 ? tc
 You have <nowiki>[</nowiki>0<nowiki>]</nowiki> altered files in this repository.
 Are you sure you want to release (and delete) directory `tc': y
</div>


----

<div id="Repository"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Overview| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Viewing differences| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Telling CVS where your repository is| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-Repository"></div>
== The Repository ==
<div id="index-Repository-_0028intro_0029"></div>
<div id="index-Repository_002c-example"></div>
<div id="index-Layout-of-repository"></div>
<div id="index-Typical-repository"></div>
<div id="index-_002fusr_002flocal_002fcvsroot_002c-as-example-repository"></div>
<div id="index-cvsroot"></div>

The <small>CVS</small> <em>repository</em> stores a complete copy of
all the files and directories which are under version
control.

Normally, you never access any of the files in the
repository directly.  Instead, you use <small>CVS</small>
commands to get your own copy of the files into a
<em>working directory</em>, and then
work on that copy.  When you&rsquo;ve finished a set of
changes, you check (or <em>commit</em>) them back into the
repository.  The repository then contains the changes
which you have made, as well as recording exactly what
you changed, when you changed it, and other such
information.  Note that the repository is not a
subdirectory of the working directory, or vice versa;
they should be in separate locations.

<div id="index-_003alocal_003a_002c-setting-up"></div>
<small>CVS</small> can access a repository by a variety of
means.  It might be on the local computer, or it might
be on a computer across the room or across the world.
To distinguish various ways to access a repository, the
repository name can start with an <em>access method</em>.
For example, the access method <code>:local:</code> means to
access a repository directory, so the repository
<code>:local:/usr/local/cvsroot</code> means that the
repository is in &lsquo;<tt>/usr/local/cvsroot</tt>&rsquo; on the
computer running <small>CVS</small>.  For information on other
access methods, see [[#Remote repositories|Remote repositories]].

If the access method is omitted, then if the repository
starts with &lsquo;<code>/</code>&rsquo;, then <code>:local:</code> is
assumed.  If it does not start with &lsquo;<code>/</code>&rsquo; then either
<code>:ext:</code> or <code>:server:</code> is assumed.  For
example, if you have a local repository in
&lsquo;<tt>/usr/local/cvsroot</tt>&rsquo;, you can use
<code>/usr/local/cvsroot</code> instead of
<code>:local:/usr/local/cvsroot</code>.  But if (under
Windows NT, for example) your local repository is
&lsquo;<tt>c:\src\cvsroot</tt>&rsquo;, then you must specify the access
method, as in <code>:local:c:/src/cvsroot</code>.

The repository is split in two parts.  &lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo; contains
administrative files for <small>CVS</small>.  The other directories contain the actual
user-defined modules.

 [[#Telling CVS where your repository is|&bull; Specifying a repository]]::     Telling CVS where your repository is
 [[#How data is stored in the repository|&bull; Repository storage]]::          The structure of the repository
 [[#How data is stored in the working directory|&bull; Working directory storage]]::   The structure of working directories
 [[#The administrative files|&bull; Intro administrative files]]::  Defining modules
 [[#Multiple repositories|&bull; Multiple repositories]]::       Multiple repositories
 [[#Creating a repository|&bull; Creating a repository]]::       Creating a repository
 [[#Backing up a repository|&bull; Backing up]]::                  Backing up a repository
 [[#Moving a repository|&bull; Moving a repository]]::         Moving a repository
 [[#Remote repositories|&bull; Remote repositories]]::         Accessing repositories on remote machines
 [[#Read-only repository access|&bull; Read-only access]]::            Granting read-only access to the repository
 [[#Temporary directories for the server|&bull; Server temporary directory]]::  The server creates temporary directories


----

<div id="Specifying-a-repository"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Telling-CVS-where-your-repository-is"></div>
=== Telling CVS where your repository is ===

There are several ways to tell <small>CVS</small>
where to find the repository.  You can name the
repository on the command line explicitly, with the
<code>-d</code> (for &quot;directory&quot;) option:

<div class="example" style="margin-left: 3.2em">
 cvs -d /usr/local/cvsroot checkout yoyodyne/tc
</div>

<div id="index-_002eprofile_002c-setting-CVSROOT-in"></div>
<div id="index-_002ecshrc_002c-setting-CVSROOT-in"></div>
<div id="index-_002etcshrc_002c-setting-CVSROOT-in"></div>
<div id="index-_002ebashrc_002c-setting-CVSROOT-in"></div>
<div id="index-CVSROOT_002c-environment-variable"></div>
Or you can set the <code>$CVSROOT</code> environment
variable to an absolute path to the root of the
repository, &lsquo;<tt>/usr/local/cvsroot</tt>&rsquo; in this example.
To set <code>$CVSROOT</code>, <code>csh</code> and <code>tcsh</code>
users should have this line in their &lsquo;<tt>.cshrc</tt>&rsquo; or
&lsquo;<tt>.tcshrc</tt>&rsquo; files:

<div class="example" style="margin-left: 3.2em">
 setenv CVSROOT /usr/local/cvsroot
</div>

<code>sh</code> and <code>bash</code> users should instead have these lines in their
&lsquo;<tt>.profile</tt>&rsquo; or &lsquo;<tt>.bashrc</tt>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 CVSROOT=/usr/local/cvsroot
 export CVSROOT
</div>

<div id="index-Root-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fRoot-file"></div>
A repository specified with <code>-d</code> will
override the <code>$CVSROOT</code> environment variable.
Once you&rsquo;ve checked a working copy out from the
repository, it will remember where its repository is
(the information is recorded in the
&lsquo;<tt>CVS/Root</tt>&rsquo; file in the working copy).

The <code>-d</code> option and the &lsquo;<tt>CVS/Root</tt>&rsquo; file both
override the <code>$CVSROOT</code> environment variable.  If
<code>-d</code> option differs from &lsquo;<tt>CVS/Root</tt>&rsquo;, the
former is used.  Of course, for proper operation they
should be two ways of referring to the same repository.


----

<div id="Repository-storage"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Telling CVS where your repository is| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Where files are stored within the repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-data-is-stored-in-the-repository"></div>
=== How data is stored in the repository ===
<div id="index-Repository_002c-how-data-is-stored"></div>

For most purposes it isn&rsquo;t important ''how''
<small>CVS</small> stores information in the repository.  In
fact, the format has changed in the past, and is likely
to change in the future.  Since in almost all cases one
accesses the repository via <small>CVS</small> commands, such
changes need not be disruptive.

However, in some cases it may be necessary to
understand how <small>CVS</small> stores data in the repository,
for example you might need to track down <small>CVS</small> locks
(see section [[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]) or you might need to deal with
the file permissions appropriate for the repository.

 [[#Where files are stored within the repository|&bull; Repository files]]::            What files are stored in the repository
 [[#File permissions|&bull; File permissions]]::            File permissions
 [[#File Permission issues specific to Windows|&bull; Windows permissions]]::         Issues specific to Windows
 [[#The attic|&bull; Attic]]::                       Some files are stored in the Attic
 [[#The CVS directory in the repository|&bull; CVS in repository]]::           Additional information in CVS directory
 [[#CVS locks in the repository|&bull; Locks]]::                       CVS locks control concurrent accesses
 [[#How files are stored in the CVSROOT directory|&bull; CVSROOT storage]]::             A few things about CVSROOT are different


----

<div id="Repository-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#File permissions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Where-files-are-stored-within-the-repository"></div>
==== Where files are stored within the repository ====


The overall structure of the repository is a directory
tree corresponding to the directories in the working
directory.  For example, supposing the repository is in

<div class="example" style="margin-left: 3.2em">
 /usr/local/cvsroot
</div>

here is a possible directory tree (showing only the
directories):

<div class="example" style="margin-left: 3.2em">
 <tt>/usr</tt>
  |
  +--<tt>local</tt>
  |   |
  |   +--<tt>cvsroot</tt>
  |   |    |
  |   |    +--<tt>CVSROOT</tt>
           |      (administrative files)
           |
           +--<tt>gnu</tt>
           |   |
           |   +--<tt>diff</tt>
           |   |   (source code to GNU diff)
           |   |
           |   +--<tt>rcs</tt>
           |   |   (source code to RCS)
           |   |
           |   +--<tt>cvs</tt>
           |       (source code to CVS)
           |
           +--<tt>yoyodyne</tt>
               |
               +--<tt>tc</tt>
               |    |
               |    +--<tt>man</tt>
               |    |
               |    +--<tt>testing</tt>
               |
               +--(other Yoyodyne software)
</div>

With the directories are <em>history files</em> for each file
under version control.  The name of the history file is
the name of the corresponding file with &lsquo;<code>,v</code>&rsquo;
appended to the end.  Here is what the repository for
the &lsquo;<tt>yoyodyne/tc</tt>&rsquo; directory might look like:
<div class="example" style="margin-left: 3.2em">
   <code>$CVSROOT</code>
     |
     +--<tt>yoyodyne</tt>
     |   |
     |   +--<tt>tc</tt>
     |   |   |
             +--<tt>Makefile,v</tt>
             +--<tt>backend.c,v</tt>
             +--<tt>driver.c,v</tt>
             +--<tt>frontend.c,v</tt>
             +--<tt>parser.c,v</tt>
             +--<tt>man</tt>
             |    |
             |    +--<tt>tc.1,v</tt>
             |
             +--<tt>testing</tt>
                  |
                  +--<tt>testpgm.t,v</tt>
                  +--<tt>test2.t,v</tt>
</div>

<div id="index-History-files"></div>
<div id="index-RCS-history-files"></div>
The history files contain, among other things, enough
information to recreate any revision of the file, a log
of all commit messages and the user-name of the person
who committed the revision.  The history files are
known as <em>RCS files</em>, because the first program to
store files in that format was a version control system
known as <small>RCS</small>.  For a full
description of the file format, see the <code>man</code> page
<cite>rcsfile(5)</cite>, distributed with <small>RCS</small>, or the
file &lsquo;<tt>doc/RCSFILES</tt>&rsquo; in the <small>CVS</small> source
distribution.  This
file format has become very common&mdash;many systems other
than <small>CVS</small> or <small>RCS</small> can at least import history
files in this format.

The <small>RCS</small> files used in <small>CVS</small> differ in a few
ways from the standard format.  The biggest difference
is magic branches; for more information see [[#Magic branch numbers|Magic branch numbers]].  Also in <small>CVS</small> the valid tag names
are a subset of what <small>RCS</small> accepts; for <small>CVS</small>&rsquo;s
rules see [[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]].


----

<div id="File-permissions"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Where files are stored within the repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#File Permission issues specific to Windows| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="File-permissions-1"></div>
==== File permissions ====
<div id="index-Security_002c-file-permissions-in-repository"></div>
<div id="index-File-permissions_002c-general"></div>
<div id="index-Permissions_002c-general"></div>
<div id="index-Group"></div>
<div id="index-Read_002donly-files_002c-in-repository"></div>
All &lsquo;<code>,v</code>&rsquo; files are created read-only, and you
should not change the permission of those files.  The
directories inside the repository should be writable by
the persons that have permission to modify the files in
each directory.  This normally means that you must
create a UNIX group (see group(5)) consisting of the
persons that are to edit the files in a project, and
set up the repository so that it is that group that
owns the directory.
(On some systems, you also need to set the set-group-ID-on-execution bit
on the repository directories (see chmod(1)) so that newly-created files
and directories get the group-ID of the parent directory rather than
that of the current process.)


This means that you can only control access to files on
a per-directory basis.

Note that users must also have write access to check
out files, because <small>CVS</small> needs to create lock files
(see section [[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]).  You can use LockDir in CVSROOT/config
to put the lock files somewhere other than in the repository
if you want to allow read-only access to some directories
(see section [[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]).

Also note that users must have write access to the
&lsquo;<tt>CVSROOT/val-tags</tt>&rsquo; file.  <small>CVS</small> uses it to keep
track of what tags are valid tag names (it is sometimes
updated when tags are used, as well as when they are
created).

Each <small>RCS</small> file will be owned by the user who last
checked it in.  This has little significance; what
really matters is who owns the directories.

<div id="index-CVSUMASK_002c-environment-variable"></div>
<div id="index-Umask_002c-for-repository-files"></div>
<small>CVS</small> tries to set up reasonable file permissions
for new directories that are added inside the tree, but
you must fix the permissions manually when a new
directory should have different permissions than its
parent directory.  If you set the <code>CVSUMASK</code>
environment variable that will control the file
permissions which <small>CVS</small> uses in creating directories
and/or files in the repository.  <code>CVSUMASK</code> does
not affect the file permissions in the working
directory; such files have the permissions which are
typical for newly created files, except that sometimes
<small>CVS</small> creates them read-only (see the sections on
watches, [[#Telling CVS to watch certain files|Telling CVS to watch certain files]]; -r, [[#Global options|Global options]]; or <code>CVSREAD</code>, [[#All environment variables which affect CVS|All environment variables which affect CVS]]).

Note that using the client/server <small>CVS</small>
(see section [[#Remote repositories|Remote repositories]]), there is no good way to
set <code>CVSUMASK</code>; the setting on the client machine
has no effect.  If you are connecting with <code>rsh</code>, you
can set <code>CVSUMASK</code> in &lsquo;<tt>.bashrc</tt>&rsquo; or &lsquo;<tt>.cshrc</tt>&rsquo;, as
described in the documentation for your operating
system.  This behavior might change in future versions
of <small>CVS</small>; do not rely on the setting of
<code>CVSUMASK</code> on the client having no effect.

Using pserver, you will generally need stricter
permissions on the <small>CVSROOT</small> directory and
directories above it in the tree; see [[#Security considerations with password authentication|Security considerations with password authentication]].

<div id="index-Setuid"></div>
<div id="index-Setgid"></div>
<div id="index-Security_002c-setuid"></div>
<div id="index-Installed-images-_0028VMS_0029"></div>
Some operating systems have features which allow a
particular program to run with the ability to perform
operations which the caller of the program could not.
For example, the set user ID (setuid) or set group ID
(setgid) features of unix or the installed image
feature of VMS.  <small>CVS</small> was not written to use such
features and therefore attempting to install <small>CVS</small> in
this fashion will provide protection against only
accidental lapses; anyone who is trying to circumvent
the measure will be able to do so, and depending on how
you have set it up may gain access to more than just
<small>CVS</small>.  You may wish to instead consider pserver.  It
shares some of the same attributes, in terms of
possibly providing a false sense of security or opening
security holes wider than the ones you are trying to
fix, so read the documentation on pserver security
carefully if you are considering this option
([[#Security considerations with password authentication|Security considerations with password authentication]]).


----

<div id="Windows-permissions"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#File permissions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#The attic| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="File-Permission-issues-specific-to-Windows"></div>
==== File Permission issues specific to Windows ====
<div id="index-Windows_002c-and-permissions"></div>
<div id="index-File-permissions_002c-Windows_002dspecific"></div>
<div id="index-Permissions_002c-Windows_002dspecific"></div>

Some file permission issues are specific to Windows
operating systems (Windows 95, Windows NT, and
presumably future operating systems in this family.
Some of the following might apply to OS/2 but I&rsquo;m not
sure).

If you are using local <small>CVS</small> and the repository is on a
networked file system which is served by the Samba SMB
server, some people have reported problems with
permissions.  Enabling WRITE=YES in the samba
configuration is said to fix/workaround it.
Disclaimer: I haven&rsquo;t investigated enough to know the
implications of enabling that option, nor do I know
whether there is something which <small>CVS</small> could be doing
differently in order to avoid the problem.  If you find
something out, please let us know as described in
[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]].


----

<div id="Attic"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#File Permission issues specific to Windows| &lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#The CVS directory in the repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-attic"></div>
==== The attic ====
<div id="index-Attic"></div>

You will notice that sometimes <small>CVS</small> stores an
<small>RCS</small> file in the <code>Attic</code>.  For example, if the
<small>CVSROOT</small> is &lsquo;<tt>/usr/local/cvsroot</tt>&rsquo; and we are
talking about the file &lsquo;<tt>backend.c</tt>&rsquo; in the
directory &lsquo;<tt>yoyodyne/tc</tt>&rsquo;, then the file normally
would be in

<div class="example" style="margin-left: 3.2em">
 /usr/local/cvsroot/yoyodyne/tc/backend.c,v
</div>

but if it goes in the attic, it would be in

<div class="example" style="margin-left: 3.2em">
 /usr/local/cvsroot/yoyodyne/tc/Attic/backend.c,v
</div>

<div id="index-Dead-state"></div>
instead.  It should not matter from a user point of
view whether a file is in the attic; <small>CVS</small> keeps
track of this and looks in the attic when it needs to.
But in case you want to know, the rule is that the RCS
file is stored in the attic if and only if the head
revision on the trunk has state <code>dead</code>.  A
<code>dead</code> state means that file has been removed, or
never added, for that revision.  For example, if you
add a file on a branch, it will have a trunk revision
in <code>dead</code> state, and a branch revision in a
non-<code>dead</code> state.


----

<div id="CVS-in-repository"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The attic| &lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#CVS locks in the repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-CVS-directory-in-the-repository"></div>
==== The CVS directory in the repository ====
<div id="index-CVS-directory_002c-in-repository"></div>

The &lsquo;<tt>CVS</tt>&rsquo; directory in each repository directory
contains information such as file attributes (in a file
called &lsquo;<tt>CVS/fileattr</tt>&rsquo;.  In the
future additional files may be added to this directory,
so implementations should silently ignore additional
files.

This behavior is implemented only by <small>CVS</small> 1.7 and
later; for details see [[#Using watches with old versions of CVS|Using watches with old versions of CVS]].

The format of the fileattr file is a series of entries
of the following form (where &lsquo;<code><nowiki>{</nowiki></code>&rsquo; and &lsquo;<code><nowiki>}</nowiki></code>&rsquo;
means the text between the braces can be repeated zero
or more times):

<var>ent-type</var> <var>filename</var> &lt;tab&gt; <var>attrname</var> = <var>attrval</var>
<nowiki>{</nowiki>; <var>attrname</var> = <var>attrval</var><nowiki>}</nowiki> &lt;linefeed&gt;

<var>ent-type</var> is &lsquo;<code>F</code>&rsquo; for a file, in which case the entry specifies the
attributes for that file.

<var>ent-type</var> is &lsquo;<code>D</code>&rsquo;,
and <var>filename</var> empty, to specify default attributes
to be used for newly added files.

Other <var>ent-type</var> are reserved for future expansion.  <small>CVS</small> 1.9 and older
will delete them any time it writes file attributes.
<small>CVS</small> 1.10 and later will preserve them.

Note that the order of the lines is not significant;
a program writing the fileattr file may
rearrange them at its convenience.

There is currently no way of quoting tabs or linefeeds in the
filename, &lsquo;<code>=</code>&rsquo; in <var>attrname</var>,
&lsquo;<code>;</code>&rsquo; in <var>attrval</var>, etc.  Note: some implementations also
don&rsquo;t handle a NUL character in any of the fields, but
implementations are encouraged to allow it.

By convention, <var>attrname</var> starting with &lsquo;<code>_</code>&rsquo; is for an attribute given
special meaning by <small>CVS</small>; other <var>attrname</var>s are for user-defined attributes
(or will be, once implementations start supporting user-defined attributes).

Builtin attributes:

;<code>_watched</code>
: Present means the file is watched and should be checked out read-only.

;<code>_watchers</code>
: Users with watches for this file.  Value is <var>watcher</var> &gt; <var>type</var> <nowiki>{</nowiki> , <var>watcher</var> &gt; <var>type</var> <nowiki>}</nowiki> where <var>watcher</var> is a username, and <var>type</var> is zero or more of edit,unedit,commit separated by &lsquo;<code>+</code>&rsquo; (that is, nothing if none; there is no &quot;none&quot; or &quot;all&quot; keyword).

;<code>_editors</code>
: Users editing this file.  Value is <var>editor</var> &gt; <var>val</var> <nowiki>{</nowiki> , <var>editor</var> &gt; <var>val</var> <nowiki>}</nowiki> where <var>editor</var> is a username, and <var>val</var> is <var>time</var>+<var>hostname</var>+<var>pathname</var>, where <var>time</var> is when the <code>cvs edit</code> command (or equivalent) happened, and <var>hostname</var> and <var>pathname</var> are for the working directory.

Example:

<div class="example" style="margin-left: 3.2em">
 Ffile1 _watched=;_watchers=joe&gt;edit,mary&gt;commit
 Ffile2 _watched=;_editors=sue&gt;8 Jan 1975+workstn1+/home/sue/cvs
 D _watched=
</div>

means that the file &lsquo;<tt>file1</tt>&rsquo; should be checked out
read-only.  Furthermore, joe is watching for edits and
mary is watching for commits.  The file &lsquo;<tt>file2</tt>&rsquo;
should be checked out read-only; sue started editing it
on 8 Jan 1975 in the directory &lsquo;<tt>/home/sue/cvs</tt>&rsquo; on
the machine <code>workstn1</code>.  Future files which are
added should be checked out read-only.  To represent
this example here, we have shown a space after
&lsquo;<code>D</code>&rsquo;, &lsquo;<code>Ffile1</code>&rsquo;, and &lsquo;<code>Ffile2</code>&rsquo;, but in fact
there must be a single tab character there and no spaces.


----

<div id="Locks"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The CVS directory in the repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#How files are stored in the CVSROOT directory| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="CVS-locks-in-the-repository"></div>
==== CVS locks in the repository ====

<div id="index-_0023cvs_002erfl_002c-technical-details"></div>
<div id="index-_0023cvs_002ewfl_002c-technical-details"></div>
<div id="index-_0023cvs_002elock_002c-technical-details"></div>
<div id="index-Locks_002c-cvs_002c-technical-details"></div>
For an introduction to <small>CVS</small> locks focusing on
user-visible behavior, see [[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]].  The
following section is aimed at people who are writing
tools which want to access a <small>CVS</small> repository without
interfering with other tools accessing the same
repository.  If you find yourself confused by concepts
described here, like <em>read lock</em>, <em>write lock</em>,
and <em>deadlock</em>, you might consult the literature on
operating systems or databases.

<div id="index-_0023cvs_002etfl"></div>
Any file in the repository with a name starting
with &lsquo;<tt>#cvs.rfl.</tt>&rsquo; is a read lock.  Any file in
the repository with a name starting with
&lsquo;<tt>#cvs.wfl</tt>&rsquo; is a write lock.  Old versions of <small>CVS</small>
(before <small>CVS</small> 1.5) also created files with names starting
with &lsquo;<tt>#cvs.tfl</tt>&rsquo;, but they are not discussed here.
The directory &lsquo;<tt>#cvs.lock</tt>&rsquo; serves as a master
lock.  That is, one must obtain this lock first before
creating any of the other locks.

To obtain a readlock, first create the &lsquo;<tt>#cvs.lock</tt>&rsquo;
directory.  This operation must be atomic (which should
be true for creating a directory under most operating
systems).  If it fails because the directory already
existed, wait for a while and try again.  After
obtaining the &lsquo;<tt>#cvs.lock</tt>&rsquo; lock, create a file
whose name is &lsquo;<tt>#cvs.rfl.</tt>&rsquo; followed by information
of your choice (for example, hostname and process
identification number).  Then remove the
&lsquo;<tt>#cvs.lock</tt>&rsquo; directory to release the master lock.
Then proceed with reading the repository.  When you are
done, remove the &lsquo;<tt>#cvs.rfl</tt>&rsquo; file to release the
read lock.

To obtain a writelock, first create the
&lsquo;<tt>#cvs.lock</tt>&rsquo; directory, as with a readlock.  Then
check that there are no files whose names start with
&lsquo;<tt>#cvs.rfl.</tt>&rsquo;.  If there are, remove
&lsquo;<tt>#cvs.lock</tt>&rsquo;, wait for a while, and try again.  If
there are no readers, then create a file whose name is
&lsquo;<tt>#cvs.wfl</tt>&rsquo; followed by information of your choice
(for example, hostname and process identification
number).  Hang on to the &lsquo;<tt>#cvs.lock</tt>&rsquo; lock.  Proceed
with writing the repository.  When you are done, first
remove the &lsquo;<tt>#cvs.wfl</tt>&rsquo; file and then the
&lsquo;<tt>#cvs.lock</tt>&rsquo; directory. Note that unlike the
&lsquo;<tt>#cvs.rfl</tt>&rsquo; file, the &lsquo;<tt>#cvs.wfl</tt>&rsquo; file is just
informational; it has no effect on the locking operation
beyond what is provided by holding on to the
&lsquo;<tt>#cvs.lock</tt>&rsquo; lock itself.

Note that each lock (writelock or readlock) only locks
a single directory in the repository, including
&lsquo;<tt>Attic</tt>&rsquo; and &lsquo;<tt>CVS</tt>&rsquo; but not including
subdirectories which represent other directories under
version control.  To lock an entire tree, you need to
lock each directory (note that if you fail to obtain
any lock you need, you must release the whole tree
before waiting and trying again, to avoid deadlocks).

Note also that <small>CVS</small> expects writelocks to control
access to individual &lsquo;<tt>foo,v</tt>&rsquo; files.  <small>RCS</small> has
a scheme where the &lsquo;<tt>,foo,</tt>&rsquo; file serves as a lock,
but <small>CVS</small> does not implement it and so taking out a
<small>CVS</small> writelock is recommended.  See the comments at
rcs_internal_lockfile in the <small>CVS</small> source code for
further discussion/rationale.


----

<div id="CVSROOT-storage"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#CVS locks in the repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the working directory| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-files-are-stored-in-the-CVSROOT-directory"></div>
==== How files are stored in the CVSROOT directory ====
<div id="index-CVSROOT_002c-storage-of-files"></div>

The &lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo; directory contains the
various administrative files.  In some ways this
directory is just like any other directory in the
repository; it contains <small>RCS</small> files whose names end
in &lsquo;<code>,v</code>&rsquo;, and many of the <small>CVS</small> commands operate
on it the same way.  However, there are a few
differences.

For each administrative file, in addition to the
<small>RCS</small> file, there is also a checked out copy of the
file.  For example, there is an <small>RCS</small> file
&lsquo;<tt>loginfo,v</tt>&rsquo; and a file &lsquo;<tt>loginfo</tt>&rsquo; which
contains the latest revision contained in
&lsquo;<tt>loginfo,v</tt>&rsquo;.  When you check in an administrative
file, <small>CVS</small> should print

<div class="example" style="margin-left: 3.2em">
 cvs commit: Rebuilding administrative file database
</div>

and update the checked out copy in
&lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo;.  If it does not, there is
something wrong (see section [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]).  To add your own files
to the files to be updated in this fashion, you can add
them to the &lsquo;<tt>checkoutlist</tt>&rsquo; administrative file
(see section [[#The checkoutlist file|The checkoutlist file]]).

<div id="index-modules_002edb"></div>
<div id="index-modules_002epag"></div>
<div id="index-modules_002edir"></div>
By default, the &lsquo;<tt>modules</tt>&rsquo; file behaves as
described above.  If the modules file is very large,
storing it as a flat text file may make looking up
modules slow (I&rsquo;m not sure whether this is as much of a
concern now as when <small>CVS</small> first evolved this
feature; I haven&rsquo;t seen benchmarks).  Therefore, by
making appropriate edits to the <small>CVS</small> source code
one can store the modules file in a database which
implements the <code>ndbm</code> interface, such as Berkeley
db or GDBM.  If this option is in use, then the modules
database will be stored in the files &lsquo;<tt>modules.db</tt>&rsquo;,
&lsquo;<tt>modules.pag</tt>&rsquo;, and/or &lsquo;<tt>modules.dir</tt>&rsquo;.

For information on the meaning of the various
administrative files, see [[#Reference manual for Administrative files|Reference manual for Administrative files]].


----

<div id="Working-directory-storage"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How files are stored in the CVSROOT directory| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#The administrative files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-data-is-stored-in-the-working-directory"></div>
=== How data is stored in the working directory ===


<div id="index-CVS-directory_002c-in-working-directory"></div>
While we are discussing <small>CVS</small> internals which may
become visible from time to time, we might as well talk
about what <small>CVS</small> puts in the &lsquo;<tt>CVS</tt>&rsquo; directories
in the working directories.  As with the repository,
<small>CVS</small> handles this information and one can usually
access it via <small>CVS</small> commands.  But in some cases it
may be useful to look at it, and other programs, such
as the <code>jCVS</code> graphical user interface or the
<code>VC</code> package for emacs, may need to look at it.
Such programs should follow the recommendations in this
section if they hope to be able to work with other
programs which use those files, including future
versions of the programs just mentioned and the
command-line <small>CVS</small> client.

The &lsquo;<tt>CVS</tt>&rsquo; directory contains several files.
Programs which are reading this directory should
silently ignore files which are in the directory but
which are not documented here, to allow for future
expansion.

The files are stored according to the text file
convention for the system in question.  This means that
working directories are not portable between systems
with differing conventions for storing text files.
This is intentional, on the theory that the files being
managed by <small>CVS</small> probably will not be portable between
such systems either.

;&lsquo;<tt>Root</tt>&rsquo;
: This file contains the current <small>CVS</small> root, as described in [[#Telling CVS where your repository is|Telling CVS where your repository is]].

<div id="index-Repository-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fRepository-file"></div>
;&lsquo;<tt>Repository</tt>&rsquo;
: This file contains the directory within the repository which the current directory corresponds with.  It can be either an absolute pathname or a relative pathname; <small>CVS</small> has had the ability to read either format since at least version 1.3 or so.  The relative pathname is relative to the root, and is the more sensible approach, but the absolute pathname is quite common and implementations should accept either.  For example, after the command

<div class="example" style="margin-left: 3.2em">
 cvs -d<nowiki> :</nowiki>local:/usr/local/cvsroot checkout yoyodyne/tc
</div>

: &lsquo;<tt>Root</tt>&rsquo; will contain

<div class="example" style="margin-left: 3.2em">
 :local:/usr/local/cvsroot
</div>

: and &lsquo;<tt>Repository</tt>&rsquo; will contain either

<div class="example" style="margin-left: 3.2em">
 /usr/local/cvsroot/yoyodyne/tc
</div>

: or

<div class="example" style="margin-left: 3.2em">
 yoyodyne/tc
</div>

: If the particular working directory does not correspond to a directory in the repository, then &lsquo;<tt>Repository</tt>&rsquo; should contain &lsquo;<tt>CVSROOT/Emptydir</tt>&rsquo;. <div id="index-Emptydir_002c-in-CVSROOT-directory"></div> <div id="index-CVSROOT_002fEmptydir-directory"></div>

<div id="index-Entries-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fEntries-file"></div>
;&lsquo;<tt>Entries</tt>&rsquo;
: This file lists the files and directories in the working directory. The first character of each line indicates what sort of line it is.  If the character is unrecognized, programs reading the file should silently skip that line, to allow for future expansion.

: If the first character is &lsquo;<code>/</code>&rsquo;, then the format is:

<div class="example" style="margin-left: 3.2em">
 /<var>name</var>/<var>revision</var>/<var>timestamp</var><nowiki>[</nowiki>+<var>conflict</var><nowiki>]</nowiki>/<var>options</var>/<var>tagdate</var>
</div>

: where &lsquo;<code><nowiki>[</nowiki></code>&rsquo; and &lsquo;<code><nowiki>]</nowiki></code>&rsquo; are not part of the entry, but instead indicate that the &lsquo;<code>+</code>&rsquo; and conflict marker are optional.  <var>name</var> is the name of the file within the directory.  <var>revision</var> is the revision that the file in the working derives from, or &lsquo;<code>0</code>&rsquo; for an added file, or &lsquo;<code>-</code>&rsquo; followed by a revision for a removed file.  <var>timestamp</var> is the timestamp of the file at the time that <small>CVS</small> created it; if the timestamp differs with the actual modification time of the file it means the file has been modified.  It is stored in the format used by the ISO C asctime() function (for example, &lsquo;<code>Sun Apr  7 01:29:26 1996</code>&rsquo;).  One may write a string which is not in that format, for example, &lsquo;<code>Result of merge</code>&rsquo;, to indicate that the file should always be considered to be modified.  This is not a special case; to see whether a file is modified a program should take the timestamp of the file and simply do a string compare with <var>timestamp</var>. If there was a conflict, <var>conflict</var> can be set to the modification time of the file after the file has been written with conflict markers (see section [[#Conflicts example|Conflicts example]]). Thus if <var>conflict</var> is subsequently the same as the actual modification time of the file it means that the user has obviously not resolved the conflict.  <var>options</var> contains sticky options (for example &lsquo;<code>-kb</code>&rsquo; for a binary file).  <var>tagdate</var> contains &lsquo;<code>T</code>&rsquo; followed by a tag name, or &lsquo;<code>D</code>&rsquo; for a date, followed by a sticky tag or date.  Note that if <var>timestamp</var> contains a pair of timestamps separated by a space, rather than a single timestamp, you are dealing with a version of <small>CVS</small> earlier than <small>CVS</small> 1.5 (not documented here).

: The timezone on the timestamp in CVS/Entries (local or universal) should be the same as the operating system stores for the timestamp of the file itself.  For example, on Unix the file&rsquo;s timestamp is in universal time (UT), so the timestamp in CVS/Entries should be too.  On <small>VMS</small>, the file&rsquo;s timestamp is in local time, so <small>CVS</small> on <small>VMS</small> should use local time. This rule is so that files do not appear to be modified merely because the timezone changed (for example, to or from summer time).

: If the first character of a line in &lsquo;<tt>Entries</tt>&rsquo; is &lsquo;<code>D</code>&rsquo;, then it indicates a subdirectory.  &lsquo;<code>D</code>&rsquo; on a line all by itself indicates that the program which wrote the &lsquo;<tt>Entries</tt>&rsquo; file does record subdirectories (therefore, if there is such a line and no other lines beginning with &lsquo;<code>D</code>&rsquo;, one knows there are no subdirectories).  Otherwise, the line looks like:

<div class="example" style="margin-left: 3.2em">
 D/<var>name</var>/<var>filler1</var>/<var>filler2</var>/<var>filler3</var>/<var>filler4</var>
</div>

: where <var>name</var> is the name of the subdirectory, and all the <var>filler</var> fields should be silently ignored, for future expansion.  Programs which modify <code>Entries</code> files should preserve these fields.

: The lines in the &lsquo;<tt>Entries</tt>&rsquo; file can be in any order.

<div id="index-Entries_002eLog-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fEntries_002eLog-file"></div>
;&lsquo;<tt>Entries.Log</tt>&rsquo;
: This file does not record any information beyond that in &lsquo;<tt>Entries</tt>&rsquo;, but it does provide a way to update the information without having to rewrite the entire &lsquo;<tt>Entries</tt>&rsquo; file, including the ability to preserve the information even if the program writing &lsquo;<tt>Entries</tt>&rsquo; and &lsquo;<tt>Entries.Log</tt>&rsquo; abruptly aborts. Programs which are reading the &lsquo;<tt>Entries</tt>&rsquo; file should also check for &lsquo;<tt>Entries.Log</tt>&rsquo;.  If the latter exists, they should read &lsquo;<tt>Entries</tt>&rsquo; and then apply the changes mentioned in &lsquo;<tt>Entries.Log</tt>&rsquo;.  After applying the changes, the recommended practice is to rewrite &lsquo;<tt>Entries</tt>&rsquo; and then delete &lsquo;<tt>Entries.Log</tt>&rsquo;. The format of a line in &lsquo;<tt>Entries.Log</tt>&rsquo; is a single character command followed by a space followed by a line in the format specified for a line in &lsquo;<tt>Entries</tt>&rsquo;.  The single character command is &lsquo;<code>A</code>&rsquo; to indicate that the entry is being added, &lsquo;<code>R</code>&rsquo; to indicate that the entry is being removed, or any other character to indicate that the entire line in &lsquo;<tt>Entries.Log</tt>&rsquo; should be silently ignored (for future expansion).  If the second character of the line in &lsquo;<tt>Entries.Log</tt>&rsquo; is not a space, then it was written by an older version of <small>CVS</small> (not documented here).

: Programs which are writing rather than reading can safely ignore &lsquo;<tt>Entries.Log</tt>&rsquo; if they so choose.

<div id="index-Entries_002eBackup-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fEntries_002eBackup-file"></div>
;&lsquo;<tt>Entries.Backup</tt>&rsquo;
: This is a temporary file.  Recommended usage is to write a new entries file to &lsquo;<tt>Entries.Backup</tt>&rsquo;, and then to rename it (atomically, where possible) to &lsquo;<tt>Entries</tt>&rsquo;.

<div id="index-Entries_002eStatic-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fEntries_002eStatic-file"></div>
;&lsquo;<tt>Entries.Static</tt>&rsquo;
: The only relevant thing about this file is whether it exists or not.  If it exists, then it means that only part of a directory was gotten and <small>CVS</small> will not create additional files in that directory.  To clear it, use the <code>update</code> command with the &lsquo;<code>-d</code>&rsquo; option, which will get the additional files and remove &lsquo;<tt>Entries.Static</tt>&rsquo;.

<div id="index-Tag-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fTag-file"></div>
<div id="index-Sticky-tags_002fdates_002c-per_002ddirectory"></div>
<div id="index-Per_002ddirectory-sticky-tags_002fdates"></div>
;&lsquo;<tt>Tag</tt>&rsquo;
: This file contains per-directory sticky tags or dates. The first character is &lsquo;<code>T</code>&rsquo; for a branch tag, &lsquo;<code>N</code>&rsquo; for a non-branch tag, or &lsquo;<code>D</code>&rsquo; for a date, or another character to mean the file should be silently ignored, for future expansion.  This character is followed by the tag or date.  Note that per-directory sticky tags or dates are used for things like applying to files which are newly added; they might not be the same as the sticky tags or dates on individual files.  For general information on sticky tags and dates, see [[#Sticky tags|Sticky tags]].

<div id="index-Notify-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fNotify-file"></div>
;&lsquo;<tt>Notify</tt>&rsquo;
: This file stores notifications (for example, for <code>edit</code> or <code>unedit</code>) which have not yet been sent to the server.  Its format is not yet documented here.

<div id="index-Notify_002etmp-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fNotify_002etmp-file"></div>
;&lsquo;<tt>Notify.tmp</tt>&rsquo;
: This file is to &lsquo;<tt>Notify</tt>&rsquo; as &lsquo;<tt>Entries.Backup</tt>&rsquo; is to &lsquo;<tt>Entries</tt>&rsquo;.  That is, to write &lsquo;<tt>Notify</tt>&rsquo;, first write the new contents to &lsquo;<tt>Notify.tmp</tt>&rsquo; and then (atomically where possible), rename it to &lsquo;<tt>Notify</tt>&rsquo;.

<div id="index-Base-directory_002c-in-CVS-directory"></div>
<div id="index-CVS_002fBase-directory"></div>
;&lsquo;<tt>Base</tt>&rsquo;
: If watches are in use, then an <code>edit</code> command stores the original copy of the file in the &lsquo;<tt>Base</tt>&rsquo; directory.  This allows the <code>unedit</code> command to operate even if it is unable to communicate with the server.

<div id="index-Baserev-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fBaserev-file"></div>
;&lsquo;<tt>Baserev</tt>&rsquo;
: The file lists the revision for each of the files in the &lsquo;<tt>Base</tt>&rsquo; directory.  The format is:

<div class="example" style="margin-left: 3.2em">
 B<var>name</var>/<var>rev</var>/<var>expansion</var>
</div>

: where <var>expansion</var> should be ignored, to allow for future expansion.

<div id="index-Baserev_002etmp-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fBaserev_002etmp-file"></div>
;&lsquo;<tt>Baserev.tmp</tt>&rsquo;
: This file is to &lsquo;<tt>Baserev</tt>&rsquo; as &lsquo;<tt>Entries.Backup</tt>&rsquo; is to &lsquo;<tt>Entries</tt>&rsquo;.  That is, to write &lsquo;<tt>Baserev</tt>&rsquo;, first write the new contents to &lsquo;<tt>Baserev.tmp</tt>&rsquo; and then (atomically where possible), rename it to &lsquo;<tt>Baserev</tt>&rsquo;.

<div id="index-Template-file_002c-in-CVS-directory"></div>
<div id="index-CVS_002fTemplate-file"></div>
;&lsquo;<tt>Template</tt>&rsquo;
: This file contains the template specified by the &lsquo;<tt>rcsinfo</tt>&rsquo; file (see section [[#Rcsinfo|Rcsinfo]]).  It is only used by the client; the non-client/server <small>CVS</small> consults &lsquo;<tt>rcsinfo</tt>&rsquo; directly.


----

<div id="Intro-administrative-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How data is stored in the working directory| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Editing administrative files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-administrative-files"></div>
=== The administrative files ===
<div id="index-Administrative-files-_0028intro_0029"></div>
<div id="index-Modules-file"></div>
<div id="index-CVSROOT_002c-module-name"></div>
<div id="index-Defining-modules-_0028intro_0029"></div>


The directory &lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo; contains some <em>administrative
files</em>.  See section [[#Reference manual for Administrative files|Reference manual for Administrative files]], for a complete description.
You can use <small>CVS</small> without any of these files, but
some commands work better when at least the
&lsquo;<tt>modules</tt>&rsquo; file is properly set up.

The most important of these files is the &lsquo;<tt>modules</tt>&rsquo;
file.  It defines all modules in the repository.  This
is a sample &lsquo;<tt>modules</tt>&rsquo; file.

<div class="example" style="margin-left: 3.2em">
 CVSROOT         CVSROOT
 modules         CVSROOT modules
 cvs             gnu/cvs
 rcs             gnu/rcs
 diff            gnu/diff
 tc              yoyodyne/tc
</div>

The &lsquo;<tt>modules</tt>&rsquo; file is line oriented.  In its
simplest form each line contains the name of the
module, whitespace, and the directory where the module
resides.  The directory is a path relative to
<code>$CVSROOT</code>.  The last four lines in the example
above are examples of such lines.


The line that defines the module called &lsquo;<code>modules</code>&rsquo;
uses features that are not explained here.
See section [[#The modules file|The modules file]], for a full explanation of all the
available features.


----

<div id="Editing-administrative-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The administrative files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#Multiple repositories| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
==== Editing administrative files ====
<div id="index-Editing-administrative-files"></div>
<div id="index-Administrative-files_002c-editing-them"></div>

You edit the administrative files in the same way that you would edit
any other module.  Use &lsquo;<code>cvs checkout CVSROOT</code>&rsquo; to get a working
copy, edit it, and commit your changes in the normal way.

It is possible to commit an erroneous administrative
file.  You can often fix the error and check in a new
revision, but sometimes a particularly bad error in the
administrative file makes it impossible to commit new
revisions.


----

<div id="Multiple-repositories"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Editing administrative files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Creating a repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Multiple-repositories-1"></div>
=== Multiple repositories ===
<div id="index-Multiple-repositories"></div>
<div id="index-Repositories_002c-multiple"></div>
<div id="index-Many-repositories"></div>
<div id="index-Parallel-repositories"></div>
<div id="index-Disjoint-repositories"></div>
<div id="index-CVSROOT_002c-multiple-repositories"></div>

In some situations it is a good idea to have more than
one repository, for instance if you have two
development groups that work on separate projects
without sharing any code.  All you have to do to have
several repositories is to specify the appropriate
repository, using the <code>CVSROOT</code> environment
variable, the &lsquo;<code>-d</code>&rsquo; option to <small>CVS</small>, or (once
you have checked out a working directory) by simply
allowing <small>CVS</small> to use the repository that was used
to check out the working directory
(see section [[#Telling CVS where your repository is|Telling CVS where your repository is]]).

The big advantage of having multiple repositories is
that they can reside on different servers.  With <small>CVS</small>
version 1.10, a single command cannot recurse into
directories from different repositories.  With development
versions of <small>CVS</small>, you can check out code from multiple
servers into your working directory.  <small>CVS</small> will
recurse and handle all the details of making
connections to as many server machines as necessary to
perform the requested command.  Here is an example of
how to set up a working directory:

<div class="example" style="margin-left: 3.2em">
 cvs -d server1:/cvs co dir1
 cd dir1
 cvs -d server2:/root co sdir
 cvs update
</div>

The <code>cvs co</code> commands set up the working
directory, and then the <code>cvs update</code> command will
contact server2, to update the dir1/sdir subdirectory,
and server1, to update everything else.



----

<div id="Creating-a-repository"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple repositories| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Backing up a repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Creating-a-repository-1"></div>
=== Creating a repository ===

<div id="index-Repository_002c-setting-up"></div>
<div id="index-Creating-a-repository"></div>
<div id="index-Setting-up-a-repository"></div>

To set up a <small>CVS</small> repository, first choose the
machine and disk on which you want to store the
revision history of the source files.  CPU and memory
requirements are modest, so most machines should be
adequate.  For details see [[#Server requirements|Server requirements]].

To estimate disk space
requirements, if you are importing RCS files from
another system, the size of those files is the
approximate initial size of your repository, or if you
are starting without any version history, a rule of
thumb is to allow for the server approximately three
times the size of the code to be under <small>CVS</small> for the
repository (you will eventually outgrow this, but not
for a while).  On the machines on which the developers
will be working, you&rsquo;ll want disk space for
approximately one working directory for each developer
(either the entire tree or a portion of it, depending
on what each developer uses).

The repository should be accessible
(directly or via a networked file system) from all
machines which want to use <small>CVS</small> in server or local
mode; the client machines need not have any access to
it other than via the <small>CVS</small> protocol.  It is not
possible to use <small>CVS</small> to read from a repository
which one only has read access to; <small>CVS</small> needs to be
able to create lock files (see section [[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]).

<div id="index-init-_0028subcommand_0029"></div>
To create a repository, run the <code>cvs init</code>
command.  It will set up an empty repository in the
<small>CVS</small> root specified in the usual way
(see section [[#The Repository|The Repository]]).  For example,

<div class="example" style="margin-left: 3.2em">
 cvs -d /usr/local/cvsroot init
</div>

<code>cvs init</code> is careful to never overwrite any
existing files in the repository, so no harm is done if
you run <code>cvs init</code> on an already set-up
repository.

<code>cvs init</code> will enable history logging; if you
don&rsquo;t want that, remove the history file after running
<code>cvs init</code>.  See section [[#The history file|The history file]].


----

<div id="Backing-up"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Creating a repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Moving a repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Backing-up-a-repository"></div>
=== Backing up a repository ===
<div id="index-Repository_002c-backing-up"></div>
<div id="index-Backing-up_002c-repository"></div>

There is nothing particularly magical about the files
in the repository; for the most part it is possible to
back them up just like any other files.  However, there
are a few issues to consider.

<div id="index-Locks_002c-cvs_002c-and-backups"></div>
<div id="index-_0023cvs_002erfl_002c-and-backups"></div>
The first is that to be paranoid, one should either not
use <small>CVS</small> during the backup, or have the backup
program lock <small>CVS</small> while doing the backup.  To not
use <small>CVS</small>, you might forbid logins to machines which
can access the repository, turn off your <small>CVS</small>
server, or similar mechanisms.  The details would
depend on your operating system and how you have
<small>CVS</small> set up.  To lock <small>CVS</small>, you would create
&lsquo;<tt>#cvs.rfl</tt>&rsquo; locks in each repository directory.
See [[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]], for more on <small>CVS</small> locks.
Having said all this, if you just back up without any
of these precautions, the results are unlikely to be
particularly dire.  Restoring from backup, the
repository might be in an inconsistent state, but this
would not be particularly hard to fix manually.

When you restore a repository from backup, assuming
that changes in the repository were made after the time
of the backup, working directories which were not
affected by the failure may refer to revisions which no
longer exist in the repository.  Trying to run <small>CVS</small>
in such directories will typically produce an error
message.  One way to get those changes back into the
repository is as follows:


* Get a new working directory.


* Copy the files from the working directory from before the failure over to the new working directory (do not copy the contents of the &lsquo;<tt>CVS</tt>&rsquo; directories, of course).


* Working in the new working directory, use commands such as <code>cvs update</code> and <code>cvs diff</code> to figure out what has changed, and then when you are ready, commit the changes into the repository.


----

<div id="Moving-a-repository"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Backing up a repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Moving-a-repository-1"></div>
=== Moving a repository ===
<div id="index-Repository_002c-moving"></div>
<div id="index-Moving-a-repository"></div>
<div id="index-Copying-a-repository"></div>

Just as backing up the files in the repository is
pretty much like backing up any other files, if you
need to move a repository from one place to another it
is also pretty much like just moving any other
collection of files.

The main thing to consider is that working directories
point to the repository.  The simplest way to deal with
a moved repository is to just get a fresh working
directory after the move.  Of course, you&rsquo;ll want to
make sure that the old working directory had been
checked in before the move, or you figured out some
other way to make sure that you don&rsquo;t lose any
changes.  If you really do want to reuse the existing
working directory, it should be possible with manual
surgery on the &lsquo;<tt>CVS/Repository</tt>&rsquo; files.  You can
see [[#How data is stored in the working directory|How data is stored in the working directory]], for information on
the &lsquo;<tt>CVS/Repository</tt>&rsquo; and &lsquo;<tt>CVS/Root</tt>&rsquo; files, but
unless you are sure you want to bother, it probably
isn&rsquo;t worth it.


----

<div id="Remote-repositories"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Moving a repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Server requirements| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Remote-repositories-1"></div>
=== Remote repositories ===
<div id="index-Repositories_002c-remote"></div>
<div id="index-Remote-repositories"></div>
<div id="index-Client_002fServer-Operation"></div>
<div id="index-Server_002c-CVS"></div>
<div id="index-Remote-repositories_002c-port-specification"></div>
<div id="index-Repositories_002c-remote_002c-port-specification"></div>
<div id="index-Client_002fServer-Operation_002c-port-specification"></div>
<div id="index-pserver-_0028client_002fserver-connection-method_0029_002c-port-specification"></div>
<div id="index-kserver-_0028client_002fserver-connection-method_0029_002c-port-specification"></div>
<div id="index-gserver-_0028client_002fserver-connection-method_0029_002c-port-specification"></div>
<div id="index-port_002c-specifying-for-remote-repositories"></div>

Your working copy of the sources can be on a
different machine than the repository.  Using <small>CVS</small>
in this manner is known as <em>client/server</em>
operation.  You run <small>CVS</small> on a machine which can
mount your working directory, known as the
<em>client</em>, and tell it to communicate to a machine
which can mount the repository, known as the
<em>server</em>.  Generally, using a remote
repository is just like using a local one, except that
the format of the repository name is:

<div class="example" style="margin-left: 3.2em">
 <nowiki>[</nowiki>:<var>method</var>:<nowiki>][[</nowiki><var>user</var><nowiki>][</nowiki>:<var>password</var><nowiki>]</nowiki>@<nowiki>]</nowiki><var>hostname</var><nowiki>[</nowiki>:<nowiki>[</nowiki><var>port</var><nowiki>]]</nowiki>/path/to/repository
</div>

Specifying a password in the repository name is not recommended during
checkout, since this will cause <small>CVS</small> to store a cleartext copy of the
password in each created directory.  <code>cvs login</code> first instead
(see section [[#Using the client with password authentication|Using the client with password authentication]]).

The details of exactly what needs to be set up depend
on how you are connecting to the server.

If <var>method</var> is not specified, and the repository
name contains &lsquo;<code>:</code>&rsquo;, then the default is <code>ext</code>
or <code>server</code>, depending on your platform; both are
described in [[#Connecting with rsh|Connecting with rsh]].

 [[#Server requirements|&bull; Server requirements]]::         Memory and other resources for servers
 [[#Connecting with rsh|&bull; Connecting via rsh]]::          Using the <code>rsh</code> program to connect
 [[#Direct connection with password authentication|&bull; Password authenticated]]::      Direct connections using passwords
 [[#Direct connection with GSSAPI|&bull; GSSAPI authenticated]]::        Direct connections using GSSAPI
 [[#Direct connection with kerberos|&bull; Kerberos authenticated]]::      Direct connections with kerberos
 [[#Connecting with fork|&bull; Connecting via fork]]::         Using a forked <code>cvs server</code> to connect


----

<div id="Server-requirements"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| Up ]]|</td>
<td valign="middle" align="left">|[[#Connecting with rsh| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Server-requirements-1"></div>
==== Server requirements ====

The quick answer to what sort of machine is suitable as
a server is that requirements are modest&mdash;a server
with 32M of memory or even less can handle a fairly
large source tree with a fair amount of activity.

The real answer, of course, is more complicated.
Estimating the known areas of large memory consumption
should be sufficient to estimate memory requirements.
There are two such areas documented here; other memory
consumption should be small by comparison (if you find
that is not the case, let us know, as described in
[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]], so we can update this documentation).

The first area of big memory consumption is large
checkouts, when using the <small>CVS</small> server.  The server
consists of two processes for each client that it is
serving.  Memory consumption on the child process
should remain fairly small.  Memory consumption on the
parent process, particularly if the network connection
to the client is slow, can be expected to grow to
slightly more than the size of the sources in a single
directory, or two megabytes, whichever is larger.

Multiplying the size of each <small>CVS</small> server by the
number of servers which you expect to have active at
one time should give an idea of memory requirements for
the server.  For the most part, the memory consumed by
the parent process probably can be swap space rather
than physical memory.


The second area of large memory consumption is
<code>diff</code>, when checking in large files.  This is
required even for binary files.  The rule of thumb is
to allow about ten times the size of the largest file
you will want to check in, although five times may be
adequate.  For example, if you want to check in a file
which is 10 megabytes, you should have 100 megabytes of
memory on the machine doing the checkin (the server
machine for client/server, or the machine running
<small>CVS</small> for non-client/server).  This can be swap
space rather than physical memory.  Because the memory
is only required briefly, there is no particular need
to allow memory for more than one such checkin at a
time.

Resource consumption for the client is even more
modest&mdash;any machine with enough capacity to run the
operating system in question should have little
trouble.

For information on disk space requirements, see
[[#Creating a repository|Creating a repository]].


----

<div id="Connecting-via-rsh"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Server requirements| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| Up ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with password authentication| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Connecting-with-rsh"></div>
==== Connecting with rsh ====

<div id="index-rsh"></div>
<small>CVS</small> uses the &lsquo;<code>rsh</code>&rsquo; protocol to perform these
operations, so the remote user host needs to have a
&lsquo;<tt>.rhosts</tt>&rsquo; file which grants access to the local
user. Note that the program that <small>CVS</small> uses for this
purpose may be specified using the &lsquo;<tt>--with-rsh</tt>&rsquo;
flag to configure.

For example, suppose you are the user &lsquo;<code>mozart</code>&rsquo; on
the local machine &lsquo;<code>toe.example.com</code>&rsquo;, and the
server machine is &lsquo;<code>faun.example.org</code>&rsquo;.  On
faun, put the following line into the file
&lsquo;<tt>.rhosts</tt>&rsquo; in &lsquo;<code>bach</code>&rsquo;&rsquo;s home directory:

<div class="example" style="margin-left: 3.2em">
 toe.example.com  mozart
</div>

Then test that &lsquo;<code>rsh</code>&rsquo; is working with

<div class="example" style="margin-left: 3.2em">
 rsh -l bach faun.example.org 'echo $PATH'
</div>

<div id="index-CVS_005fSERVER_002c-environment-variable"></div>
Next you have to make sure that <code>rsh</code> will be able
to find the server.  Make sure that the path which
<code>rsh</code> printed in the above example includes the
directory containing a program named <code>cvs</code> which
is the server.  You need to set the path in
&lsquo;<tt>.bashrc</tt>&rsquo;, &lsquo;<tt>.cshrc</tt>&rsquo;, etc., not &lsquo;<tt>.login</tt>&rsquo;
or &lsquo;<tt>.profile</tt>&rsquo;.  Alternately, you can set the
environment variable <code>CVS_SERVER</code> on the client
machine to the filename of the server you want to use,
for example &lsquo;<tt>/usr/local/bin/cvs-1.6</tt>&rsquo;.

There is no need to edit &lsquo;<tt>inetd.conf</tt>&rsquo; or start a
<small>CVS</small> server daemon.

<div id="index-_003aserver_003a_002c-setting-up"></div>
<div id="index-_003aext_003a_002c-setting-up"></div>
<div id="index-Kerberos_002c-using-kerberized-rsh"></div>
<div id="index-SSH-_0028rsh-replacement_0029"></div>
<div id="index-rsh-replacements-_0028Kerberized_002c-SSH_002c-_0026c_0029"></div>
There are two access methods that you use in <code>CVSROOT</code>
for rsh.  <code>:server:</code> specifies an internal rsh
client, which is supported only by some <small>CVS</small> ports.
<code>:ext:</code> specifies an external rsh program.  By
default this is <code>rsh</code> (unless otherwise specified
by the &lsquo;<tt>--with-rsh</tt>&rsquo; flag to configure) but you may set the
<code>CVS_RSH</code> environment variable to invoke another
program which can access the remote server (for
example, <code>remsh</code> on HP-UX 9 because <code>rsh</code> is
something different).  It must be a program which can
transmit data to and from the server without modifying
it; for example the Windows NT <code>rsh</code> is not
suitable since it by default translates between CRLF
and LF.  The OS/2 <small>CVS</small> port has a hack to pass &lsquo;<code>-b</code>&rsquo;
to <code>rsh</code> to get around this, but since this could
potentially cause problems for programs other than the
standard <code>rsh</code>, it may change in the future.  If
you set <code>CVS_RSH</code> to <code>SSH</code> or some other rsh
replacement, the instructions in the rest of this
section concerning &lsquo;<tt>.rhosts</tt>&rsquo; and so on are likely
to be inapplicable; consult the documentation for your rsh
replacement.

Continuing our example, supposing you want to access
the module &lsquo;<tt>foo</tt>&rsquo; in the repository
&lsquo;<tt>/usr/local/cvsroot/</tt>&rsquo;, on machine
&lsquo;<tt>faun.example.org</tt>&rsquo;, you are ready to go:

<div class="example" style="margin-left: 3.2em">
 cvs -d :ext:bach@faun.example.org:/usr/local/cvsroot checkout foo
</div>

(The &lsquo;<tt>bach@</tt>&rsquo; can be omitted if the username is
the same on both the local and remote hosts.)



----

<div id="Password-authenticated"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Connecting with rsh| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| Up ]]|</td>
<td valign="middle" align="left">|[[#Setting up the server for password authentication| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Direct-connection-with-password-authentication"></div>
==== Direct connection with password authentication ====

The <small>CVS</small> client can also connect to the server
using a password protocol.  This is particularly useful
if using <code>rsh</code> is not feasible (for example,
the server is behind a firewall), and Kerberos also is
not available.

To use this method, it is necessary to make
some adjustments on both the server and client sides.

 [[#Setting up the server for password authentication|&bull; Password authentication server]]::     Setting up the server
 [[#Using the client with password authentication|&bull; Password authentication client]]::     Using the client
 [[#Security considerations with password authentication|&bull; Password authentication security]]::   What this method does and does not do


----

<div id="Password-authentication-server"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with password authentication| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with password authentication| Up ]]|</td>
<td valign="middle" align="left">|[[#Using the client with password authentication| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Setting-up-the-server-for-password-authentication"></div>
===== Setting up the server for password authentication =====

First of all, you probably want to tighten the
permissions on the &lsquo;<tt>$CVSROOT</tt>&rsquo; and
&lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo; directories.  See [[#Security considerations with password authentication|Security considerations with password authentication]], for more details.

<div id="index-pserver-_0028subcommand_0029"></div>
<div id="index-Remote-repositories_002c-port-specification-1"></div>
<div id="index-Repositories_002c-remote_002c-port-specification-1"></div>
<div id="index-Client_002fServer-Operation_002c-port-specification-1"></div>
<div id="index-pserver-_0028client_002fserver-connection-method_0029_002c-port-specification-1"></div>
<div id="index-kserver-_0028client_002fserver-connection-method_0029_002c-port-specification-1"></div>
<div id="index-gserver-_0028client_002fserver-connection-method_0029_002c-port-specification-1"></div>
<div id="index-port_002c-specifying-for-remote-repositories-1"></div>
<div id="index-Password-server_002c-setting-up"></div>
<div id="index-Authenticating-server_002c-setting-up"></div>
<div id="index-inetd_002c-configuring-for-pserver"></div>
<div id="index-xinetd_002c-configuring-for-pserver"></div>
On the server side, the file &lsquo;<tt>/etc/inetd.conf</tt>&rsquo;
needs to be edited so <code>inetd</code> knows to run the
command <code>cvs pserver</code> when it receives a
connection on the right port.  By default, the port
number is 2401; it would be different if your client
were compiled with <code>CVS_AUTH_PORT</code> defined to
something else, though.  This can also be specified in the CVSROOT variable
(see section [[#Remote repositories|Remote repositories]]) or overridden with the CVS_CLIENT_PORT
environment variable (see section [[#All environment variables which affect CVS|All environment variables which affect CVS]]).

If your <code>inetd</code> allows raw port numbers in
&lsquo;<tt>/etc/inetd.conf</tt>&rsquo;, then the following (all on a
single line in &lsquo;<tt>inetd.conf</tt>&rsquo;) should be sufficient:

<div class="example" style="margin-left: 3.2em">
 2401  stream  tcp  nowait  root  /usr/local/bin/cvs
 cvs -f --allow-root=/usr/cvsroot pserver
</div>

(You could also use the
&lsquo;<code>-T</code>&rsquo; option to specify a temporary directory.)

The &lsquo;<code>--allow-root</code>&rsquo; option specifies the allowable
<small>CVSROOT</small> directory.  Clients which attempt to use a
different <small>CVSROOT</small> directory will not be allowed to
connect.  If there is more than one <small>CVSROOT</small>
directory which you want to allow, repeat the option.
(Unfortunately, many versions of <code>inetd</code> have very small
limits on the number of arguments and/or the total length
of the command.  The usual solution to this problem is
to have <code>inetd</code> run a shell script which then invokes
<small>CVS</small> with the necessary arguments.)

If your <code>inetd</code> wants a symbolic service
name instead of a raw port number, then put this in
&lsquo;<tt>/etc/services</tt>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 cvspserver      2401/tcp
</div>

and put <code>cvspserver</code> instead of <code>2401</code> in &lsquo;<tt>inetd.conf</tt>&rsquo;.

If your system uses <code>xinetd</code> instead of <code>inetd</code>,
the procedure is slightly different.
Create a file called &lsquo;<tt>/etc/xinetd.d/cvspserver</tt>&rsquo; containing the following:

<div class="example" style="margin-left: 3.2em">
 service cvspserver
 <nowiki>{</nowiki>
    port        = 2401
    socket_type = stream
    protocol    = tcp
    wait        = no
    user        = root
    passenv     = PATH
    server      = /usr/local/bin/cvs
    server_args = -f --allow-root=/usr/cvsroot pserver
 <nowiki>}</nowiki>
</div>

(If <code>cvspserver</code> is defined in &lsquo;<tt>/etc/services</tt>&rsquo;, you can omit
the <code>port</code> line.)

Once the above is taken care of, restart your
<code>inetd</code>, or do whatever is necessary to force it
to reread its initialization files.

If you are having trouble setting this up, see
[[#Trouble making a connection to a CVS server|Trouble making a connection to a CVS server]].

<div id="index-CVS-passwd-file"></div>
<div id="index-passwd-_0028admin-file_0029"></div>
Because the client stores and transmits passwords in
cleartext (almost&mdash;see [[#Security considerations with password authentication|Security considerations with password authentication]], for details), a separate <small>CVS</small> password
file is generally used, so people don&rsquo;t compromise
their regular passwords when they access the
repository.  This file is
&lsquo;<tt>$CVSROOT/CVSROOT/passwd</tt>&rsquo; (see section [[#The administrative files|The administrative files]]).  It uses a colon-separated
format, similar to &lsquo;<tt>/etc/passwd</tt>&rsquo; on Unix systems,
except that it has fewer fields: <small>CVS</small> username,
optional password, and an optional system username for
<small>CVS</small> to run as if authentication succeeds.  Here is
an example &lsquo;<tt>passwd</tt>&rsquo; file with five entries:

<div class="example" style="margin-left: 3.2em">
 anonymous:
 bach:ULtgRLXo7NRxs
 spwang:1sOp854gDF3DY
 melissa:tGX1fS8sun6rY:pubcvs
 qproj:XR4EZcEs0szik:pubcvs
</div>

(The passwords are encrypted according to the standard
Unix <code>crypt()</code> function, so it is possible to
paste in passwords directly from regular Unix
&lsquo;<tt>/etc/passwd</tt>&rsquo; files.)

The first line in the example will grant access to any
<small>CVS</small> client attempting to authenticate as user
<code>anonymous</code>, no matter what password they use,
including an empty password.  (This is typical for
sites granting anonymous read-only access; for
information on how to do the &quot;read-only&quot; part, see
[[#Read-only repository access|Read-only repository access]].)

The second and third lines will grant access to
<code>bach</code> and <code>spwang</code> if they supply their
respective plaintext passwords.

<div id="index-User-aliases"></div>
The fourth line will grant access to <code>melissa</code>, if
she supplies the correct password, but her <small>CVS</small>
operations will actually run on the server side under
the system user <code>pubcvs</code>.  Thus, there need not be
any system user named <code>melissa</code>, but there
''must'' be one named <code>pubcvs</code>.

The fifth line shows that system user identities can be
shared: any client who successfully authenticates as
<code>qproj</code> will actually run as <code>pubcvs</code>, just
as <code>melissa</code> does.  That way you could create a
single, shared system user for each project in your
repository, and give each developer their own line in
the &lsquo;<tt>$CVSROOT/CVSROOT/passwd</tt>&rsquo; file.  The <small>CVS</small>
username on each line would be different, but the
system username would be the same.  The reason to have
different <small>CVS</small> usernames is that <small>CVS</small> will log their
actions under those names: when <code>melissa</code> commits
a change to a project, the checkin is recorded in the
project&rsquo;s history under the name <code>melissa</code>, not
<code>pubcvs</code>.  And the reason to have them share a
system username is so that you can arrange permissions
in the relevant area of the repository such that only
that account has write-permission there.

If the system-user field is present, all
password-authenticated <small>CVS</small> commands run as that
user; if no system user is specified, <small>CVS</small> simply
takes the <small>CVS</small> username as the system username and
runs commands as that user.  In either case, if there
is no such user on the system, then the <small>CVS</small>
operation will fail (regardless of whether the client
supplied a valid password).

The password and system-user fields can both be omitted
(and if the system-user field is omitted, then also
omit the colon that would have separated it from the
encrypted password).  For example, this would be a
valid &lsquo;<tt>$CVSROOT/CVSROOT/passwd</tt>&rsquo; file:

<div class="example" style="margin-left: 3.2em">
 anonymous::pubcvs
 fish:rKa5jzULzmhOo:kfogel
 sussman:1sOp854gDF3DY
</div>

When the password field is omitted or empty, then the
client&rsquo;s authentication attempt will succeed with any
password, including the empty string.  However, the
colon after the <small>CVS</small> username is always necessary,
even if the password is empty.

<small>CVS</small> can also fall back to use system authentication.
When authenticating a password, the server first checks
for the user in the &lsquo;<tt>$CVSROOT/CVSROOT/passwd</tt>&rsquo;
file.  If it finds the user, it will use that entry for
authentication as described above.  But if it does not
find the user, or if the <small>CVS</small> &lsquo;<tt>passwd</tt>&rsquo; file
does not exist, then the server can try to authenticate
the username and password using the operating system&rsquo;s
user-lookup routines (this &quot;fallback&quot; behavior can be
disabled by setting <code>SystemAuth=no</code> in the
<small>CVS</small> &lsquo;<tt>config</tt>&rsquo; file, see section [[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]).

The default fallback behaviour is to look in 
&lsquo;<tt>/etc/passwd</tt>&rsquo; for this system password unless your
system has PAM (Pluggable Authentication Modules)
and your <small>CVS</small> server executable was configured to
use it at compile time (using <code>./configure --enable-pam</code> - see the
INSTALL file for more).  In this case, PAM will be consulted instead.
This means that <small>CVS</small> can be configured to use any password
authentication source PAM can be configured to use (possibilities
include a simple UNIX password, NIS, LDAP, and others) in its
global configuration file (usually &lsquo;<tt>/etc/pam.conf</tt>&rsquo;
or possibly &lsquo;<tt>/etc/pam.d/cvs</tt>&rsquo;).  See your PAM documentation
for more details on PAM configuration.

Note that PAM is an experimental feature in <small>CVS</small> and feedback is
encouraged.  Please send a mail to one of the <small>CVS</small> mailing lists
(<code>info-cvs@gnu.org</code> or <code>bug-cvs@gnu.org</code>) if you use the 
<small>CVS</small> PAM support.

'''WARNING: Using PAM gives the system administrator much more 
flexibility about how <small>CVS</small> users are authenticated but 
no more security than other methods.  See below for more.''' 

CVS needs an &quot;auth&quot; and &quot;account&quot; module in the 
PAM configuration file. A typical PAM configuration 
would therefore have the following lines 
in &lsquo;<tt>/etc/pam.conf</tt>&rsquo; to emulate the standard <small>CVS</small> 
system &lsquo;<tt>/etc/passwd</tt>&rsquo; authentication:

<div class="example" style="margin-left: 3.2em">
 cvs	auth	    required	pam_unix.so
 cvs	account	    required	pam_unix.so
</div>

The the equivalent &lsquo;<tt>/etc/pam.d/cvs</tt>&rsquo; would contain

<div class="example" style="margin-left: 3.2em">
 auth	    required	pam_unix.so
 account	    required	pam_unix.so
</div>

Some systems require a full path to the module so that
&lsquo;<tt>pam_unix.so</tt>&rsquo; (Linux) would become something like 
&lsquo;<tt>/usr/lib/security/$ISA/pam_unix.so.1</tt>&rsquo; (Sun Solaris).
See the &lsquo;<tt>contrib/pam</tt>&rsquo; subdirectory of the <small>CVS</small>
source distribution for further example configurations.

The PAM service name given above as &quot;cvs&quot; is just
the service name in the default configuration amd can be
set using
<code>./configure --with-hardcoded-pam-service-name=&lt;pam-service-name&gt;</code>
before compiling.  <small>CVS</small> can also be configured to use whatever
name it is invoked as as its PAM service name using
<code>./configure --without-hardcoded-pam-service-name</code>, but this
feature should not be used if you may not have control of the name
<small>CVS</small> will be invoked as.

Be aware, also, that falling back to system
authentication might be a security risk: <small>CVS</small>
operations would then be authenticated with that user&rsquo;s
regular login password, and the password flies across
the network in plaintext.  See [[#Security considerations with password authentication|Security considerations with password authentication]] for more on this.
This may be more of a problem with PAM authentication
because it is likely that the source of the system 
password is some central authentication service like
LDAP which is also used to authenticate other services.

On the other hand, PAM makes it very easy to change your password
regularly.  If they are given the option of a one-password system for
all of their activities, users are often more willing to change their
password on a regular basis.

In the non-PAM configuration where the password is stored in the
&lsquo;<tt>CVSROOT/passwd</tt>&rsquo; file, it is difficult to change passwords on a
regular basis since only administrative users (or in some cases
processes that act as an administrative user) are typicaly given
access to modify this file.  Either there needs to be some
hand-crafted web page or set-uid program to update the file, or the
update needs to be done by submitting a request to an administrator to
perform the duty by hand.  In the first case, having to remember to
update a separate password on a periodic basis can be difficult.  In
the second case, the manual nature of the change will typically mean
that the password will not be changed unless it is absolutely
necessary.

Note that PAM administrators should probably avoid configuring
one-time-passwords (OTP) for <small>CVS</small> authentication/authorization.  If
OTPs are desired, the administrator may wish to encourage the use of
one of the other Client/Server access methods.  See the section on
see section [[#Remote repositories|Remote repositories]] for a list of other methods.

Right now, the only way to put a password in the
<small>CVS</small> &lsquo;<tt>passwd</tt>&rsquo; file is to paste it there from
somewhere else.  Someday, there may be a <code>cvs
passwd</code> command.

Unlike many of the files in &lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo;, it
is normal to edit the &lsquo;<tt>passwd</tt>&rsquo; file in-place,
rather than via <small>CVS</small>.  This is because of the
possible security risks of having the &lsquo;<tt>passwd</tt>&rsquo;
file checked out to people&rsquo;s working copies.  If you do
want to include the &lsquo;<tt>passwd</tt>&rsquo; file in checkouts of
&lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo;, see [[#The checkoutlist file|The checkoutlist file]].



----

<div id="Password-authentication-client"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Setting up the server for password authentication| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with password authentication| Up ]]|</td>
<td valign="middle" align="left">|[[#Security considerations with password authentication| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Using-the-client-with-password-authentication"></div>
===== Using the client with password authentication =====
<div id="index-Login-_0028subcommand_0029"></div>
<div id="index-Password-client_002c-using"></div>
<div id="index-Authenticated-client_002c-using"></div>
<div id="index-_003apserver_003a_002c-setting-up"></div>
To run a <small>CVS</small> command on a remote repository via
the password-authenticating server, one specifies the
<code>pserver</code> protocol, optional username, repository host, an
optional port number, and path to the repository.  For example:

<div class="example" style="margin-left: 3.2em">
 cvs -d :pserver:faun.example.org:/usr/local/cvsroot checkout someproj
</div>

or

<div class="example" style="margin-left: 3.2em">
 CVSROOT=:pserver:bach@faun.example.org:2401/usr/local/cvsroot
 cvs checkout someproj
</div>

However, unless you&rsquo;re connecting to a public-access
repository (i.e., one where that username doesn&rsquo;t
require a password), you&rsquo;ll need to supply a password or <em>log in</em> first.
Logging in verifies your password with the repository and stores it in a file.
It&rsquo;s done with the <code>login</code> command, which will
prompt you interactively for the password if you didn&rsquo;t supply one as part of
<var>$CVSROOT</var>:

<div class="example" style="margin-left: 3.2em">
 cvs -d :pserver:bach@faun.example.org:/usr/local/cvsroot login
 CVS password:
</div>

or

<div class="example" style="margin-left: 3.2em">
 cvs -d :pserver:bach:p4ss30rd@faun.example.org:/usr/local/cvsroot login
</div>

After you enter the password, <small>CVS</small> verifies it with
the server.  If the verification succeeds, then that
combination of username, host, repository, and password
is permanently recorded, so future transactions with
that repository won&rsquo;t require you to run <code>cvs
login</code>.  (If verification fails, <small>CVS</small> will exit
complaining that the password was incorrect, and
nothing will be recorded.)

The records are stored, by default, in the file
&lsquo;<tt>$HOME/.cvspass</tt>&rsquo;.  That file&rsquo;s format is
human-readable, and to a degree human-editable, but
note that the passwords are not stored in
cleartext&mdash;they are trivially encoded to protect them
from &quot;innocent&quot; compromise (i.e., inadvertent viewing
by a system administrator or other non-malicious
person).

<div id="index-CVS_005fPASSFILE_002c-environment-variable"></div>
You can change the default location of this file by
setting the <code>CVS_PASSFILE</code> environment variable.
If you use this variable, make sure you set it
''before'' <code>cvs login</code> is run.  If you were to
set it after running <code>cvs login</code>, then later
<small>CVS</small> commands would be unable to look up the
password for transmission to the server.
  
Once you have logged in, all <small>CVS</small> commands using
that remote repository and username will authenticate
with the stored password.  So, for example
  
<div class="example" style="margin-left: 3.2em">
 cvs -d :pserver:bach@faun.example.org:/usr/local/cvsroot checkout foo
</div>

should just work (unless the password changes on the
server side, in which case you&rsquo;ll have to re-run
<code>cvs login</code>).

Note that if the &lsquo;<code>:pserver:</code>&rsquo; were not present in
the repository specification, <small>CVS</small> would assume it
should use <code>rsh</code> to connect with the server
instead (see section [[#Connecting with rsh|Connecting with rsh]]).

Of course, once you have a working copy checked out and
are running <small>CVS</small> commands from within it, there is
no longer any need to specify the repository
explicitly, because <small>CVS</small> can deduce the repository
from the working copy&rsquo;s &lsquo;<tt>CVS</tt>&rsquo; subdirectory.

<div id="index-Logout-_0028subcommand_0029"></div>
The password for a given remote repository can be
removed from the <code>CVS_PASSFILE</code> by using the
<code>cvs logout</code> command.


----

<div id="Password-authentication-security"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Using the client with password authentication| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with password authentication| Up ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with GSSAPI| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Security-considerations-with-password-authentication"></div>
===== Security considerations with password authentication =====

<div id="index-Security_002c-of-pserver"></div>
The passwords are stored on the client side in a
trivial encoding of the cleartext, and transmitted in
the same encoding.  The encoding is done only to
prevent inadvertent password compromises (i.e., a
system administrator accidentally looking at the file),
and will not prevent even a naive attacker from gaining
the password.

The separate <small>CVS</small> password file (see section [[#Setting up the server for password authentication|Setting up the server for password authentication]]) allows people
to use a different password for repository access than
for login access.  On the other hand, once a user has
non-read-only
access to the repository, she can execute programs on
the server system through a variety of means.  Thus, repository
access implies fairly broad system access as well.  It
might be possible to modify <small>CVS</small> to prevent that,
but no one has done so as of this writing.

Note that because the &lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo; directory
contains &lsquo;<tt>passwd</tt>&rsquo; and other files which are used
to check security, you must control the permissions on
this directory as tightly as the permissions on
&lsquo;<tt>/etc</tt>&rsquo;.  The same applies to the &lsquo;<tt>$CVSROOT</tt>&rsquo;
directory itself and any directory
above it in the tree.  Anyone who has write access to
such a directory will have the ability to become any
user on the system.  Note that these permissions are
typically tighter than you would use if you are not
using pserver.

In summary, anyone who gets the password gets
repository access (which may imply some measure of general system
access as well).  The password is available to anyone
who can sniff network packets or read a protected
(i.e., user read-only) file.  If you want real
security, get Kerberos.


----

<div id="GSSAPI-authenticated"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Security considerations with password authentication| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| Up ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with kerberos| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Direct-connection-with-GSSAPI"></div>
==== Direct connection with GSSAPI ====

<div id="index-GSSAPI"></div>
<div id="index-Security_002c-GSSAPI"></div>
<div id="index-_003agserver_003a_002c-setting-up"></div>
<div id="index-Kerberos_002c-using-_003agserver_003a"></div>
GSSAPI is a generic interface to network security
systems such as Kerberos 5.
If you have a working GSSAPI library, you can have
<small>CVS</small> connect via a direct <small>TCP</small> connection,
authenticating with GSSAPI.

To do this, <small>CVS</small> needs to be compiled with GSSAPI
support; when configuring <small>CVS</small> it tries to detect
whether GSSAPI libraries using kerberos version 5 are
present.  You can also use the &lsquo;<tt>--with-gssapi</tt>&rsquo;
flag to configure.

The connection is authenticated using GSSAPI, but the
message stream is ''not'' authenticated by default.
You must use the <code>-a</code> global option to request
stream authentication.

The data transmitted is ''not'' encrypted by
default.  Encryption support must be compiled into both
the client and the server; use the
&lsquo;<tt>--enable-encrypt</tt>&rsquo; configure option to turn it on.
You must then use the <code>-x</code> global option to
request encryption.

GSSAPI connections are handled on the server side by
the same server which handles the password
authentication server; see [[#Setting up the server for password authentication|Setting up the server for password authentication]].  If you are using a GSSAPI mechanism such as
Kerberos which provides for strong authentication, you
will probably want to disable the ability to
authenticate via cleartext passwords.  To do so, create
an empty &lsquo;<tt>CVSROOT/passwd</tt>&rsquo; password file, and set
<code>SystemAuth=no</code> in the config file
(see section [[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]).

The GSSAPI server uses a principal name of
cvs/<var>hostname</var>, where <var>hostname</var> is the
canonical name of the server host.  You will have to
set this up as required by your GSSAPI mechanism.

To connect using GSSAPI, use &lsquo;<code>:gserver:</code>&rsquo;.  For
example,

<div class="example" style="margin-left: 3.2em">
 cvs -d :gserver:faun.example.org:/usr/local/cvsroot checkout foo
</div>


----

<div id="Kerberos-authenticated"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with GSSAPI| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| Up ]]|</td>
<td valign="middle" align="left">|[[#Connecting with fork| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Direct-connection-with-kerberos"></div>
==== Direct connection with kerberos ====

<div id="index-Kerberos_002c-using-_003akserver_003a"></div>
<div id="index-Security_002c-kerberos"></div>
<div id="index-_003akserver_003a_002c-setting-up"></div>
The easiest way to use kerberos is to use the kerberos
<code>rsh</code>, as described in [[#Connecting with rsh|Connecting with rsh]].
The main disadvantage of using rsh is that all the data
needs to pass through additional programs, so it may be
slower.  So if you have kerberos installed you can
connect via a direct <small>TCP</small> connection,
authenticating with kerberos.

This section concerns the kerberos network security
system, version 4.  Kerberos version 5 is supported via
the GSSAPI generic network security interface, as
described in the previous section.

To do this, <small>CVS</small> needs to be compiled with kerberos
support; when configuring <small>CVS</small> it tries to detect
whether kerberos is present or you can use the
&lsquo;<tt>--with-krb4</tt>&rsquo; flag to configure.

The data transmitted is ''not'' encrypted by
default.  Encryption support must be compiled into both
the client and server; use the
&lsquo;<tt>--enable-encryption</tt>&rsquo; configure option to turn it
on.  You must then use the <code>-x</code> global option to
request encryption.

<div id="index-CVS_005fCLIENT_005fPORT"></div>
You need to edit &lsquo;<tt>inetd.conf</tt>&rsquo; on the server
machine to run <code>cvs kserver</code>.  The client uses
port 1999 by default; if you want to use another port
specify it in the <code>CVSROOT</code> (see section [[#Remote repositories|Remote repositories]])
or the <code>CVS_CLIENT_PORT</code> environment variable
(see section [[#All environment variables which affect CVS|All environment variables which affect CVS]]) on the client.

<div id="index-kinit"></div>
When you want to use <small>CVS</small>, get a ticket in the
usual way (generally <code>kinit</code>); it must be a ticket
which allows you to log into the server machine.  Then
you are ready to go:

<div class="example" style="margin-left: 3.2em">
 cvs -d :kserver:faun.example.org:/usr/local/cvsroot checkout foo
</div>

Previous versions of <small>CVS</small> would fall back to a
connection via rsh; this version will not do so.


----

<div id="Connecting-via-fork"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Direct connection with kerberos| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Remote repositories| Up ]]|</td>
<td valign="middle" align="left">|[[#Read-only repository access| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Connecting-with-fork"></div>
==== Connecting with fork ====

<div id="index-fork_002c-access-method"></div>
<div id="index-_003afork_003a_002c-setting-up"></div>
This access method allows you to connect to a
repository on your local disk via the remote protocol.
In other words it does pretty much the same thing as
<code>:local:</code>, but various quirks, bugs and the like are
those of the remote <small>CVS</small> rather than the local
<small>CVS</small>.

For day-to-day operations you might prefer either
<code>:local:</code> or <code>:fork:</code>, depending on your
preferences.  Of course <code>:fork:</code> comes in
particularly handy in testing or
debugging <code>cvs</code> and the remote protocol.
Specifically, we avoid all of the network-related
setup/configuration, timeouts, and authentication
inherent in the other remote access methods but still
create a connection which uses the remote protocol.

To connect using the <code>fork</code> method, use
&lsquo;<code>:fork:</code>&rsquo; and the pathname to your local
repository.  For example:

<div class="example" style="margin-left: 3.2em">
 cvs -d :fork:/usr/local/cvsroot checkout foo
</div>

<div id="index-CVS_005fSERVER_002c-and-_003afork_003a"></div>
As with <code>:ext:</code>, the server is called &lsquo;<code>cvs</code>&rsquo;
by default, or the value of the <code>CVS_SERVER</code>
environment variable.


----

<div id="Read_002donly-access"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Connecting with fork| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Temporary directories for the server| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Read_002donly-repository-access"></div>
=== Read-only repository access ===
<div id="index-Read_002donly-repository-access"></div>
<div id="index-readers-_0028admin-file_0029"></div>
<div id="index-writers-_0028admin-file_0029"></div>

It is possible to grant read-only repository
access to people using the password-authenticated
server (see section [[#Direct connection with password authentication|Direct connection with password authentication]]).  (The
other access methods do not have explicit support for
read-only users because those methods all assume login
access to the repository machine anyway, and therefore
the user can do whatever local file permissions allow
her to do.)

A user who has read-only access can do only
those <small>CVS</small> operations which do not modify the
repository, except for certain &ldquo;administrative&rdquo; files
(such as lock files and the history file).  It may be
desirable to use this feature in conjunction with
user-aliasing (see section [[#Setting up the server for password authentication|Setting up the server for password authentication]]).

Unlike with previous versions of <small>CVS</small>, read-only
users should be able merely to read the repository, and
not to execute programs on the server or otherwise gain
unexpected levels of access.  Or to be more accurate,
the ''known'' holes have been plugged.  Because this
feature is new and has not received a comprehensive
security audit, you should use whatever level of
caution seems warranted given your attitude concerning
security.

There are two ways to specify read-only access
for a user: by inclusion, and by exclusion.

&quot;Inclusion&quot; means listing that user
specifically in the &lsquo;<tt>$CVSROOT/CVSROOT/readers</tt>&rsquo;
file, which is simply a newline-separated list of
users.  Here is a sample &lsquo;<tt>readers</tt>&rsquo; file:

<div class="example" style="margin-left: 3.2em">
 melissa
 splotnik
 jrandom
</div>

(Don&rsquo;t forget the newline after the last user.)

&quot;Exclusion&quot; means explicitly listing everyone
who has ''write'' access&mdash;if the file

<div class="example" style="margin-left: 3.2em">
 $CVSROOT/CVSROOT/writers
</div>

exists, then only
those users listed in it have write access, and
everyone else has read-only access (of course, even the
read-only users still need to be listed in the
<small>CVS</small> &lsquo;<tt>passwd</tt>&rsquo; file).  The
&lsquo;<tt>writers</tt>&rsquo; file has the same format as the
&lsquo;<tt>readers</tt>&rsquo; file.

Note: if your <small>CVS</small> &lsquo;<tt>passwd</tt>&rsquo;
file maps cvs users onto system users (see section [[#Setting up the server for password authentication|Setting up the server for password authentication]]), make sure you deny or grant
read-only access using the ''cvs'' usernames, not
the system usernames.  That is, the &lsquo;<tt>readers</tt>&rsquo; and
&lsquo;<tt>writers</tt>&rsquo; files contain cvs usernames, which may
or may not be the same as system usernames.

Here is a complete description of the server&rsquo;s
behavior in deciding whether to grant read-only or
read-write access:

If &lsquo;<tt>readers</tt>&rsquo; exists, and this user is
listed in it, then she gets read-only access.  Or if
&lsquo;<tt>writers</tt>&rsquo; exists, and this user is NOT listed in
it, then she also gets read-only access (this is true
even if &lsquo;<tt>readers</tt>&rsquo; exists but she is not listed
there).  Otherwise, she gets full read-write access.

Of course there is a conflict if the user is
listed in both files.  This is resolved in the more
conservative way, it being better to protect the
repository too much than too little: such a user gets
read-only access.


----

<div id="Server-temporary-directory"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Read-only repository access| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The Repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Temporary-directories-for-the-server"></div>
=== Temporary directories for the server ===
<div id="index-Temporary-directories_002c-and-server"></div>
<div id="index-Server_002c-temporary-directories"></div>

While running, the <small>CVS</small> server creates temporary
directories.  They are named

<div class="example" style="margin-left: 3.2em">
 cvs-serv<var>pid</var>
</div>

where <var>pid</var> is the process identification number of
the server.
They are located in the directory specified by 
the &lsquo;<code>-T</code>&rsquo; global option (see section [[#Global options|Global options]]), 
the <code>TMPDIR</code> environment variable (see section [[#All environment variables which affect CVS|All environment variables which affect CVS]]), 
or, failing that, &lsquo;<tt>/tmp</tt>&rsquo;.

In most cases the server will remove the temporary
directory when it is done, whether it finishes normally
or abnormally.  However, there are a few cases in which
the server does not or cannot remove the temporary
directory, for example:


* If the server aborts due to an internal server error, it may preserve the directory to aid in debugging


* If the server is killed in a way that it has no way of cleaning up (most notably, &lsquo;<code>kill -KILL</code>&rsquo; on unix).


* If the system shuts down without an orderly shutdown, which tells the server to clean up.

In cases such as this, you will need to manually remove
the &lsquo;<tt>cvs-serv<var>pid</var></tt>&rsquo; directories.  As long as
there is no server running with process identification
number <var>pid</var>, it is safe to do so.


----

<div id="Starting-a-new-project"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#The Repository| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Temporary directories for the server| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Setting up the files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Starting-a-project-with-CVS"></div>
== Starting a project with CVS ==
<div id="index-Starting-a-project-with-CVS"></div>
<div id="index-Creating-a-project"></div>

Because renaming files and moving them between
directories is somewhat inconvenient, the first thing
you do when you start a new project should be to think
through your file organization.  It is not impossible
to rename or move files, but it does increase the
potential for confusion and <small>CVS</small> does have some
quirks particularly in the area of renaming
directories.  See section [[#Moving and renaming files|Moving and renaming files]].

What to do next depends on the situation at hand.

 [[#Setting up the files|&bull; Setting up the files]]::        Getting the files into the repository
 [[#Defining the module|&bull; Defining the module]]::         How to make a module of the files


----

<div id="Setting-up-the-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Starting a project with CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| Up ]]|</td>
<td valign="middle" align="left">|[[#Creating a directory tree from a number of files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Setting-up-the-files-1"></div>
=== Setting up the files ===

The first step is to create the files inside the repository.  This can
be done in a couple of different ways.

 [[#Creating a directory tree from a number of files|&bull; From files]]::                  This method is useful with old projects
                                 where files already exists.
 [[#Creating Files From Other Version Control Systems|&bull; From other version control systems]]::  Old projects where you want to
                                         preserve history from another system.
 [[#Creating a directory tree from scratch|&bull; From scratch]]::                Creating a directory tree from scratch.


----

<div id="From-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Starting a project with CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Setting up the files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Setting up the files| Up ]]|</td>
<td valign="middle" align="left">|[[#Creating Files From Other Version Control Systems| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Creating-a-directory-tree-from-a-number-of-files"></div>
==== Creating a directory tree from a number of files ====
<div id="index-Importing-files"></div>

When you begin using <small>CVS</small>, you will probably already have several
projects that can be
put under <small>CVS</small> control.  In these cases the easiest way is to use the
<code>import</code> command.  An example is probably the easiest way to
explain how to use it.  If the files you want to install in
<small>CVS</small> reside in &lsquo;<tt><var>wdir</var></tt>&rsquo;, and you want them to appear in the
repository as &lsquo;<tt>$CVSROOT/yoyodyne/<var>rdir</var></tt>&rsquo;, you can do this:

<div class="example" style="margin-left: 3.2em">
 $ cd <var>wdir</var>
 $ cvs import -m &quot;Imported sources&quot; yoyodyne/<var>rdir</var> yoyo start
</div>

Unless you supply a log message with the &lsquo;<code>-m</code>&rsquo;
flag, <small>CVS</small> starts an editor and prompts for a
message.  The string &lsquo;<code>yoyo</code>&rsquo; is a <em>vendor tag</em>,
and &lsquo;<code>start</code>&rsquo; is a <em>release tag</em>.  They may fill
no purpose in this context, but since <small>CVS</small> requires
them they must be present.  See section [[#Tracking third-party sources|Tracking third-party sources]], for
more information about them.

You can now verify that it worked, and remove your
original source directory.

<div class="example" style="margin-left: 3.2em">
 $ cd ..
 $ cvs checkout yoyodyne/<var>rdir</var>       # <span class="roman" style="font-family:serif; font-weight:normal">Explanation below</span>
 $ diff -r <var>wdir</var> yoyodyne/<var>rdir</var>
 $ rm -r <var>wdir</var>
</div>

Erasing the original sources is a good idea, to make sure that you do
not accidentally edit them in <var>wdir</var>, bypassing <small>CVS</small>.
Of course, it would be wise to make sure that you have
a backup of the sources before you remove them.

The <code>checkout</code> command can either take a module
name as argument (as it has done in all previous
examples) or a path name relative to <code>$CVSROOT</code>,
as it did in the example above.

It is a good idea to check that the permissions
<small>CVS</small> sets on the directories inside <code>$CVSROOT</code>
are reasonable, and that they belong to the proper
groups.  See section [[#File permissions|File permissions]].

If some of the files you want to import are binary, you
may want to use the wrappers features to specify which
files are binary and which are not.  See section [[#The cvswrappers file|The cvswrappers file]].


----

<div id="From-other-version-control-systems"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Starting a project with CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Creating a directory tree from a number of files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Setting up the files| Up ]]|</td>
<td valign="middle" align="left">|[[#Creating a directory tree from scratch| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Creating-Files-From-Other-Version-Control-Systems"></div>
==== Creating Files From Other Version Control Systems ====
<div id="index-Importing-files_002c-from-other-version-control-systems"></div>

If you have a project which you are maintaining with
another version control system, such as <small>RCS</small>, you
may wish to put the files from that project into
<small>CVS</small>, and preserve the revision history of the
files.

<div id="index-RCS_002c-importing-files-from"></div>
;From RCS
: If you have been using <small>RCS</small>, find the <small>RCS</small> files&mdash;usually a file named &lsquo;<tt>foo.c</tt>&rsquo; will have its <small>RCS</small> file in &lsquo;<tt>RCS/foo.c,v</tt>&rsquo; (but it could be other places; consult the <small>RCS</small> documentation for details).  Then create the appropriate directories in <small>CVS</small> if they do not already exist.  Then copy the files into the appropriate directories in the <small>CVS</small> repository (the name in the repository must be the name of the source file with &lsquo;<code>,v</code>&rsquo; added; the files go directly in the appropriate directory of the repository, not in an &lsquo;<tt>RCS</tt>&rsquo; subdirectory).  This is one of the few times when it is a good idea to access the <small>CVS</small> repository directly, rather than using <small>CVS</small> commands.  Then you are ready to check out a new working directory.

: The <small>RCS</small> file should not be locked when you move it into <small>CVS</small>; if it is, <small>CVS</small> will have trouble letting you operate on it.

;From another version control system
: Many version control systems have the ability to export <small>RCS</small> files in the standard format.  If yours does, export the <small>RCS</small> files and then follow the above instructions.

: Failing that, probably your best bet is to write a script that will check out the files one revision at a time using the command line interface to the other system, and then check the revisions into <small>CVS</small>. The &lsquo;<tt>sccs2rcs</tt>&rsquo; script mentioned below may be a useful example to follow.

<div id="index-SCCS_002c-importing-files-from"></div>
;From SCCS
: There is a script in the &lsquo;<tt>contrib</tt>&rsquo; directory of the <small>CVS</small> source distribution called &lsquo;<tt>sccs2rcs</tt>&rsquo; which converts <small>SCCS</small> files to <small>RCS</small> files. Note: you must run it on a machine which has both <small>SCCS</small> and <small>RCS</small> installed, and like everything else in contrib it is unsupported (your mileage may vary).

<div id="index-PVCS_002c-importing-files-from"></div>
;From PVCS
: There is a script in the &lsquo;<tt>contrib</tt>&rsquo; directory of the <small>CVS</small> source distribution called &lsquo;<tt>pvcs_to_rcs</tt>&rsquo; which converts <small>PVCS</small> archives to <small>RCS</small> files. You must run it on a machine which has both <small>PVCS</small> and <small>RCS</small> installed, and like everything else in contrib it is unsupported (your mileage may vary).  See the comments in the script for details.


----

<div id="From-scratch"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Starting a project with CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Creating Files From Other Version Control Systems| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Setting up the files| Up ]]|</td>
<td valign="middle" align="left">|[[#Defining the module| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Creating-a-directory-tree-from-scratch"></div>
==== Creating a directory tree from scratch ====

For a new project, the easiest thing to do is probably
to create an empty directory structure, like this:

<div class="example" style="margin-left: 3.2em">
 $ mkdir tc
 $ mkdir tc/man
 $ mkdir tc/testing
</div>

After that, you use the <code>import</code> command to create
the corresponding (empty) directory structure inside
the repository:

<div class="example" style="margin-left: 3.2em">
 $ cd tc
 $ cvs import -m &quot;Created directory structure&quot; yoyodyne/<var>dir</var> yoyo start
</div>

Then, use <code>add</code> to add files (and new directories)
as they appear.

Check that the permissions <small>CVS</small> sets on the
directories inside <code>$CVSROOT</code> are reasonable.


----

<div id="Defining-the-module"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Starting a project with CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Creating a directory tree from scratch| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Starting a project with CVS| Up ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Defining-the-module-1"></div>
=== Defining the module ===
<div id="index-Defining-a-module"></div>
<div id="index-Editing-the-modules-file"></div>
<div id="index-Module_002c-defining"></div>
<div id="index-Modules-file_002c-changing"></div>

The next step is to define the module in the
&lsquo;<tt>modules</tt>&rsquo; file.  This is not strictly necessary,
but modules can be convenient in grouping together
related files and directories.

In simple cases these steps are sufficient to define a module.


# Get a working copy of the modules file.

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout CVSROOT/modules
 $ cd CVSROOT
</div>


# Edit the file and insert a line that defines the module.  See section [[#The administrative files|The administrative files]], for an introduction.  See section [[#The modules file|The modules file]], for a full description of the modules file.  You can use the following line to define the module &lsquo;<code>tc</code>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 tc   yoyodyne/tc
</div>


# Commit your changes to the modules file.

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -m &quot;Added the tc module.&quot; modules
</div>


# Release the modules module.

<div class="example" style="margin-left: 3.2em">
 $ cd ..
 $ cvs release -d CVSROOT
</div>


----

<div id="Revisions"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Starting a project with CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Defining the module| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Revision numbers| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Revisions-1"></div>
== Revisions ==

For many uses of <small>CVS</small>, one doesn&rsquo;t need to worry
too much about revision numbers; <small>CVS</small> assigns
numbers such as <code>1.1</code>, <code>1.2</code>, and so on, and
that is all one needs to know.  However, some people
prefer to have more knowledge and control concerning
how <small>CVS</small> assigns revision numbers.

If one wants to keep track of a set of revisions
involving more than one file, such as which revisions
went into a particular release, one uses a <em>tag</em>,
which is a symbolic revision which can be assigned to a
numeric revision in each file.

 [[#Revision numbers|&bull; Revision numbers]]::            The meaning of a revision number
 [[#Versions, revisions and releases|&bull; Versions revisions releases]]::  Terminology used in this manual
 [[#Assigning revisions|&bull; Assigning revisions]]::         Assigning revisions
 [[#Tags&ndash;Symbolic revisions|&bull; Tags]]::                        Tags--Symbolic revisions
 [[#Specifying what to tag from the working directory|&bull; Tagging the working directory]]::  The cvs tag command
 [[#Specifying what to tag by date or revision|&bull; Tagging by date/tag]]::         The cvs rtag command
 [[#Deleting, moving, and renaming tags|&bull; Modifying tags]]::              Adding, renaming, and deleting tags
 [[#Tagging and adding and removing files|&bull; Tagging add/remove]]::          Tags with adding and removing files
 [[#Sticky tags|&bull; Sticky tags]]::                 Certain tags are persistent


----

<div id="Revision-numbers"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Versions, revisions and releases| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Revision-numbers-1"></div>
=== Revision numbers ===
<div id="index-Revision-numbers"></div>
<div id="index-Revision-tree"></div>
<div id="index-Linear-development"></div>
<div id="index-Number_002c-revision_002d"></div>
<div id="index-Decimal-revision-number"></div>
<div id="index-Branch-number"></div>
<div id="index-Number_002c-branch"></div>

Each version of a file has a unique <em>revision
number</em>.  Revision numbers look like &lsquo;<code>1.1</code>&rsquo;,
&lsquo;<code>1.2</code>&rsquo;, &lsquo;<code>1.3.2.2</code>&rsquo; or even &lsquo;<code>1.3.2.2.4.5</code>&rsquo;.
A revision number always has an even number of
period-separated decimal integers.  By default revision
1.1 is the first revision of a file.  Each successive
revision is given a new number by increasing the
rightmost number by one.  The following figure displays
a few revisions, with newer revisions to the right.

<div class="example" style="margin-left: 3.2em">
        +-----+    +-----+    +-----+    +-----+    +-----+
        ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
        +-----+    +-----+    +-----+    +-----+    +-----+
</div>

It is also possible to end up with numbers containing
more than one period, for example &lsquo;<code>1.3.2.2</code>&rsquo;.  Such
revisions represent revisions on branches
(see section [[#Branching and merging|Branching and merging]]); such revision numbers
are explained in detail in [[#Branches and revisions|Branches and revisions]].


----

<div id="Versions-revisions-releases"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Revision numbers| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Assigning revisions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Versions_002c-revisions-and-releases"></div>
=== Versions, revisions and releases ===
<div id="index-Revisions_002c-versions-and-releases"></div>
<div id="index-Versions_002c-revisions-and-releases"></div>
<div id="index-Releases_002c-revisions-and-versions"></div>

A file can have several versions, as described above.
Likewise, a software product can have several versions.
A software product is often given a version number such
as &lsquo;<code>4.1.1</code>&rsquo;.

Versions in the first sense are called <em>revisions</em>
in this document, and versions in the second sense are
called <em>releases</em>.  To avoid confusion, the word
<em>version</em> is almost never used in this document.


----

<div id="Assigning-revisions"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Versions, revisions and releases| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Tags&ndash;Symbolic revisions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Assigning-revisions-1"></div>
=== Assigning revisions ===

By default, <small>CVS</small> will assign numeric revisions by
leaving the first number the same and incrementing the
second number.  For example, <code>1.1</code>, <code>1.2</code>,
<code>1.3</code>, etc.

When adding a new file, the second number will always
be one and the first number will equal the highest
first number of any file in that directory.  For
example, the current directory contains files whose
highest numbered revisions are <code>1.7</code>, <code>3.1</code>,
and <code>4.12</code>, then an added file will be given the
numeric revision <code>4.1</code>.

Normally there is no reason to care
about the revision numbers&mdash;it is easier to treat them
as internal numbers that <small>CVS</small> maintains, and tags
provide a better way to distinguish between things like
release 1 versus release 2 of your product
(see section [[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]).  However, if you want to set the
numeric revisions, the &lsquo;<code>-r</code>&rsquo; option to <code>cvs
commit</code> can do that.  The &lsquo;<code>-r</code>&rsquo; option implies the
&lsquo;<code>-f</code>&rsquo; option, in the sense that it causes the
files to be committed even if they are not modified.

For example, to bring all your files up to
revision 3.0 (including those that haven&rsquo;t changed),
you might invoke:

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -r 3.0
</div>

Note that the number you specify with &lsquo;<code>-r</code>&rsquo; must be
larger than any existing revision number.  That is, if
revision 3.0 exists, you cannot &lsquo;<code>cvs commit
-r 1.3</code>&rsquo;.  If you want to maintain several releases in
parallel, you need to use a branch (see section [[#Branching and merging|Branching and merging]]).


----

<div id="Tags"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Assigning revisions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Specifying what to tag from the working directory| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Tags_002d_002dSymbolic-revisions"></div>
=== Tags&ndash;Symbolic revisions ===
<div id="index-Tags"></div>

The revision numbers live a life of their own.  They
need not have anything at all to do with the release
numbers of your software product.  Depending
on how you use <small>CVS</small> the revision numbers might change several times
between two releases.  As an example, some of the
source files that make up <small>RCS</small> 5.6 have the following
revision numbers:
<div id="index-RCS-revision-numbers"></div>

<div class="example" style="margin-left: 3.2em">
 ci.c            5.21
 co.c            5.9
 ident.c         5.3
 rcs.c           5.12
 rcsbase.h       5.11
 rcsdiff.c       5.10
 rcsedit.c       5.11
 rcsfcmp.c       5.9
 rcsgen.c        5.10
 rcslex.c        5.11
 rcsmap.c        5.2
 rcsutil.c       5.10
</div>

<div id="index-tag-_0028subcommand_0029_002c-introduction"></div>
<div id="index-Tags_002c-symbolic-name"></div>
<div id="index-Symbolic-name-_0028tag_0029"></div>
<div id="index-Name_002c-symbolic-_0028tag_0029"></div>
<div id="index-HEAD_002c-as-reserved-tag-name"></div>
<div id="index-BASE_002c-as-reserved-tag-name"></div>
You can use the <code>tag</code> command to give a symbolic name to a
certain revision of a file.  You can use the &lsquo;<code>-v</code>&rsquo; flag to the
<code>status</code> command to see all tags that a file has, and
which revision numbers they represent.  Tag names must
start with an uppercase or lowercase letter and can
contain uppercase and lowercase letters, digits,
&lsquo;<code>-</code>&rsquo;, and &lsquo;<code>_</code>&rsquo;.  The two tag names <code>BASE</code>
and <code>HEAD</code> are reserved for use by <small>CVS</small>.  It
is expected that future names which are special to
<small>CVS</small> will be specially named, for example by
starting with &lsquo;<code>.</code>&rsquo;, rather than being named analogously to
<code>BASE</code> and <code>HEAD</code>, to avoid conflicts with
actual tag names.

You&rsquo;ll want to choose some convention for naming tags,
based on information such as the name of the program
and the version number of the release.  For example,
one might take the name of the program, immediately
followed by the version number with &lsquo;<code>.</code>&rsquo; changed to
&lsquo;<code>-</code>&rsquo;, so that <small>CVS</small> 1.9 would be tagged with the name
<code>cvs1-9</code>.  If you choose a consistent convention,
then you won&rsquo;t constantly be guessing whether a tag is
<code>cvs-1-9</code> or <code>cvs1_9</code> or what.  You might
even want to consider enforcing your convention in the
taginfo file (see section [[#User-defined logging|User-defined logging]]).

<div id="index-Adding-a-tag"></div>
<div id="index-Tags_002c-example"></div>
The following example shows how you can add a tag to a
file.  The commands must be issued inside your working
directory.  That is, you should issue the
command in the directory where &lsquo;<tt>backend.c</tt>&rsquo;
resides.

<div class="example" style="margin-left: 3.2em">
 $ cvs tag rel-0-4 backend.c
 T backend.c
 $ cvs status -v backend.c
 ===================================================================
 File: backend.c         Status: Up-to-date
 
     Version:            1.4     Tue Dec  1 14:39:01 1992
     RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
     Sticky Tag:         (none)
     Sticky Date:        (none)
     Sticky Options:     (none)
 
     Existing Tags:
         rel-0-4                     (revision: 1.4)
 
</div>

For a complete summary of the syntax of <code>cvs tag</code>,
including the various options, see [[#Quick reference to CVS commands|Quick reference to CVS commands]].

There is seldom reason to tag a file in isolation.  A more common use is
to tag all the files that constitute a module with the same tag at
strategic points in the development life-cycle, such as when a release
is made.

<div class="example" style="margin-left: 3.2em">
 $ cvs tag rel-1-0 .
 cvs tag: Tagging .
 T Makefile
 T backend.c
 T driver.c
 T frontend.c
 T parser.c
</div>

(When you give <small>CVS</small> a directory as argument, it generally applies the
operation to all the files in that directory, and (recursively), to any
subdirectories that it may contain.  See section [[#Recursive behavior|Recursive behavior]].)

<div id="index-Retrieving-an-old-revision-using-tags"></div>
<div id="index-Tags_002c-retrieving-old-revisions"></div>
The <code>checkout</code> command has a flag, &lsquo;<code>-r</code>&rsquo;, that lets you check out
a certain revision of a module.  This flag makes it easy to
retrieve the sources that make up release 1.0 of the module &lsquo;<code>tc</code>&rsquo; at
any time in the future:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -r rel-1-0 tc
</div>

This is useful, for instance, if someone claims that there is a bug in
that release, but you cannot find the bug in the current working copy.

You can also check out a module as it was at any given date.
See section [[#checkout options|checkout options]].  When specifying &lsquo;<code>-r</code>&rsquo; to
any of these commands, you will need beware of sticky
tags; see [[#Sticky tags|Sticky tags]].

When you tag more than one file with the same tag you
can think about the tag as &quot;a curve drawn through a
matrix of filename vs. revision number.&quot;  Say we have 5
files with the following revisions:

<div class="example" style="margin-left: 3.2em">
         file1   file2   file3   file4   file5
 
         1.1     1.1     1.1     1.1  /--1.1*      &lt;-*-  TAG
         1.2*-   1.2     1.2    -1.2*-
         1.3  \- 1.3*-   1.3   / 1.3
         1.4          \  1.4  /  1.4
                       \-1.5*-   1.5
                         1.6
</div>

At some time in the past, the <code>*</code> versions were tagged.
You can think of the tag as a handle attached to the curve
drawn through the tagged revisions.  When you pull on
the handle, you get all the tagged revisions.  Another
way to look at it is that you &quot;sight&quot; through a set of
revisions that is &quot;flat&quot; along the tagged revisions,
like this:

<div class="example" style="margin-left: 3.2em">
         file1   file2   file3   file4   file5
 
                         1.1
                         1.2
                 1.1     1.3                       _
         1.1     1.2     1.4     1.1              /
         1.2*----1.3*----1.5*----1.2*----1.1     (--- &lt;--- Look here
         1.3             1.6     1.3              \_
         1.4                     1.4
                                 1.5
</div>


----

<div id="Tagging-the-working-directory"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Tags&ndash;Symbolic revisions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Specifying what to tag by date or revision| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Specifying-what-to-tag-from-the-working-directory"></div>
=== Specifying what to tag from the working directory ===

<div id="index-tag-_0028subcommand_0029"></div>
The example in the previous section demonstrates one of
the most common ways to choose which revisions to tag.
Namely, running the <code>cvs tag</code> command without
arguments causes <small>CVS</small> to select the revisions which
are checked out in the current working directory.  For
example, if the copy of &lsquo;<tt>backend.c</tt>&rsquo; in working
directory was checked out from revision 1.4, then
<small>CVS</small> will tag revision 1.4.  Note that the tag is
applied immediately to revision 1.4 in the repository;
tagging is not like modifying a file, or other
operations in which one first modifies the working
directory and then runs <code>cvs commit</code> to transfer
that modification to the repository.

One potentially surprising aspect of the fact that
<code>cvs tag</code> operates on the repository is that you
are tagging the checked-in revisions, which may differ
from locally modified files in your working directory.
If you want to avoid doing this by mistake, specify the
&lsquo;<code>-c</code>&rsquo; option to <code>cvs tag</code>.  If there are any
locally modified files, <small>CVS</small> will abort with an
error before it tags any files:

<div class="example" style="margin-left: 3.2em">
 $ cvs tag -c rel-0-4
 cvs tag: backend.c is locally modified
 cvs <nowiki>[</nowiki>tag aborted<nowiki>]</nowiki>: correct the above errors first!
</div>


----

<div id="Tagging-by-date_002ftag"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Specifying what to tag from the working directory| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Deleting, moving, and renaming tags| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Specifying-what-to-tag-by-date-or-revision"></div>
=== Specifying what to tag by date or revision ===
<div id="index-rtag-_0028subcommand_0029"></div>

The <code>cvs rtag</code> command tags the repository as of a
certain date or time (or can be used to tag the latest
revision).  <code>rtag</code> works directly on the
repository contents (it requires no prior checkout and
does not look for a working directory).

The following options specify which date or revision to
tag.  See [[#Common command options|Common command options]], for a complete
description of them.

;<code>-D <var>date</var></code>
: Tag the most recent revision no later than <var>date</var>.

;<code>-f</code>
: Only useful with the &lsquo;<code>-D <var>date</var></code>&rsquo; or &lsquo;<code>-r <var>tag</var></code>&rsquo; flags.  If no matching revision is found, use the most recent revision (instead of ignoring the file).

;<code>-r <var>tag</var></code>
: Only tag those files that contain existing tag <var>tag</var>.

The <code>cvs tag</code> command also allows one to specify
files by revision or date, using the same &lsquo;<code>-r</code>&rsquo;,
&lsquo;<code>-D</code>&rsquo;, and &lsquo;<code>-f</code>&rsquo; options.  However, this
feature is probably not what you want.  The reason is
that <code>cvs tag</code> chooses which files to tag based on
the files that exist in the working directory, rather
than the files which existed as of the given tag/date.
Therefore, you are generally better off using <code>cvs
rtag</code>.  The exceptions might be cases like:

<div class="example" style="margin-left: 3.2em">
 cvs tag -r 1.4 stable backend.c
</div>


----

<div id="Modifying-tags"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Specifying what to tag by date or revision| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Tagging and adding and removing files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Deleting_002c-moving_002c-and-renaming-tags"></div>
=== Deleting, moving, and renaming tags ===


Normally one does not modify tags.  They exist in order
to record the history of the repository and so deleting
them or changing their meaning would, generally, not be
what you want.

However, there might be cases in which one uses a tag
temporarily or accidentally puts one in the wrong
place.  Therefore, one might delete, move, or rename a
tag.

'''WARNING: the commands in this section are
dangerous; they permanently discard historical
information and it can be difficult or impossible to
recover from errors.  If you are a <small>CVS</small>
administrator, you may consider restricting these
commands with taginfo (see section [[#User-defined logging|User-defined logging]]).'''

<div id="index-Deleting-tags"></div>
<div id="index-Deleting-branch-tags"></div>
<div id="index-Removing-tags"></div>
<div id="index-Removing-branch-tags"></div>
<div id="index-Tags_002c-deleting"></div>
<div id="index-Branch-tags_002c-deleting"></div>
To delete a tag, specify the &lsquo;<code>-d</code>&rsquo; option to either
<code>cvs tag</code> or <code>cvs rtag</code>.  For example:

<div class="example" style="margin-left: 3.2em">
 cvs rtag -d rel-0-4 tc
</div>

deletes the non-branch tag <code>rel-0-4</code> from the module <code>tc</code>.
In the event that branch tags are encountered within the repository
with the given name, a warning message will be issued and the branch 
tag will not be deleted.  If you are absolutely certain you know what
you are doing, the <code>-B</code> option may be specified to allow deletion
of branch tags.  In that case, any non-branch tags encountered will
trigger warnings and will not be deleted.

'''WARNING: Moving branch tags is very dangerous!  If you think
you need the <code>-B</code> option, think again and ask your <small>CVS</small>
administrator about it (if that isn&rsquo;t you).  There is almost certainly
another way to accomplish what you want to accomplish.'''

<div id="index-Moving-tags"></div>
<div id="index-Moving-branch-tags"></div>
<div id="index-Tags_002c-moving"></div>
<div id="index-Branch-tags_002c-moving"></div>
When we say <em>move</em> a tag, we mean to make the same
name point to different revisions.  For example, the
<code>stable</code> tag may currently point to revision 1.4
of &lsquo;<tt>backend.c</tt>&rsquo; and perhaps we want to make it
point to revision 1.6.  To move a non-branch tag, specify the
&lsquo;<code>-F</code>&rsquo; option to either <code>cvs tag</code> or <code>cvs
rtag</code>.  For example, the task just mentioned might be
accomplished as:

<div class="example" style="margin-left: 3.2em">
 cvs tag -r 1.6 -F stable backend.c
</div>

If any branch tags are encountered in the repository 
with the given name, a warning is issued and the branch
tag is not disturbed.  If you are absolutely certain you
wish to move the branch tag, the <code>-B</code> option may be specified.
In that case, non-branch tags encountered with the given
name are ignored with a warning message.

'''WARNING: Moving branch tags is very dangerous!  If you think you
need the <code>-B</code> option, think again and ask your <small>CVS</small>
administrator about it (if that isn&rsquo;t you).  There is almost certainly
another way to accomplish what you want to accomplish.'''

<div id="index-Renaming-tags"></div>
<div id="index-Tags_002c-renaming"></div>
When we say <em>rename</em> a tag, we mean to make a
different name point to the same revisions as the old
tag.  For example, one may have misspelled the tag name
and want to correct it (hopefully before others are
relying on the old spelling).  To rename a tag, first
create a new tag using the &lsquo;<code>-r</code>&rsquo; option to
<code>cvs rtag</code>, and then delete the old name.  (Caution:
this method will not work with branch tags.) 
This leaves the new tag on exactly the 
same files as the old tag.  For example:

<div class="example" style="margin-left: 3.2em">
 cvs rtag -r old-name-0-4 rel-0-4 tc
 cvs rtag -d old-name-0-4 tc
</div>


----

<div id="Tagging-add_002fremove"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Deleting, moving, and renaming tags| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Sticky tags| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Tagging-and-adding-and-removing-files"></div>
=== Tagging and adding and removing files ===

The subject of exactly how tagging interacts with
adding and removing files is somewhat obscure; for the
most part <small>CVS</small> will keep track of whether files
exist or not without too much fussing.  By default,
tags are applied to only files which have a revision
corresponding to what is being tagged.  Files which did
not exist yet, or which were already removed, simply
omit the tag, and <small>CVS</small> knows to treat the absence
of a tag as meaning that the file didn&rsquo;t exist as of
that tag.

However, this can lose a small amount of information.
For example, suppose a file was added and then removed.
Then, if the tag is missing for that file, there is no
way to know whether the tag refers to the time before
the file was added, or the time after it was removed.
If you specify the &lsquo;<code>-r</code>&rsquo; option to <code>cvs rtag</code>,
then <small>CVS</small> tags the files which have been removed,
and thereby avoids this problem.  For example, one
might specify <code>-r HEAD</code> to tag the head.

On the subject of adding and removing files, the
<code>cvs rtag</code> command has a &lsquo;<code>-a</code>&rsquo; option which
means to clear the tag from removed files that would
not otherwise be tagged.  For example, one might
specify this option in conjunction with &lsquo;<code>-F</code>&rsquo; when
moving a tag.  If one moved a tag without &lsquo;<code>-a</code>&rsquo;,
then the tag in the removed files might still refer to
the old revision, rather than reflecting the fact that
the file had been removed.  I don&rsquo;t think this is
necessary if &lsquo;<code>-r</code>&rsquo; is specified, as noted above.


----

<div id="Sticky-tags"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Tagging and adding and removing files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Sticky-tags-1"></div>
=== Sticky tags ===
<div id="index-Sticky-tags"></div>
<div id="index-Tags_002c-sticky"></div>


Sometimes a working copy&rsquo;s revision has extra data
associated with it, for example it might be on a branch
(see section [[#Branching and merging|Branching and merging]]), or restricted to
versions prior to a certain date by &lsquo;<code>checkout -D</code>&rsquo;
or &lsquo;<code>update -D</code>&rsquo;.  Because this data persists &ndash;
that is, it applies to subsequent commands in the
working copy &ndash; we refer to it as <em>sticky</em>.

Most of the time, stickiness is an obscure aspect of
<small>CVS</small> that you don&rsquo;t need to think about.  However,
even if you don&rsquo;t want to use the feature, you may need
to know ''something'' about sticky tags (for
example, how to avoid them!).

You can use the <code>status</code> command to see if any
sticky tags or dates are set:

<div class="example" style="margin-left: 3.2em">
 $ cvs status driver.c
 ===================================================================
 File: driver.c          Status: Up-to-date
 
     Version:            1.7.2.1 Sat Dec  5 19:35:03 1992
     RCS Version:        1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
     Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
     Sticky Date:        (none)
     Sticky Options:     (none)
 
</div>

<div id="index-Resetting-sticky-tags"></div>
<div id="index-Sticky-tags_002c-resetting"></div>
<div id="index-Deleting-sticky-tags"></div>
The sticky tags will remain on your working files until
you delete them with &lsquo;<code>cvs update -A</code>&rsquo;.  The
&lsquo;<code>-A</code>&rsquo; option merges local changes into the version of the
file from the head of the trunk, removing any sticky tags,
dates, or options.  See [[#update&mdash;Bring work tree in sync with repository|update&mdash;Bring work tree in sync with repository]] for more on the operation
of <code>cvs update</code>.

<div id="index-Sticky-date"></div>
The most common use of sticky tags is to identify which
branch one is working on, as described in
[[#Accessing branches|Accessing branches]].  However, non-branch
sticky tags have uses as well.  For example,
suppose that you want to avoid updating your working
directory, to isolate yourself from possibly
destabilizing changes other people are making.  You
can, of course, just refrain from running <code>cvs
update</code>.  But if you want to avoid updating only a
portion of a larger tree, then sticky tags can help.
If you check out a certain revision (such as 1.4) it
will become sticky.  Subsequent <code>cvs update</code>
commands will
not retrieve the latest revision until you reset the
tag with <code>cvs update -A</code>.  Likewise, use of the
&lsquo;<code>-D</code>&rsquo; option to <code>update</code> or <code>checkout</code>
sets a <em>sticky date</em>, which, similarly, causes that
date to be used for future retrievals.

People often want to retrieve an old version of
a file without setting a sticky tag.  This can
be done with the &lsquo;<code>-p</code>&rsquo; option to <code>checkout</code> or
<code>update</code>, which sends the contents of the file to
standard output.  For example:
<div class="example" style="margin-left: 3.2em">
 $ cvs update -p -r 1.1 file1 &gt;file1
 ===================================================================
 Checking out file1
 RCS:  /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v
 VERS: 1.1
 ***************
 $
</div>

However, this isn&rsquo;t the easiest way, if you are asking
how to undo a previous checkin (in this example, put
&lsquo;<tt>file1</tt>&rsquo; back to the way it was as of revision
1.1).  In that case you are better off using the
&lsquo;<code>-j</code>&rsquo; option to <code>update</code>; for further
discussion see [[#Merging differences between any two revisions|Merging differences between any two revisions]].


----

<div id="Branching-and-merging"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revisions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Sticky tags| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#What branches are good for| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Branching-and-merging-1"></div>
== Branching and merging ==
<div id="index-Branching"></div>
<div id="index-Merging"></div>
<div id="index-Copying-changes"></div>
<div id="index-Main-trunk-and-branches"></div>
<div id="index-Revision-tree_002c-making-branches"></div>
<div id="index-Branches_002c-copying-changes-between"></div>
<div id="index-Changes_002c-copying-between-branches"></div>
<div id="index-Modifications_002c-copying-between-branches"></div>

<small>CVS</small> allows you to isolate changes onto a separate
line of development, known as a <em>branch</em>.  When you
change files on a branch, those changes do not appear
on the main trunk or other branches.

Later you can move changes from one branch to another
branch (or the main trunk) by <em>merging</em>.  Merging
involves first running <code>cvs update -j</code>, to merge
the changes into the working directory.
You can then commit that revision, and thus effectively
copy the changes onto another branch.

 [[#What branches are good for|&bull; Branches motivation]]::         What branches are good for
 [[#Creating a branch|&bull; Creating a branch]]::           Creating a branch
 [[#Accessing branches|&bull; Accessing branches]]::          Checking out and updating branches
 [[#Branches and revisions|&bull; Branches and revisions]]::      Branches are reflected in revision numbers
 [[#Magic branch numbers|&bull; Magic branch numbers]]::        Magic branch numbers
 [[#Merging an entire branch|&bull; Merging a branch]]::            Merging an entire branch
 [[#Merging from a branch several times|&bull; Merging more than once]]::      Merging from a branch several times
 [[#Merging differences between any two revisions|&bull; Merging two revisions]]::       Merging differences between two revisions
 [[#Merging can add or remove files|&bull; Merging adds and removals]]::   What if files are added or removed?
 [[#Merging and keywords|&bull; Merging and keywords]]::        Avoiding conflicts due to keyword substitution


----

<div id="Branches-motivation"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Creating a branch| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="What-branches-are-good-for"></div>
=== What branches are good for ===
<div id="index-Branches-motivation"></div>
<div id="index-What-branches-are-good-for"></div>
<div id="index-Motivation-for-branches"></div>

Suppose that release 1.0 of tc has been made.  You are continuing to
develop tc, planning to create release 1.1 in a couple of months.  After a
while your customers start to complain about a fatal bug.  You check
out release 1.0 (see section [[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]) and find the bug
(which turns out to have a trivial fix).  However, the current revision
of the sources are in a state of flux and are not expected to be stable
for at least another month.  There is no way to make a
bugfix release based on the newest sources.

The thing to do in a situation like this is to create a <em>branch</em> on
the revision trees for all the files that make up
release 1.0 of tc.  You can then make
modifications to the branch without disturbing the main trunk.  When the
modifications are finished you can elect to either incorporate them on
the main trunk, or leave them on the branch.


----

<div id="Creating-a-branch"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#What branches are good for| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Accessing branches| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Creating-a-branch-1"></div>
=== Creating a branch ===
<div id="index-Creating-a-branch"></div>
<div id="index-Branch_002c-creating-a"></div>
<div id="index-tag-_0028subcommand_0029_002c-creating-a-branch-using"></div>
<div id="index-rtag-_0028subcommand_0029_002c-creating-a-branch-using"></div>

You can create a branch with <code>tag -b</code>; for
example, assuming you&rsquo;re in a working copy:

<div class="example" style="margin-left: 3.2em">
 $ cvs tag -b rel-1-0-patches
</div>


This splits off a branch based on the current revisions
in the working copy, assigning that branch the name
&lsquo;<code>rel-1-0-patches</code>&rsquo;.

It is important to understand that branches get created
in the repository, not in the working copy.  Creating a
branch based on current revisions, as the above example
does, will ''not'' automatically switch the working
copy to be on the new branch.  For information on how
to do that, see [[#Accessing branches|Accessing branches]].

You can also create a branch without reference to any
working copy, by using <code>rtag</code>:

<div class="example" style="margin-left: 3.2em">
 $ cvs rtag -b -r rel-1-0 rel-1-0-patches tc
</div>

&lsquo;<code>-r rel-1-0</code>&rsquo; says that this branch should be
rooted at the revision that
corresponds to the tag &lsquo;<code>rel-1-0</code>&rsquo;.  It need not
be the most recent revision &ndash; it&rsquo;s often useful to
split a branch off an old revision (for example, when
fixing a bug in a past release otherwise known to be
stable).

As with &lsquo;<code>tag</code>&rsquo;, the &lsquo;<code>-b</code>&rsquo; flag tells
<code>rtag</code> to create a branch (rather than just a
symbolic revision name).  Note that the numeric
revision number that matches &lsquo;<code>rel-1-0</code>&rsquo; will
probably be different from file to file.

So, the full effect of the command is to create a new
branch &ndash; named &lsquo;<code>rel-1-0-patches</code>&rsquo; &ndash; in module
&lsquo;<code>tc</code>&rsquo;, rooted in the revision tree at the point tagged
by &lsquo;<code>rel-1-0</code>&rsquo;.


----

<div id="Accessing-branches"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Creating a branch| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Branches and revisions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Accessing-branches-1"></div>
=== Accessing branches ===
<div id="index-Check-out-a-branch"></div>
<div id="index-Retrieve-a-branch"></div>
<div id="index-Access-a-branch"></div>
<div id="index-Identifying-a-branch"></div>
<div id="index-Branch_002c-check-out"></div>
<div id="index-Branch_002c-retrieving"></div>
<div id="index-Branch_002c-accessing"></div>
<div id="index-Branch_002c-identifying"></div>

You can retrieve a branch in one of two ways: by
checking it out fresh from the repository, or by
switching an existing working copy over to the branch.

To check out a branch from the repository, invoke
&lsquo;<code>checkout</code>&rsquo; with the &lsquo;<code>-r</code>&rsquo; flag, followed by
the tag name of the branch (see section [[#Creating a branch|Creating a branch]]):

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -r rel-1-0-patches tc
</div>

Or, if you already have a working copy, you can switch
it to a given branch with &lsquo;<code>update -r</code>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 $ cvs update -r rel-1-0-patches tc
</div>

or equivalently:

<div class="example" style="margin-left: 3.2em">
 $ cd tc
 $ cvs update -r rel-1-0-patches
</div>

It does not matter if the working copy was originally
on the main trunk or on some other branch &ndash; the above
command will switch it to the named branch.  And
similarly to a regular &lsquo;<code>update</code>&rsquo; command,
&lsquo;<code>update -r</code>&rsquo; merges any changes you have made,
notifying you of conflicts where they occur.

Once you have a working copy tied to a particular
branch, it remains there until you tell it otherwise.
This means that changes checked in from the working
copy will add new revisions on that branch, while
leaving the main trunk and other branches unaffected.

<div id="index-Branches_002c-sticky"></div>
To find out what branch a working copy is on, you can
use the &lsquo;<code>status</code>&rsquo; command.  In its output, look for
the field named &lsquo;<code>Sticky tag</code>&rsquo; (see section [[#Sticky tags|Sticky tags]])
&ndash; that&rsquo;s <small>CVS</small>&rsquo;s way of telling you the branch, if
any, of the current working files:

<div class="example" style="margin-left: 3.2em">
 $ cvs status -v driver.c backend.c
 ===================================================================
 File: driver.c          Status: Up-to-date
 
     Version:            1.7     Sat Dec  5 18:25:54 1992
     RCS Version:        1.7     /u/cvsroot/yoyodyne/tc/driver.c,v
     Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
     Sticky Date:        (none)
     Sticky Options:     (none)
 
     Existing Tags:
         rel-1-0-patches             (branch: 1.7.2)
         rel-1-0                     (revision: 1.7)
 
 ===================================================================
 File: backend.c         Status: Up-to-date
 
     Version:            1.4     Tue Dec  1 14:39:01 1992
     RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
     Sticky Tag:         rel-1-0-patches (branch: 1.4.2)
     Sticky Date:        (none)
     Sticky Options:     (none)
 
     Existing Tags:
         rel-1-0-patches             (branch: 1.4.2)
         rel-1-0                     (revision: 1.4)
         rel-0-4                     (revision: 1.4)
 
</div>

Don&rsquo;t be confused by the fact that the branch numbers
for each file are different (&lsquo;<code>1.7.2</code>&rsquo; and
&lsquo;<code>1.4.2</code>&rsquo; respectively).  The branch tag is the
same, &lsquo;<code>rel-1-0-patches</code>&rsquo;, and the files are
indeed on the same branch.  The numbers simply reflect
the point in each file&rsquo;s revision history at which the
branch was made.  In the above example, one can deduce
that &lsquo;<code>driver.c</code>&rsquo; had been through more changes than
&lsquo;<code>backend.c</code>&rsquo; before this branch was created.

See [[#Branches and revisions|Branches and revisions]] for details about how
branch numbers are constructed.


----

<div id="Branches-and-revisions"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Accessing branches| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Magic branch numbers| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Branches-and-revisions-1"></div>
=== Branches and revisions ===
<div id="index-Branch-number-1"></div>
<div id="index-Number_002c-branch-1"></div>
<div id="index-Revision-numbers-_0028branches_0029"></div>

Ordinarily, a file&rsquo;s revision history is a linear
series of increments (see section [[#Revision numbers|Revision numbers]]):

<div class="example" style="margin-left: 3.2em">
        +-----+    +-----+    +-----+    +-----+    +-----+
        ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
        +-----+    +-----+    +-----+    +-----+    +-----+
</div>

However, <small>CVS</small> is not limited to linear development.  The
<em>revision tree</em> can be split into <em>branches</em>,
where each branch is a self-maintained line of
development.  Changes made on one branch can easily be
moved back to the main trunk.

Each branch has a <em>branch number</em>, consisting of an
odd number of period-separated decimal integers.  The
branch number is created by appending an integer to the
revision number where the corresponding branch forked
off.  Having branch numbers allows more than one branch
to be forked off from a certain revision.

All revisions on a branch have revision numbers formed
by appending an ordinal number to the branch number.
The following figure illustrates branching with an
example.

<div class="example" style="margin-left: 3.2em">
                                                       +-------------+
                            Branch 1.2.2.3.2 -&gt;        ! 1.2.2.3.2.1 !
                                                     / +-------------+
                                                    /
                                                   /
                  +---------+    +---------+    +---------+
 Branch 1.2.2 -&gt; _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
                / +---------+    +---------+    +---------+
               /
              /
 +-----+    +-----+    +-----+    +-----+    +-----+
 ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !  &lt;- The main trunk
 +-----+    +-----+    +-----+    +-----+    +-----+
                 !
                 !
                 !   +---------+    +---------+    +---------+
 Branch 1.2.4 -&gt; +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 !
                     +---------+    +---------+    +---------+
 
</div>



The exact details of how the branch number is
constructed is not something you normally need to be
concerned about, but here is how it works: When
<small>CVS</small> creates a branch number it picks the first
unused even integer, starting with 2.  So when you want
to create a branch from revision 6.4 it will be
numbered 6.4.2.  All branch numbers ending in a zero
(such as 6.4.0) are used internally by <small>CVS</small>
(see section [[#Magic branch numbers|Magic branch numbers]]).  The branch 1.1.1 has a
special meaning.  See section [[#Tracking third-party sources|Tracking third-party sources]].


----

<div id="Magic-branch-numbers"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Branches and revisions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Merging an entire branch| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Magic-branch-numbers-1"></div>
=== Magic branch numbers ===


This section describes a <small>CVS</small> feature called
<em>magic branches</em>.  For most purposes, you need not
worry about magic branches; <small>CVS</small> handles them for
you.  However, they are visible to you in certain
circumstances, so it may be useful to have some idea of
how it works.

Externally, branch numbers consist of an odd number of
dot-separated decimal integers.  See section [[#Revision numbers|Revision numbers]].  That is not the whole truth, however.  For
efficiency reasons <small>CVS</small> sometimes inserts an extra 0
in the second rightmost position (1.2.4 becomes
1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so
on).

<small>CVS</small> does a pretty good job at hiding these so
called magic branches, but in a few places the hiding
is incomplete:


* The magic branch number appears in the output from <code>cvs log</code>.


* You cannot specify a symbolic branch name to <code>cvs admin</code>.


You can use the <code>admin</code> command to reassign a
symbolic name to a branch the way <small>RCS</small> expects it
to be.  If <code>R4patches</code> is assigned to the branch
1.4.2 (magic branch number 1.4.0.2) in file
&lsquo;<tt>numbers.c</tt>&rsquo; you can do this:

<div class="example" style="margin-left: 3.2em">
 $ cvs admin -NR4patches:1.4.2 numbers.c
</div>

It only works if at least one revision is already
committed on the branch.  Be very careful so that you
do not assign the tag to the wrong number.  (There is
no way to see how the tag was assigned yesterday).


----

<div id="Merging-a-branch"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Magic branch numbers| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Merging from a branch several times| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Merging-an-entire-branch"></div>
=== Merging an entire branch ===
<div id="index-Merging-a-branch"></div>
<div id="index-_002dj-_0028merging-branches_0029"></div>

You can merge changes made on a branch into your working copy by giving
the &lsquo;<code>-j <var>branchname</var></code>&rsquo; flag to the <code>update</code> subcommand.  With one
&lsquo;<code>-j <var>branchname</var></code>&rsquo; option it merges the changes made between the
greatest common ancestor (GCA) of the branch and the destination revision (in
the simple case below the GCA is the point where the branch forked) and the
newest revision on that branch into your working copy.

<div id="index-Join"></div>
The &lsquo;<code>-j</code>&rsquo; stands for &ldquo;join&rdquo;.

<div id="index-Branch-merge-example"></div>
<div id="index-Example_002c-branch-merge"></div>
<div id="index-Merge_002c-branch-example"></div>
Consider this revision tree:

<div class="example" style="margin-left: 3.2em">
 +-----+    +-----+    +-----+    +-----+
 ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !      &lt;- The main trunk
 +-----+    +-----+    +-----+    +-----+
                 !
                 !
                 !   +---------+    +---------+
 Branch R1fix -&gt; +---! 1.2.2.1 !----! 1.2.2.2 !
                     +---------+    +---------+
</div>

The branch 1.2.2 has been given the tag (symbolic name) &lsquo;<code>R1fix</code>&rsquo;.  The
following example assumes that the module &lsquo;<code>mod</code>&rsquo; contains only one
file, &lsquo;<tt>m.c</tt>&rsquo;.

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout mod               # <span class="roman" style="font-family:serif; font-weight:normal">Retrieve the latest revision, 1.4</span>
 
 $ cvs update -j R1fix m.c        # <span class="roman" style="font-family:serif; font-weight:normal">Merge all changes made on the branch,</span>
                                  # <span class="roman" style="font-family:serif; font-weight:normal">i.e. the changes between revision 1.2</span>
                                  # <span class="roman" style="font-family:serif; font-weight:normal">and 1.2.2.2, into your working copy</span>
                                  # <span class="roman" style="font-family:serif; font-weight:normal">of the file.</span>
 
 $ cvs commit -m &quot;Included R1fix&quot; # <span class="roman" style="font-family:serif; font-weight:normal">Create revision 1.5.</span>
</div>

A conflict can result from a merge operation.  If that
happens, you should resolve it before committing the
new revision.  See section [[#Conflicts example|Conflicts example]].

If your source files contain keywords (see section [[#Keyword substitution|Keyword substitution]]),
you might be getting more conflicts than strictly necessary.  See
[[#Merging and keywords|Merging and keywords]], for information on how to avoid this.

The <code>checkout</code> command also supports the &lsquo;<code>-j <var>branchname</var></code>&rsquo; flag.  The
same effect as above could be achieved with this:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -j R1fix mod
 $ cvs commit -m &quot;Included R1fix&quot;
</div>

It should be noted that <code>update -j <var>tagname</var></code> will also work but may
not produce the desired result.  See section [[#Merging can add or remove files|Merging can add or remove files]], for more.


----

<div id="Merging-more-than-once"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Merging an entire branch| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Merging differences between any two revisions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Merging-from-a-branch-several-times"></div>
=== Merging from a branch several times ===

Continuing our example, the revision tree now looks
like this:

<div class="example" style="margin-left: 3.2em">
 +-----+    +-----+    +-----+    +-----+    +-----+
 ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   &lt;- The main trunk
 +-----+    +-----+    +-----+    +-----+    +-----+
                 !                           *
                 !                          *
                 !   +---------+    +---------+
 Branch R1fix -&gt; +---! 1.2.2.1 !----! 1.2.2.2 !
                     +---------+    +---------+
</div>

where the starred line represents the merge from the
&lsquo;<code>R1fix</code>&rsquo; branch to the main trunk, as just
discussed.

Now suppose that development continues on the
&lsquo;<code>R1fix</code>&rsquo; branch:

<div class="example" style="margin-left: 3.2em">
 +-----+    +-----+    +-----+    +-----+    +-----+
 ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   &lt;- The main trunk
 +-----+    +-----+    +-----+    +-----+    +-----+
                 !                           *
                 !                          *
                 !   +---------+    +---------+    +---------+
 Branch R1fix -&gt; +---! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
                     +---------+    +---------+    +---------+
</div>

and then you want to merge those new changes onto the
main trunk.  If you just use the <code>cvs update -j
R1fix m.c</code> command again, <small>CVS</small> will attempt to
merge again the changes which you have already merged,
which can have undesirable side effects.

So instead you need to specify that you only want to
merge the changes on the branch which have not yet been
merged into the trunk.  To do that you specify two
&lsquo;<code>-j</code>&rsquo; options, and <small>CVS</small> merges the changes from
the first revision to the second revision.  For
example, in this case the simplest way would be

<div class="example" style="margin-left: 3.2em">
 cvs update -j 1.2.2.2 -j R1fix m.c    # <span class="roman" style="font-family:serif; font-weight:normal">Merge changes from 1.2.2.2 to the</span>
                                       # <span class="roman" style="font-family:serif; font-weight:normal">head of the R1fix branch</span>
</div>

The problem with this is that you need to specify the
1.2.2.2 revision manually.  A slightly better approach
might be to use the date the last merge was done:

<div class="example" style="margin-left: 3.2em">
 cvs update -j R1fix:yesterday -j R1fix m.c
</div>

Better yet, tag the R1fix branch after every merge into
the trunk, and then use that tag for subsequent merges:

<div class="example" style="margin-left: 3.2em">
 cvs update -j merged_from_R1fix_to_trunk -j R1fix m.c
</div>


----

<div id="Merging-two-revisions"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Merging from a branch several times| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Merging can add or remove files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Merging-differences-between-any-two-revisions"></div>
=== Merging differences between any two revisions ===
<div id="index-Merging-two-revisions"></div>
<div id="index-Revisions_002c-merging-differences-between"></div>
<div id="index-Differences_002c-merging"></div>

With two &lsquo;<code>-j <var>revision</var></code>&rsquo; flags, the <code>update</code>
(and <code>checkout</code>) command can merge the differences
between any two revisions into your working file.

<div id="index-Undoing-a-change"></div>
<div id="index-Removing-a-change"></div>
<div class="example" style="margin-left: 3.2em">
 $ cvs update -j 1.5 -j 1.3 backend.c
</div>

will undo all changes made between revision
1.3 and 1.5.  Note the order of the revisions!

If you try to use this option when operating on
multiple files, remember that the numeric revisions will
probably be very different between the various files.
You almost always use symbolic
tags rather than revision numbers when operating on
multiple files.

<div id="index-Restoring-old-version-of-removed-file"></div>
<div id="index-Resurrecting-old-version-of-dead-file"></div>
Specifying two &lsquo;<code>-j</code>&rsquo; options can also undo file
removals or additions.  For example, suppose you have
a file
named &lsquo;<tt>file1</tt>&rsquo; which existed as revision 1.1, and
you then removed it (thus adding a dead revision 1.2).
Now suppose you want to add it again, with the same
contents it had previously.  Here is how to do it:

<div class="example" style="margin-left: 3.2em">
 $ cvs update -j 1.2 -j 1.1 file1
 U file1
 $ cvs commit -m test
 Checking in file1;
 /tmp/cvs-sanity/cvsroot/first-dir/file1,v  &lt;--  file1
 new revision: 1.3; previous revision: 1.2
 done
 $
</div>


----

<div id="Merging-adds-and-removals"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Merging differences between any two revisions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Merging and keywords| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Merging-can-add-or-remove-files"></div>
=== Merging can add or remove files ===

If the changes which you are merging involve removing
or adding some files, <code>update -j</code> will reflect
such additions or removals.

For example:
<div class="example" style="margin-left: 3.2em">
 cvs update -A
 touch a b c
 cvs add a b c ; cvs ci -m &quot;added&quot; a b c
 cvs tag -b branchtag
 cvs update -r branchtag
 touch d ; cvs add d
 rm a ; cvs rm a
 cvs ci -m &quot;added d, removed a&quot;
 cvs update -A
 cvs update -jbranchtag
</div>

After these commands are executed and a &lsquo;<code>cvs commit</code>&rsquo; is done,
file &lsquo;<tt>a</tt>&rsquo; will be removed and file &lsquo;<tt>d</tt>&rsquo; added in the main branch.

Note that using a single static tag (&lsquo;<code>-j <var>tagname</var></code>&rsquo;)
rather than a dynamic tag (&lsquo;<code>-j <var>branchname</var></code>&rsquo;) to merge
changes from a branch will usually not remove files which were removed on the
branch since <small>CVS</small> does not automatically add static tags to dead revisions.
The exception to this rule occurs when
a static tag has been attached to a dead revision manually.  Use the branch tag
to merge all changes from the branch or use two static tags as merge endpoints
to be sure that all intended changes are propagated in the merge.


----

<div id="Merging-and-keywords"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Merging can add or remove files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Branching and merging| Up ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Merging-and-keywords-1"></div>
=== Merging and keywords ===
<div id="index-Merging_002c-and-keyword-substitution"></div>
<div id="index-Keyword-substitution_002c-and-merging"></div>
<div id="index-_002dj-_0028merging-branches_0029_002c-and-keyword-substitution"></div>
<div id="index-_002dkk_002c-to-avoid-conflicts-during-a-merge"></div>

If you merge files containing keywords (see section [[#Keyword substitution|Keyword substitution]]), you will normally get numerous
conflicts during the merge, because the keywords are
expanded differently in the revisions which you are
merging.

Therefore, you will often want to specify the
&lsquo;<code>-kk</code>&rsquo; (see section [[#Substitution modes|Substitution modes]]) switch to the
merge command line.  By substituting just the name of
the keyword, not the expanded value of that keyword,
this option ensures that the revisions which you are
merging will be the same as each other, and avoid
spurious conflicts.

For example, suppose you have a file like this:

<div class="example" style="margin-left: 3.2em">
        +---------+
       _! 1.1.2.1 !   &lt;-  br1
      / +---------+
     /
    /
 +-----+    +-----+
 ! 1.1 !----! 1.2 !
 +-----+    +-----+
</div>

and your working directory is currently on the trunk
(revision 1.2).  Then you might get the following
results from a merge:

<div class="example" style="margin-left: 3.2em">
 $ cat file1
 key $<i></i>Revision: 1.2 $
 . . .
 $ cvs update -j br1
 U file1
 RCS file: /cvsroot/first-dir/file1,v
 retrieving revision 1.1
 retrieving revision 1.1.2.1
 Merging differences between 1.1 and 1.1.2.1 into file1
 rcsmerge: warning: conflicts during merge
 $ cat file1
 &lt;&lt;&lt;&lt;&lt;&lt;&lt; file1
 key $<i></i>Revision: 1.2 $
 =======
 key $<i></i>Revision: 1.1.2.1 $
 &gt;&gt;&gt;&gt;&gt;&gt;&gt; 1.1.2.1
 . . .
</div>

What happened was that the merge tried to merge the
differences between 1.1 and 1.1.2.1 into your working
directory.  So, since the keyword changed from
<code>Revision: 1.1</code> to <code>Revision: 1.1.2.1</code>,
<small>CVS</small> tried to merge that change into your working
directory, which conflicted with the fact that your
working directory had contained <code>Revision: 1.2</code>.

Here is what happens if you had used &lsquo;<code>-kk</code>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 $ cat file1
 key $<i></i>Revision: 1.2 $
 . . .
 $ cvs update -kk -j br1
 U file1
 RCS file: /cvsroot/first-dir/file1,v
 retrieving revision 1.1
 retrieving revision 1.1.2.1
 Merging differences between 1.1 and 1.1.2.1 into file1
 $ cat file1
 key $<i></i>Revision$
 . . .
</div>

What is going on here is that revision 1.1 and 1.1.2.1
both expand as plain <code>Revision</code>, and therefore
merging the changes between them into the working
directory need not change anything.  Therefore, there
is no conflict.

'''WARNING: In versions of <small>CVS</small> prior to 1.12.2, there was a
major problem with using &lsquo;<code>-kk</code>&rsquo; on merges.  Namely, &lsquo;<code>-kk</code>&rsquo;
overrode any default keyword expansion mode set in the archive file in
the repository.  This could, unfortunately for some users, cause data
corruption in binary files (with a default keyword expansion mode set
to &lsquo;<code>-kb</code>&rsquo;).  Therefore, when a repository contained binary files,
conflicts had to be dealt with manually rather than using &lsquo;<code>-kk</code>&rsquo; in
a merge command.'''

In <small>CVS</small> version 1.12.2 and later, the keyword expansion mode
provided on the command line to any <small>CVS</small> command no longer
overrides the &lsquo;<code>-kb</code>&rsquo; keyword expansion mode setting for binary
files, though it will still override other default keyword expansion
modes.  You can now safely merge using &lsquo;<code>-kk</code>&rsquo; to avoid spurious conflicts
on lines containing RCS keywords, even when your repository contains
binary files.


----

<div id="Recursive-behavior"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Merging and keywords| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Recursive-behavior-1"></div>
== Recursive behavior ==
<div id="index-Recursive-_0028directory-descending_0029"></div>
<div id="index-Directory_002c-descending"></div>
<div id="index-Descending-directories"></div>
<div id="index-Subdirectories"></div>

Almost all of the subcommands of <small>CVS</small> work
recursively when you specify a directory as an
argument.  For instance, consider this directory
structure:

<div class="example" style="margin-left: 3.2em">
       <code>$HOME</code>
         |
         +--<tt>tc</tt>
         |   |
             +--<tt>CVS</tt>
             |      (internal CVS files)
             +--<tt>Makefile</tt>
             +--<tt>backend.c</tt>
             +--<tt>driver.c</tt>
             +--<tt>frontend.c</tt>
             +--<tt>parser.c</tt>
             +--<tt>man</tt>
             |    |
             |    +--<tt>CVS</tt>
             |    |  (internal CVS files)
             |    +--<tt>tc.1</tt>
             |
             +--<tt>testing</tt>
                  |
                  +--<tt>CVS</tt>
                  |  (internal CVS files)
                  +--<tt>testpgm.t</tt>
                  +--<tt>test2.t</tt>
</div>

If &lsquo;<tt>tc</tt>&rsquo; is the current working directory, the
following is true:


* &lsquo;<code>cvs update testing</code>&rsquo; is equivalent to

<div class="example" style="margin-left: 3.2em">
 cvs update testing/testpgm.t testing/test2.t
</div>


* &lsquo;<code>cvs update testing man</code>&rsquo; updates all files in the subdirectories


* &lsquo;<code>cvs update .</code>&rsquo; or just &lsquo;<code>cvs update</code>&rsquo; updates all files in the <code>tc</code> directory

If no arguments are given to <code>update</code> it will
update all files in the current working directory and
all its subdirectories.  In other words, &lsquo;<tt>.</tt>&rsquo; is a
default argument to <code>update</code>.  This is also true
for most of the <small>CVS</small> subcommands, not only the
<code>update</code> command.

The recursive behavior of the <small>CVS</small> subcommands can be
turned off with the &lsquo;<code>-l</code>&rsquo; option.
Conversely, the &lsquo;<code>-R</code>&rsquo; option can be used to force recursion if
&lsquo;<code>-l</code>&rsquo; is specified in &lsquo;<tt>~/.cvsrc</tt>&rsquo; (see section [[#Default options and the ~/.cvsrc file|Default options and the ~/.cvsrc file]]).

<div class="example" style="margin-left: 3.2em">
 $ cvs update -l         # <span class="roman" style="font-family:serif; font-weight:normal">Don't update files in subdirectories</span>
</div>


----

<div id="Adding-and-removing"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Recursive behavior| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Recursive behavior| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Adding files to a directory| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Adding_002c-removing_002c-and-renaming-files-and-directories"></div>
== Adding, removing, and renaming files and directories ==

In the course of a project, one will often add new
files.  Likewise with removing or renaming, or with
directories.  The general concept to keep in mind in
all these cases is that instead of making an
irreversible change you want <small>CVS</small> to record the
fact that a change has taken place, just as with
modifying an existing file.  The exact mechanisms to do
this in <small>CVS</small> vary depending on the situation.

 [[#Adding files to a directory|&bull; Adding files]]::                Adding files
 [[#Removing files|&bull; Removing files]]::              Removing files
 [[#Removing directories|&bull; Removing directories]]::        Removing directories
 [[#Moving and renaming files|&bull; Moving files]]::                Moving and renaming files
 [[#Moving and renaming directories|&bull; Moving directories]]::          Moving and renaming directories


----

<div id="Adding-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| Up ]]|</td>
<td valign="middle" align="left">|[[#Removing files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Adding-files-to-a-directory"></div>
=== Adding files to a directory ===
<div id="index-Adding-files"></div>

To add a new file to a directory, follow these steps.


* You must have a working copy of the directory. See section [[#Getting the source|Getting the source]].


* Create the new file inside your working copy of the directory.


* Use &lsquo;<code>cvs add <var>filename</var></code>&rsquo; to tell <small>CVS</small> that you want to version control the file.  If the file contains binary data, specify &lsquo;<code>-kb</code>&rsquo; (see section [[#Handling binary files|Handling binary files]]).


* Use &lsquo;<code>cvs commit <var>filename</var></code>&rsquo; to actually check in the file into the repository.  Other developers cannot see the file until you perform this step.

You can also use the <code>add</code> command to add a new
directory.

Unlike most other commands, the <code>add</code> command is
not recursive.  You cannot even type &lsquo;<code>cvs add
foo/bar</code>&rsquo;!  Instead, you have to

<div class="example" style="margin-left: 3.2em">
 $ cd foo
 $ cvs add bar
</div>

<div id="index-add-_0028subcommand_0029"></div>
;<div id="index-cvs-add"></div>Command<nowiki>:</nowiki> <strong>cvs add</strong><em> <nowiki>[</nowiki><code>-k</code> kflag<nowiki>]</nowiki> <nowiki>[</nowiki><code>-m</code> message<nowiki>]</nowiki> files &hellip;</em>

: Schedule <var>files</var> to be added to the repository. The files or directories specified with <code>add</code> must already exist in the current directory.  To add a whole new directory hierarchy to the source repository (for example, files received from a third-party vendor), use the <code>import</code> command instead.  See section [[#import&mdash;Import sources into CVS, using vendor branches|import&mdash;Import sources into CVS, using vendor branches]].

: The added files are not placed in the source repository until you use <code>commit</code> to make the change permanent.  Doing an <code>add</code> on a file that was removed with the <code>remove</code> command will undo the effect of the <code>remove</code>, unless a <code>commit</code> command intervened.  See section [[#Removing files|Removing files]], for an example.

: The &lsquo;<code>-k</code>&rsquo; option specifies the default way that this file will be checked out; for more information see [[#Substitution modes|Substitution modes]].

: The &lsquo;<code>-m</code>&rsquo; option specifies a description for the file.  This description appears in the history log (if it is enabled, see section [[#The history file|The history file]]).  It will also be saved in the version history inside the repository when the file is committed.  The <code>log</code> command displays this description.  The description can be changed using &lsquo;<code>admin -t</code>&rsquo;.  See section [[#admin&mdash;Administration|admin&mdash;Administration]].  If you omit the &lsquo;<code>-m <var>description</var></code>&rsquo; flag, an empty string will be used.  You will not be prompted for a description.

For example, the following commands add the file
&lsquo;<tt>backend.c</tt>&rsquo; to the repository:

<div class="example" style="margin-left: 3.2em">
 $ cvs add backend.c
 $ cvs commit -m &quot;Early version. Not yet compilable.&quot; backend.c
</div>

When you add a file it is added only on the branch
which you are working on (see section [[#Branching and merging|Branching and merging]]).  You can
later merge the additions to another branch if you want
(see section [[#Merging can add or remove files|Merging can add or remove files]]).


----

<div id="Removing-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Adding files to a directory| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| Up ]]|</td>
<td valign="middle" align="left">|[[#Removing directories| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Removing-files-1"></div>
=== Removing files ===
<div id="index-Removing-files"></div>
<div id="index-Deleting-files"></div>

Directories change.  New files are added, and old files
disappear.  Still, you want to be able to retrieve an
exact copy of old releases.

Here is what you can do to remove a file,
but remain able to retrieve old revisions:


* Make sure that you have not made any uncommitted modifications to the file.  See section [[#Viewing differences|Viewing differences]], for one way to do that.  You can also use the <code>status</code> or <code>update</code> command.  If you remove the file without committing your changes, you will of course not be able to retrieve the file as it was immediately before you deleted it.


* Remove the file from your working copy of the directory. You can for instance use <code>rm</code>.


* Use &lsquo;<code>cvs remove <var>filename</var></code>&rsquo; to tell <small>CVS</small> that you really want to delete the file.


* Use &lsquo;<code>cvs commit <var>filename</var></code>&rsquo; to actually perform the removal of the file from the repository.

When you commit the removal of the file, <small>CVS</small>
records the fact that the file no longer exists.  It is
possible for a file to exist on only some branches and
not on others, or to re-add another file with the same
name later.  <small>CVS</small> will correctly create or not create
the file, based on the &lsquo;<code>-r</code>&rsquo; and &lsquo;<code>-D</code>&rsquo; options
specified to <code>checkout</code> or <code>update</code>.

<div id="index-Remove-_0028subcommand_0029"></div>
;<div id="index-cvs-remove"></div>Command<nowiki>:</nowiki> <strong>cvs remove</strong><em> <nowiki>[</nowiki>options<nowiki>]</nowiki> files &hellip;</em>

: Schedule file(s) to be removed from the repository (files which have not already been removed from the working directory are not processed).  This command does not actually remove the file from the repository until you commit the removal.  For a full list of options, see [[#Quick reference to CVS commands|Quick reference to CVS commands]].

Here is an example of removing several files:

<div class="example" style="margin-left: 3.2em">
 $ cd test
 $ rm *.c
 $ cvs remove
 cvs remove: Removing .
 cvs remove: scheduling a.c for removal
 cvs remove: scheduling b.c for removal
 cvs remove: use 'cvs commit' to remove these files permanently
 $ cvs ci -m &quot;Removed unneeded files&quot;
 cvs commit: Examining .
 cvs commit: Committing .
</div>

As a convenience you can remove the file and <code>cvs
remove</code> it in one step, by specifying the &lsquo;<code>-f</code>&rsquo;
option.  For example, the above example could also be
done like this:

<div class="example" style="margin-left: 3.2em">
 $ cd test
 $ cvs remove -f *.c
 cvs remove: scheduling a.c for removal
 cvs remove: scheduling b.c for removal
 cvs remove: use 'cvs commit' to remove these files permanently
 $ cvs ci -m &quot;Removed unneeded files&quot;
 cvs commit: Examining .
 cvs commit: Committing .
</div>

If you execute <code>remove</code> for a file, and then
change your mind before you commit, you can undo the
<code>remove</code> with an <code>add</code> command.


<div class="example" style="margin-left: 3.2em">
 $ ls
 CVS   ja.h  oj.c
 $ rm oj.c
 $ cvs remove oj.c
 cvs remove: scheduling oj.c for removal
 cvs remove: use 'cvs commit' to remove this file permanently
 $ cvs add oj.c
 U oj.c
 cvs add: oj.c, version 1.1.1.1, resurrected
</div>

If you realize your mistake before you run the
<code>remove</code> command you can use <code>update</code> to
resurrect the file:

<div class="example" style="margin-left: 3.2em">
 $ rm oj.c
 $ cvs update oj.c
 cvs update: warning: oj.c was lost
 U oj.c
</div>

When you remove a file it is removed only on the branch
which you are working on (see section [[#Branching and merging|Branching and merging]]).  You can
later merge the removals to another branch if you want
(see section [[#Merging can add or remove files|Merging can add or remove files]]).


----

<div id="Removing-directories"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Removing files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| Up ]]|</td>
<td valign="middle" align="left">|[[#Moving and renaming files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Removing-directories-1"></div>
=== Removing directories ===
<div id="index-Removing-directories"></div>
<div id="index-Directories_002c-removing"></div>

In concept removing directories is somewhat similar to
removing files&mdash;you want the directory to not exist in
your current working directories, but you also want to
be able to retrieve old releases in which the directory
existed.

The way that you remove a directory is to remove all
the files in it.  You don&rsquo;t remove the directory
itself; there is no way to do that.
Instead you specify the &lsquo;<code>-P</code>&rsquo; option to
<code>cvs update</code> or <code>cvs checkout</code>,
which will cause <small>CVS</small> to remove empty
directories from working directories.
(Note that <code>cvs export</code> always removes empty directories.)
Probably the
best way to do this is to always specify &lsquo;<code>-P</code>&rsquo;; if
you want an empty directory then put a dummy file (for
example &lsquo;<tt>.keepme</tt>&rsquo;) in it to prevent &lsquo;<code>-P</code>&rsquo; from
removing it.

Note that &lsquo;<code>-P</code>&rsquo; is implied by the &lsquo;<code>-r</code>&rsquo; or &lsquo;<code>-D</code>&rsquo;
options of <code>checkout</code>.  This way
<small>CVS</small> will be able to correctly create the directory
or not depending on whether the particular version you
are checking out contains any files in that directory.


----

<div id="Moving-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Removing directories| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| Up ]]|</td>
<td valign="middle" align="left">|[[#The Normal way to Rename| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Moving-and-renaming-files"></div>
=== Moving and renaming files ===
<div id="index-Moving-files"></div>
<div id="index-Renaming-files"></div>
<div id="index-Files_002c-moving"></div>

Moving files to a different directory or renaming them
is not difficult, but some of the ways in which this
works may be non-obvious.  (Moving or renaming a
directory is even harder.  See section [[#Moving and renaming directories|Moving and renaming directories]].).

The examples below assume that the file <var>old</var> is renamed to
<var>new</var>.

 [[#The Normal way to Rename|&bull; Outside]]::                     The normal way to Rename
 [[#Moving the history file|&bull; Inside]]::                      A tricky, alternative way
 [[#Copying the history file|&bull; Rename by copying]]::           Another tricky, alternative way


----

<div id="Outside"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Moving and renaming files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Moving and renaming files| Up ]]|</td>
<td valign="middle" align="left">|[[#Moving the history file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-Normal-way-to-Rename"></div>
==== The Normal way to Rename ====


The normal way to move a file is to copy <var>old</var> to
<var>new</var>, and then issue the normal <small>CVS</small> commands
to remove <var>old</var> from the repository, and add
<var>new</var> to it.

<div class="example" style="margin-left: 3.2em">
 $ mv <var>old</var> <var>new</var>
 $ cvs remove <var>old</var>
 $ cvs add <var>new</var>
 $ cvs commit -m &quot;Renamed <var>old</var> to <var>new</var>&quot; <var>old</var> <var>new</var>
</div>

This is the simplest way to move a file, it is not
error-prone, and it preserves the history of what was
done.  Note that to access the history of the file you
must specify the old or the new name, depending on what
portion of the history you are accessing.  For example,
<code>cvs log <var>old</var></code> will give the log up until the
time of the rename.

When <var>new</var> is committed its revision numbers will
start again, usually at 1.1, so if that bothers you,
use the &lsquo;<code>-r rev</code>&rsquo; option to commit.  For more
information see [[#Assigning revisions|Assigning revisions]].


----

<div id="Inside"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The Normal way to Rename| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Moving and renaming files| Up ]]|</td>
<td valign="middle" align="left">|[[#Copying the history file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Moving-the-history-file"></div>
==== Moving the history file ====

This method is more dangerous, since it involves moving
files inside the repository.  Read this entire section
before trying it out!

<div class="example" style="margin-left: 3.2em">
 $ cd $CVSROOT/<var>dir</var>
 $ mv <var>old</var>,v <var>new</var>,v
</div>

Advantages:


* The log of changes is maintained intact.


* The revision numbers are not affected.

Disadvantages:


* Old releases cannot easily be fetched from the repository.  (The file will show up as <var>new</var> even in revisions from the time before it was renamed).


* There is no log information of when the file was renamed.


* Nasty things might happen if someone accesses the history file while you are moving it.  Make sure no one else runs any of the <small>CVS</small> commands while you move it.


----

<div id="Rename-by-copying"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Moving the history file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Moving and renaming files| Up ]]|</td>
<td valign="middle" align="left">|[[#Moving and renaming directories| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Copying-the-history-file"></div>
==== Copying the history file ====

This way also involves direct modifications to the
repository.  It is safe, but not without drawbacks.

<div class="example" style="margin-left: 3.2em">
 # <span class="roman" style="font-family:serif; font-weight:normal">Copy the RCS file inside the repository</span>
 $ cd $CVSROOT/<var>dir</var>
 $ cp <var>old</var>,v <var>new</var>,v
 # <span class="roman" style="font-family:serif; font-weight:normal">Remove the old file</span>
 $ cd ~/<var>dir</var>
 $ rm <var>old</var>
 $ cvs remove <var>old</var>
 $ cvs commit <var>old</var>
 # <span class="roman" style="font-family:serif; font-weight:normal">Remove all tags from <var>new</var></span>
 $ cvs update <var>new</var>
 $ cvs log <var>new</var>             # <span class="roman" style="font-family:serif; font-weight:normal">Remember the non-branch tag names</span>
 $ cvs tag -d <var>tag1</var> <var>new</var>
 $ cvs tag -d <var>tag2</var> <var>new</var>
 &hellip;
</div>

By removing the tags you will be able to check out old
revisions.

Advantages:


* Checking out old revisions works correctly, as long as you use &lsquo;<code>-r<var>tag</var></code>&rsquo; and not &lsquo;<code>-D<var>date</var></code>&rsquo; to retrieve the revisions.


* The log of changes is maintained intact.


* The revision numbers are not affected.

Disadvantages:


* You cannot easily see the history of the file across the rename.



----

<div id="Moving-directories"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Copying the history file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| Up ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Moving-and-renaming-directories"></div>
=== Moving and renaming directories ===
<div id="index-Moving-directories"></div>
<div id="index-Renaming-directories"></div>
<div id="index-Directories_002c-moving"></div>

The normal way to rename or move a directory is to
rename or move each file within it as described in
[[#The Normal way to Rename|The Normal way to Rename]].  Then check out with the &lsquo;<code>-P</code>&rsquo;
option, as described in [[#Removing directories|Removing directories]].

If you really want to hack the repository to rename or
delete a directory in the repository, you can do it
like this:


# Inform everyone who has a checked out copy of the directory that the directory will be renamed.  They should commit all their changes, and remove their working copies, before you take the steps below.


# Rename the directory inside the repository.

<div class="example" style="margin-left: 3.2em">
 $ cd $CVSROOT/<var>parent-dir</var>
 $ mv <var>old-dir</var> <var>new-dir</var>
</div>


# Fix the <small>CVS</small> administrative files, if necessary (for instance if you renamed an entire module).


# Tell everyone that they can check out again and continue working.


If someone had a working copy the <small>CVS</small> commands will
cease to work for him, until he removes the directory
that disappeared inside the repository.

It is almost always better to move the files in the
directory instead of moving the directory.  If you move the
directory you are unlikely to be able to retrieve old
releases correctly, since they probably depend on the
name of the directories.


----

<div id="History-browsing"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Adding, removing, and renaming files and directories| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Moving and renaming directories| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Log messages| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="History-browsing-1"></div>
== History browsing ==
<div id="index-History-browsing"></div>
<div id="index-Traceability"></div>
<div id="index-Isolation"></div>


Once you have used <small>CVS</small> to store a version control
history&mdash;what files have changed when, how, and by
whom, there are a variety of mechanisms for looking
through the history.

 [[#Log messages|&bull; log messages]]::                Log messages
 [[#The history database|&bull; history database]]::            The history database
 [[#User-defined logging|&bull; user-defined logging]]::        User-defined logging
 [[#Annotate command|&bull; annotate]]::                    What revision modified each line of a file?


----

<div id="log-messages"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#History browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| &lt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| Up ]]|</td>
<td valign="middle" align="left">|[[#The history database| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Log-messages"></div>
=== Log messages ===

Whenever you commit a file you specify a log message.

To look through the log messages which have been
specified for every revision which has been committed,
use the <code>cvs log</code> command (see section [[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]]).


----

<div id="history-database"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#History browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Log messages| &lt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| Up ]]|</td>
<td valign="middle" align="left">|[[#User-defined logging| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-history-database"></div>
=== The history database ===

You can use the history file (see section [[#The history file|The history file]]) to
log various <small>CVS</small> actions.  To retrieve the
information from the history file, use the <code>cvs
history</code> command (see section [[#history&mdash;Show status of files and users|history&mdash;Show status of files and users]]).

Note: you can control what is logged to this file by using the
&lsquo;<code>LogHistory</code>&rsquo; keyword in the &lsquo;<tt>CVSROOT/config</tt>&rsquo; file
(see section [[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]).



----

<div id="user_002ddefined-logging"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#History browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The history database| &lt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| Up ]]|</td>
<td valign="middle" align="left">|[[#Annotate command| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="User_002ddefined-logging"></div>
=== User-defined logging ===

You can customize <small>CVS</small> to log various kinds of
actions, in whatever manner you choose.  These
mechanisms operate by executing a script at various
times.  The script might append a message to a file
listing the information and the programmer who created
it, or send mail to a group of developers, or, perhaps,
post a message to a particular newsgroup.  To log
commits, use the &lsquo;<tt>loginfo</tt>&rsquo; file (see section [[#Loginfo|Loginfo]]).
To log commits, checkouts, exports, and tags,
respectively, you can also use the &lsquo;<code>-i</code>&rsquo;,
&lsquo;<code>-o</code>&rsquo;, &lsquo;<code>-e</code>&rsquo;, and &lsquo;<code>-t</code>&rsquo; options in the
modules file.  For a more flexible way of giving
notifications to various users, which requires less in
the way of keeping centralized scripts up to date, use
the <code>cvs watch add</code> command (see section [[#Telling CVS to notify you|Telling CVS to notify you]]); this command is useful even if you are not
using <code>cvs watch on</code>.

<div id="index-taginfo"></div>
<div id="index-Exit-status_002c-of-taginfo"></div>
The &lsquo;<tt>taginfo</tt>&rsquo; file defines programs to execute
when someone executes a <code>tag</code> or <code>rtag</code>
command.  The &lsquo;<tt>taginfo</tt>&rsquo; file has the standard form
for administrative files (see section [[#Reference manual for Administrative files|Reference manual for Administrative files]]), where each line is a regular expression
followed by a command to execute.  The arguments passed
to the command are, in order, the <var>tagname</var>,
<var>operation</var> (<code>add</code> for <code>tag</code>,
<code>mov</code> for <code>tag -F</code>, and <code>del</code> for
<code>tag -d</code>), <var>repository</var>, and any remaining are
pairs of <var>filename</var> <var>revision</var>.  A non-zero
exit of the filter program will cause the tag to be
aborted.

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

<div class="example" style="margin-left: 3.2em">
 ALL /usr/local/cvsroot/CVSROOT/loggit
</div>

Where &lsquo;<tt>/usr/local/cvsroot/CVSROOT/loggit</tt>&rsquo; contains the
following script:

<div class="example" style="margin-left: 3.2em">
 #!/bin/sh
 echo &quot;$@&quot; &gt;&gt;/home/kingdon/cvsroot/CVSROOT/taglog
</div>


----

<div id="annotate"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#History browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#User-defined logging| &lt; ]]|</td>
<td valign="middle" align="left">|[[#History browsing| Up ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Annotate-command"></div>
=== Annotate command ===
<div id="index-annotate-_0028subcommand_0029"></div>

;<div id="index-cvs-annotate"></div>Command<nowiki>:</nowiki> <strong>cvs annotate</strong><em> <nowiki>[</nowiki><code>-FflR</code><nowiki>]</nowiki> <nowiki>[</nowiki><code>-r rev</code>|<code>-D date</code><nowiki>]</nowiki> files &hellip;</em>

: For each file in <var>files</var>, print the head revision of the trunk, together with information on the last modification for each line.  For example:

<div class="example" style="margin-left: 3.2em">
 $ cvs annotate ssfile
 Annotations for ssfile
 ***************
 1.1          (mary     27-Mar-96): ssfile line 1
 1.2          (joe      28-Mar-96): ssfile line 2
</div>

: The file &lsquo;<tt>ssfile</tt>&rsquo; currently contains two lines. The <code>ssfile line 1</code> line was checked in by <code>mary</code> on March 27.  Then, on March 28, <code>joe</code> added a line <code>ssfile line 2</code>, without modifying the <code>ssfile line 1</code> line.  This report doesn&rsquo;t tell you anything about lines which have been deleted or replaced; you need to use <code>cvs diff</code> for that (see section [[#diff&mdash;Show differences between revisions|diff&mdash;Show differences between revisions]]).


The options to <code>cvs annotate</code> are listed in
[[#Quick reference to CVS commands|Quick reference to CVS commands]], and can be used to select the files
and revisions to annotate.  The options are described
in more detail there and in [[#Common command options|Common command options]].



----

<div id="Binary-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#History browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Annotate command| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#The issues with binary files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Handling-binary-files"></div>
== Handling binary files ==
<div id="index-Binary-files"></div>

The most common use for <small>CVS</small> is to store text
files.  With text files, <small>CVS</small> can merge revisions,
display the differences between revisions in a
human-visible fashion, and other such operations.
However, if you are willing to give up a few of these
abilities, <small>CVS</small> can store binary files.  For
example, one might store a web site in <small>CVS</small>
including both text files and binary images.

 [[#The issues with binary files|&bull; Binary why]]::     More details on issues with binary files
 [[#How to store binary files|&bull; Binary howto]]::   How to store them


----

<div id="Binary-why"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Handling binary files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| Up ]]|</td>
<td valign="middle" align="left">|[[#How to store binary files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-issues-with-binary-files"></div>
=== The issues with binary files ===

While the need to manage binary files may seem obvious
if the files that you customarily work with are binary,
putting them into version control does present some
additional issues.

One basic function of version control is to show the
differences between two revisions.  For example, if
someone else checked in a new version of a file, you
may wish to look at what they changed and determine
whether their changes are good.  For text files,
<small>CVS</small> provides this functionality via the <code>cvs
diff</code> command.  For binary files, it may be possible to
extract the two revisions and then compare them with a
tool external to <small>CVS</small> (for example, word processing
software often has such a feature).  If there is no
such tool, one must track changes via other mechanisms,
such as urging people to write good log messages, and
hoping that the changes they actually made were the
changes that they intended to make.

Another ability of a version control system is the
ability to merge two revisions.  For <small>CVS</small> this
happens in two contexts.  The first is when users make
changes in separate working directories
(see section [[#Multiple developers|Multiple developers]]).  The second is when one
merges explicitly with the &lsquo;<code>update -j</code>&rsquo; command
(see section [[#Branching and merging|Branching and merging]]).

In the case of text
files, <small>CVS</small> can merge changes made independently,
and signal a conflict if the changes conflict.  With
binary files, the best that <small>CVS</small> can do is present
the two different copies of the file, and leave it to
the user to resolve the conflict.  The user may choose
one copy or the other, or may run an external merge
tool which knows about that particular file format, if
one exists.
Note that having the user merge relies primarily on the
user to not accidentally omit some changes, and thus is
potentially error prone.

If this process is thought to be undesirable, the best
choice may be to avoid merging.  To avoid the merges
that result from separate working directories, see the
discussion of reserved checkouts (file locking) in
[[#Multiple developers|Multiple developers]].  To avoid the merges
resulting from branches, restrict use of branches.


----

<div id="Binary-howto"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Handling binary files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The issues with binary files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Handling binary files| Up ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-to-store-binary-files"></div>
=== How to store binary files ===

There are two issues with using <small>CVS</small> to store
binary files.  The first is that <small>CVS</small> by default
converts line endings between the canonical form in
which they are stored in the repository (linefeed
only), and the form appropriate to the operating system
in use on the client (for example, carriage return
followed by line feed for Windows NT).

The second is that a binary file might happen to
contain data which looks like a keyword (see section [[#Keyword substitution|Keyword substitution]]), so keyword expansion must be turned
off.


The &lsquo;<code>-kb</code>&rsquo; option available with some <small>CVS</small>
commands insures that neither line ending conversion
nor keyword expansion will be done.

Here is an example of how you can create a new file
using the &lsquo;<code>-kb</code>&rsquo; flag:

<div class="example" style="margin-left: 3.2em">
 $ echo '$<i></i>Id$' &gt; kotest
 $ cvs add -kb -m&quot;A test file&quot; kotest
 $ cvs ci -m&quot;First checkin; contains a keyword&quot; kotest
</div>

If a file accidentally gets added without &lsquo;<code>-kb</code>&rsquo;,
one can use the <code>cvs admin</code> command to recover.
For example:

<div class="example" style="margin-left: 3.2em">
 $ echo '$<i></i>Id$' &gt; kotest
 $ cvs add -m&quot;A test file&quot; kotest
 $ cvs ci -m&quot;First checkin; contains a keyword&quot; kotest
 $ cvs admin -kb kotest
 $ cvs update -A kotest
 # <span class="roman" style="font-family:serif; font-weight:normal">For non-unix systems:</span>
 # <span class="roman" style="font-family:serif; font-weight:normal">Copy in a good copy of the file from outside CVS</span>
 $ cvs commit -m &quot;make it binary&quot; kotest
</div>

When you check in the file &lsquo;<tt>kotest</tt>&rsquo; the file is
not preserved as a binary file, because you did not
check it in as a binary file.  The <code>cvs
admin -kb</code> command sets the default keyword
substitution method for this file, but it does not
alter the working copy of the file that you have.  If you need to
cope with line endings (that is, you are using
<small>CVS</small> on a non-unix system), then you need to
check in a new copy of the file, as shown by the
<code>cvs commit</code> command above.
On unix, the <code>cvs update -A</code> command suffices.
(Note that you can use <code>cvs log</code> to determine the default keyword
substitution method for a file and <code>cvs status</code> to determine
the keyword substitution method for a working copy.)

However, in using <code>cvs admin -k</code> to change the
keyword expansion, be aware that the keyword expansion
mode is not version controlled.  This means that, for
example, that if you have a text file in old releases,
and a binary file with the same name in new releases,
<small>CVS</small> provides no way to check out the file in text
or binary mode depending on what version you are
checking out.  There is no good workaround for this
problem.

You can also set a default for whether <code>cvs add</code>
and <code>cvs import</code> treat a file as binary based on
its name; for example you could say that files who
names end in &lsquo;<code>.exe</code>&rsquo; are binary.  See section [[#The cvswrappers file|The cvswrappers file]].
There is currently no way to have <small>CVS</small> detect
whether a file is binary based on its contents.  The
main difficulty with designing such a feature is that
it is not clear how to distinguish between binary and
non-binary files, and the rules to apply would vary
considerably with the operating system.


----

<div id="Multiple-developers"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Handling binary files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How to store binary files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#File status| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Multiple-developers-1"></div>
== Multiple developers ==
<div id="index-Multiple-developers"></div>
<div id="index-Team-of-developers"></div>
<div id="index-File-locking"></div>
<div id="index-Locking-files"></div>
<div id="index-Working-copy"></div>
<div id="index-Reserved-checkouts"></div>
<div id="index-Unreserved-checkouts"></div>
<div id="index-RCS_002dstyle-locking"></div>

When more than one person works on a software project
things often get complicated.  Often, two people try to
edit the same file simultaneously.  One solution, known
as <em>file locking</em> or <em>reserved checkouts</em>, is
to allow only one person to edit each file at a time.
This is the only solution with some version control
systems, including <small>RCS</small> and <small>SCCS</small>.  Currently
the usual way to get reserved checkouts with <small>CVS</small>
is the <code>cvs admin -l</code> command (see section [[#admin options|admin options]]).  This is not as nicely integrated into
<small>CVS</small> as the watch features, described below, but it
seems that most people with a need for reserved
checkouts find it adequate.
It also may be possible to use the watches
features described below, together with suitable
procedures (not enforced by software), to avoid having
two people edit at the same time.

The default model with <small>CVS</small> is known as
<em>unreserved checkouts</em>.  In this model, developers
can edit their own <em>working copy</em> of a file
simultaneously.  The first person that commits his
changes has no automatic way of knowing that another
has started to edit it.  Others will get an error
message when they try to commit the file.  They must
then use <small>CVS</small> commands to bring their working copy
up to date with the repository revision.  This process
is almost automatic.

<small>CVS</small> also supports mechanisms which facilitate
various kinds of communication, without actually
enforcing rules like reserved checkouts do.

The rest of this chapter describes how these various
models work, and some of the issues involved in
choosing between them.


 [[#File status|&bull; File status]]::                 A file can be in several states
 [[#Bringing a file up to date|&bull; Updating a file]]::             Bringing a file up-to-date
 [[#Conflicts example|&bull; Conflicts example]]::           An informative example
 [[#Informing others about commits|&bull; Informing others]]::            To cooperate you must inform
 [[#Several developers simultaneously attempting to run CVS|&bull; Concurrency]]::                 Simultaneous repository access
 [[#Mechanisms to track who is editing files|&bull; Watches]]::                     Mechanisms to track who is editing files
 [[#Choosing between reserved or unreserved checkouts|&bull; Choosing a model]]::            Reserved or unreserved checkouts?


----

<div id="File-status"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| Up ]]|</td>
<td valign="middle" align="left">|[[#Bringing a file up to date| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="File-status-1"></div>
=== File status ===
<div id="index-File-status"></div>
<div id="index-Status-of-a-file"></div>

Based on what operations you have performed on a
checked out file, and what operations others have
performed to that file in the repository, one can
classify a file in a number of states.  The states, as
reported by the <code>status</code> command, are:

<div id="index-Up_002dto_002ddate"></div>
;Up-to-date
: The file is identical with the latest revision in the repository for the branch in use.

;Locally Modified
<div id="index-Locally-Modified"></div>
: You have edited the file, and not yet committed your changes.

;Locally Added
<div id="index-Locally-Added"></div>
: You have added the file with <code>add</code>, and not yet committed your changes.

;Locally Removed
<div id="index-Locally-Removed"></div>
: You have removed the file with <code>remove</code>, and not yet committed your changes.

;Needs Checkout
<div id="index-Needs-Checkout"></div>
: Someone else has committed a newer revision to the repository.  The name is slightly misleading; you will ordinarily use <code>update</code> rather than <code>checkout</code> to get that newer revision.

;Needs Patch
<div id="index-Needs-Patch"></div>
: Like Needs Checkout, but the <small>CVS</small> server will send a patch rather than the entire file.  Sending a patch or sending an entire file accomplishes the same thing.

;Needs Merge
<div id="index-Needs-Merge"></div>
: Someone else has committed a newer revision to the repository, and you have also made modifications to the file.

;Unresolved Conflict
<div id="index-Unresolved-Conflict"></div>
: A file with the same name as this new file has been added to the repository from a second workspace.  This file will need to be moved out of the way to allow an <code>update</code> to complete.

;File had conflicts on merge
<div id="index-File-had-conflicts-on-merge"></div>
: This is like Locally Modified, except that a previous <code>update</code> command gave a conflict.  If you have not already done so, you need to resolve the conflict as described in [[#Conflicts example|Conflicts example]].

;Unknown
<div id="index-Unknown"></div>
: <small>CVS</small> doesn&rsquo;t know anything about this file.  For example, you have created a new file and have not run <code>add</code>.


To help clarify the file status, <code>status</code> also
reports the <code>Working revision</code> which is the
revision that the file in the working directory derives
from, and the <code>Repository revision</code> which is the
latest revision in the repository for the branch in
use.

The options to <code>status</code> are listed in
[[#Quick reference to CVS commands|Quick reference to CVS commands]].  For information on its <code>Sticky tag</code>
and <code>Sticky date</code> output, see [[#Sticky tags|Sticky tags]].
For information on its <code>Sticky options</code> output,
see the &lsquo;<code>-k</code>&rsquo; option in [[#update options|update options]].

You can think of the <code>status</code> and <code>update</code>
commands as somewhat complementary.  You use
<code>update</code> to bring your files up to date, and you
can use <code>status</code> to give you some idea of what an
<code>update</code> would do (of course, the state of the
repository might change before you actually run
<code>update</code>).  In fact, if you want a command to
display file status in a more brief format than is
displayed by the <code>status</code> command, you can invoke

<div id="index-update_002c-to-display-file-status"></div>
<div class="example" style="margin-left: 3.2em">
 $ cvs -n -q update
</div>

The &lsquo;<code>-n</code>&rsquo; option means to not actually do the
update, but merely to display statuses; the &lsquo;<code>-q</code>&rsquo;
option avoids printing the name of each directory.  For
more information on the <code>update</code> command, and
these options, see [[#Quick reference to CVS commands|Quick reference to CVS commands]].


----

<div id="Updating-a-file"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#File status| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| Up ]]|</td>
<td valign="middle" align="left">|[[#Conflicts example| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Bringing-a-file-up-to-date"></div>
=== Bringing a file up to date ===
<div id="index-Bringing-a-file-up-to-date"></div>
<div id="index-Updating-a-file"></div>
<div id="index-Merging-a-file"></div>
<div id="index-Update_002c-introduction"></div>

When you want to update or merge a file, use the <code>update</code>
command.  For files that are not up to date this is roughly equivalent
to a <code>checkout</code> command: the newest revision of the file is
extracted from the repository and put in your working directory.

Your modifications to a file are never lost when you
use <code>update</code>.  If no newer revision exists,
running <code>update</code> has no effect.  If you have
edited the file, and a newer revision is available,
<small>CVS</small> will merge all changes into your working copy.

For instance, imagine that you checked out revision 1.4 and started
editing it.  In the meantime someone else committed revision 1.5, and
shortly after that revision 1.6.  If you run <code>update</code> on the file
now, <small>CVS</small> will incorporate all changes between revision 1.4 and 1.6 into
your file.

<div id="index-Overlap"></div>
If any of the changes between 1.4 and 1.6 were made too
close to any of the changes you have made, an
<em>overlap</em> occurs.  In such cases a warning is
printed, and the resulting file includes both
versions of the lines that overlap, delimited by
special markers.
See section [[#update&mdash;Bring work tree in sync with repository|update&mdash;Bring work tree in sync with repository]], for a complete description of the
<code>update</code> command.


----

<div id="Conflicts-example"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Bringing a file up to date| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| Up ]]|</td>
<td valign="middle" align="left">|[[#Informing others about commits| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Conflicts-example-1"></div>
=== Conflicts example ===
<div id="index-Merge_002c-an-example"></div>
<div id="index-Example-of-merge"></div>
<div id="index-driver_002ec-_0028merge-example_0029"></div>

Suppose revision 1.4 of &lsquo;<tt>driver.c</tt>&rsquo; contains this:

<div class="example" style="margin-left: 3.2em">
 #include &lt;stdio.h&gt;
 
 void main()
 <nowiki>{</nowiki>
     parse();
     if (nerr == 0)
         gencode();
     else
         fprintf(stderr, &quot;No code generated.\n&quot;);
     exit(nerr == 0 ? 0 : 1);
 <nowiki>}</nowiki>
</div>

Revision 1.6 of &lsquo;<tt>driver.c</tt>&rsquo; contains this:

<div class="example" style="margin-left: 3.2em">
 #include &lt;stdio.h&gt;
 
 int main(int argc,
          char **argv)
 <nowiki>{</nowiki>
     parse();
     if (argc != 1)
     <nowiki>{</nowiki>
         fprintf(stderr, &quot;tc: No args expected.\n&quot;);
         exit(1);
     <nowiki>}</nowiki>
     if (nerr == 0)
         gencode();
     else
         fprintf(stderr, &quot;No code generated.\n&quot;);
     exit(!!nerr);
 <nowiki>}</nowiki>
</div>

Your working copy of &lsquo;<tt>driver.c</tt>&rsquo;, based on revision
1.4, contains this before you run &lsquo;<code>cvs update</code>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 #include &lt;stdlib.h&gt;
 #include &lt;stdio.h&gt;
 
 void main()
 <nowiki>{</nowiki>
     init_scanner();
     parse();
     if (nerr == 0)
         gencode();
     else
         fprintf(stderr, &quot;No code generated.\n&quot;);
     exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
 <nowiki>}</nowiki>
</div>

You run &lsquo;<code>cvs update</code>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 $ cvs update driver.c
 RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v
 retrieving revision 1.4
 retrieving revision 1.6
 Merging differences between 1.4 and 1.6 into driver.c
 rcsmerge warning: overlaps during merge
 cvs update: conflicts found in driver.c
 C driver.c
</div>

<div id="index-Conflicts-_0028merge-example_0029"></div>
<small>CVS</small> tells you that there were some conflicts.
Your original working file is saved unmodified in
&lsquo;<tt>.#driver.c.1.4</tt>&rsquo;.  The new version of
&lsquo;<tt>driver.c</tt>&rsquo; contains this:

<div class="example" style="margin-left: 3.2em">
 #include &lt;stdlib.h&gt;
 #include &lt;stdio.h&gt;
 
 int main(int argc,
          char **argv)
 <nowiki>{</nowiki>
     init_scanner();
     parse();
     if (argc != 1)
     <nowiki>{</nowiki>
         fprintf(stderr, &quot;tc: No args expected.\n&quot;);
         exit(1);
     <nowiki>}</nowiki>
     if (nerr == 0)
         gencode();
     else
         fprintf(stderr, &quot;No code generated.\n&quot;);
 &lt;&lt;&lt;&lt;&lt;&lt;&lt; driver.c
     exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
 =======
     exit(!!nerr);
 &gt;&gt;&gt;&gt;&gt;&gt;&gt; 1.6
 <nowiki>}</nowiki>
</div>

<div id="index-Markers_002c-conflict"></div>
<div id="index-Conflict-markers"></div>
<div id="index-_003c_003c_003c_003c_003c_003c_003c"></div>
<div id="index-_003e_003e_003e_003e_003e_003e_003e"></div>
<div id="index-_003d_003d_003d_003d_003d_003d_003d"></div>

Note how all non-overlapping modifications are incorporated in your working
copy, and that the overlapping section is clearly marked with
&lsquo;<code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</code>&rsquo;, &lsquo;<code>=======</code>&rsquo; and &lsquo;<code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code>&rsquo;.

<div id="index-Resolving-a-conflict"></div>
<div id="index-Conflict-resolution"></div>
You resolve the conflict by editing the file, removing the markers and
the erroneous line.  Suppose you end up with this file:
<div class="example" style="margin-left: 3.2em">
 #include &lt;stdlib.h&gt;
 #include &lt;stdio.h&gt;
 
 int main(int argc,
          char **argv)
 <nowiki>{</nowiki>
     init_scanner();
     parse();
     if (argc != 1)
     <nowiki>{</nowiki>
         fprintf(stderr, &quot;tc: No args expected.\n&quot;);
         exit(1);
     <nowiki>}</nowiki>
     if (nerr == 0)
         gencode();
     else
         fprintf(stderr, &quot;No code generated.\n&quot;);
     exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
 <nowiki>}</nowiki>
</div>

You can now go ahead and commit this as revision 1.7.

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -m &quot;Initialize scanner. Use symbolic exit values.&quot; driver.c
 Checking in driver.c;
 /usr/local/cvsroot/yoyodyne/tc/driver.c,v  &lt;--  driver.c
 new revision: 1.7; previous revision: 1.6
 done
</div>

For your protection, <small>CVS</small> will refuse to check in a
file if a conflict occurred and you have not resolved
the conflict.  Currently to resolve a conflict, you
must change the timestamp on the file.  In previous
versions of <small>CVS</small>, you also needed to
insure that the file contains no conflict markers.
Because
your file may legitimately contain conflict markers (that
is, occurrences of &lsquo;<code>&gt;&gt;&gt;&gt;&gt;&gt;&gt; </code>&rsquo; at the start of a
line that don&rsquo;t mark a conflict), the current
version of <small>CVS</small> will print a warning and proceed to
check in the file.

<div id="index-emerge"></div>
If you use release 1.04 or later of pcl-cvs (a <small>GNU</small>
Emacs front-end for <small>CVS</small>) you can use an Emacs
package called emerge to help you resolve conflicts.
See the documentation for pcl-cvs.


----

<div id="Informing-others"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Conflicts example| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| Up ]]|</td>
<td valign="middle" align="left">|[[#Several developers simultaneously attempting to run CVS| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Informing-others-about-commits"></div>
=== Informing others about commits ===
<div id="index-Informing-others"></div>
<div id="index-Spreading-information"></div>
<div id="index-Mail_002c-automatic-mail-on-commit"></div>

It is often useful to inform others when you commit a
new revision of a file.  The &lsquo;<code>-i</code>&rsquo; option of the
&lsquo;<tt>modules</tt>&rsquo; file, or the &lsquo;<tt>loginfo</tt>&rsquo; file, can be
used to automate this process.  See section [[#The modules file|The modules file]].
See section [[#Loginfo|Loginfo]].  You can use these features of <small>CVS</small>
to, for instance, instruct <small>CVS</small> to mail a
message to all developers, or post a message to a local
newsgroup.


----

<div id="Concurrency"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Informing others about commits| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| Up ]]|</td>
<td valign="middle" align="left">|[[#Mechanisms to track who is editing files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Several-developers-simultaneously-attempting-to-run-CVS"></div>
=== Several developers simultaneously attempting to run CVS ===

<div id="index-Locks_002c-cvs_002c-introduction"></div>
If several developers try to run <small>CVS</small> at the same
time, one may get the following message:

<div class="example" style="margin-left: 3.2em">
 <nowiki>[</nowiki>11:43:23<nowiki>]</nowiki> waiting for bach's lock in /usr/local/cvsroot/foo
</div>

<div id="index-_0023cvs_002erfl_002c-removing"></div>
<div id="index-_0023cvs_002ewfl_002c-removing"></div>
<div id="index-_0023cvs_002elock_002c-removing"></div>
<small>CVS</small> will try again every 30 seconds, and either
continue with the operation or print the message again,
if it still needs to wait.  If a lock seems to stick
around for an undue amount of time, find the person
holding the lock and ask them about the cvs command
they are running.  If they aren&rsquo;t running a cvs
command, look in the repository directory mentioned in
the message and remove files which they own whose names
start with &lsquo;<tt>#cvs.rfl</tt>&rsquo;,
&lsquo;<tt>#cvs.wfl</tt>&rsquo;, or &lsquo;<tt>#cvs.lock</tt>&rsquo;.

Note that these locks are to protect <small>CVS</small>&rsquo;s
internal data structures and have no relationship to
the word <em>lock</em> in the sense used by
<small>RCS</small>&mdash;which refers to reserved checkouts
(see section [[#Multiple developers|Multiple developers]]).

Any number of people can be reading from a given
repository at a time; only when someone is writing do
the locks prevent other people from reading or writing.

<div id="index-Atomic-transactions_002c-lack-of"></div>
<div id="index-Transactions_002c-atomic_002c-lack-of"></div>
One might hope for the following property:

<blockquote>
If someone commits some changes in one cvs command,
then an update by someone else will either get all the
changes, or none of them.
</blockquote>

but <small>CVS</small> does ''not'' have this property.  For
example, given the files

<div class="example" style="margin-left: 3.2em">
 a/one.c
 a/two.c
 b/three.c
 b/four.c
</div>

if someone runs

<div class="example" style="margin-left: 3.2em">
 cvs ci a/two.c b/three.c
</div>

and someone else runs <code>cvs update</code> at the same
time, the person running <code>update</code> might get only
the change to &lsquo;<tt>b/three.c</tt>&rsquo; and not the change to
&lsquo;<tt>a/two.c</tt>&rsquo;.


----

<div id="Watches"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Several developers simultaneously attempting to run CVS| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| Up ]]|</td>
<td valign="middle" align="left">|[[#Telling CVS to watch certain files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Mechanisms-to-track-who-is-editing-files"></div>
=== Mechanisms to track who is editing files ===
<div id="index-Watches"></div>

For many groups, use of <small>CVS</small> in its default mode is
perfectly satisfactory.  Users may sometimes go to
check in a modification only to find that another
modification has intervened, but they deal with it and
proceed with their check in.  Other groups prefer to be
able to know who is editing what files, so that if two
people try to edit the same file they can choose to
talk about who is doing what when rather than be
surprised at check in time.  The features in this
section allow such coordination, while retaining the
ability of two developers to edit the same file at the
same time.

For maximum benefit developers should use <code>cvs
edit</code> (not <code>chmod</code>) to make files read-write to
edit them, and <code>cvs release</code> (not <code>rm</code>) to
discard a working directory which is no longer in use,
but <small>CVS</small> is not able to enforce this behavior.


 [[#Telling CVS to watch certain files|&bull; Setting a watch]]::             Telling CVS to watch certain files
 [[#Telling CVS to notify you|&bull; Getting Notified]]::            Telling CVS to notify you
 [[#How to edit a file which is being watched|&bull; Editing files]]::               How to edit a file which is being watched
 [[#Information about who is watching and editing|&bull; Watch information]]::           Information about who is watching and editing
 [[#Using watches with old versions of CVS|&bull; Watches Compatibility]]::       Watches interact poorly with CVS 1.6 or earlier


----

<div id="Setting-a-watch"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Mechanisms to track who is editing files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Mechanisms to track who is editing files| Up ]]|</td>
<td valign="middle" align="left">|[[#Telling CVS to notify you| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Telling-CVS-to-watch-certain-files"></div>
==== Telling CVS to watch certain files ====

To enable the watch features, you first specify that
certain files are to be watched.

<div id="index-watch-on-_0028subcommand_0029"></div>
;<div id="index-cvs-watch-on"></div>Command<nowiki>:</nowiki> <strong>cvs watch on</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

<div id="index-Read_002donly-files_002c-and-watches"></div>
: Specify that developers should run <code>cvs edit</code> before editing <var>files</var>.  <small>CVS</small> will create working copies of <var>files</var> read-only, to remind developers to run the <code>cvs edit</code> command before working on them.

: If <var>files</var> includes the name of a directory, <small>CVS</small> arranges to watch all files added to the corresponding repository directory, and sets a default for files added in the future; this allows the user to set notification policies on a per-directory basis.  The contents of the directory are processed recursively, unless the <code>-l</code> option is given. The <code>-R</code> option can be used to force recursion if the <code>-l</code> option is set in &lsquo;<tt>~/.cvsrc</tt>&rsquo; (see section [[#Default options and the ~/.cvsrc file|Default options and the ~/.cvsrc file]]).

: If <var>files</var> is omitted, it defaults to the current directory.

<div id="index-watch-off-_0028subcommand_0029"></div>

;<div id="index-cvs-watch-off"></div>Command<nowiki>:</nowiki> <strong>cvs watch off</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

: Do not create <var>files</var> read-only on checkout; thus, developers will not be reminded to use <code>cvs edit</code> and <code>cvs unedit</code>.

: The <var>files</var> and options are processed as for <code>cvs watch on</code>.



----

<div id="Getting-Notified"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Telling CVS to watch certain files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Mechanisms to track who is editing files| Up ]]|</td>
<td valign="middle" align="left">|[[#How to edit a file which is being watched| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Telling-CVS-to-notify-you"></div>
==== Telling CVS to notify you ====

You can tell <small>CVS</small> that you want to receive
notifications about various actions taken on a file.
You can do this without using <code>cvs watch on</code> for
the file, but generally you will want to use <code>cvs
watch on</code>, to remind developers to use the <code>cvs edit</code>
command.

<div id="index-watch-add-_0028subcommand_0029"></div>
;<div id="index-cvs-watch-add"></div>Command<nowiki>:</nowiki> <strong>cvs watch add</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><code>-a</code> <var>action</var><nowiki>]</nowiki>&hellip; <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

: Add the current user to the list of people to receive notification of work done on <var>files</var>.

: The <code>-a</code> option specifies what kinds of events <small>CVS</small> should notify the user about.  <var>action</var> is one of the following:

:;<code>edit</code>
:: Another user has applied the <code>cvs edit</code> command (described below) to a watched file.

:;<code>commit</code>
:: Another user has committed changes to one of the named <var>files</var>.

:;<code>unedit</code>
:: Another user has abandoned editing a file (other than by committing changes). They can do this in several ways, by:


::* applying the <code>cvs unedit</code> command (described below) to the file


::* applying the <code>cvs release</code> command (see section [[#release&mdash;Indicate that a Module is no longer in use|release&mdash;Indicate that a Module is no longer in use]]) to the file&rsquo;s parent directory (or recursively to a directory more than one level up)


::* deleting the file and allowing <code>cvs update</code> to recreate it


:;<code>all</code>
:: All of the above.

:;<code>none</code>
:: None of the above.  (This is useful with <code>cvs edit</code>, described below.)


: The <code>-a</code> option may appear more than once, or not at all.  If omitted, the action defaults to <code>all</code>.

: The <var>files</var> and options are processed as for <code>cvs watch on</code>.



<div id="index-watch-remove-_0028subcommand_0029"></div>
;<div id="index-cvs-watch-remove"></div>Command<nowiki>:</nowiki> <strong>cvs watch remove</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><code>-a</code> <var>action</var><nowiki>]</nowiki>&hellip; <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

: Remove a notification request established using <code>cvs watch add</code>; the arguments are the same.  If the <code>-a</code> option is present, only watches for the specified actions are removed.


<div id="index-notify-_0028admin-file_0029"></div>
When the conditions exist for notification, <small>CVS</small>
calls the &lsquo;<tt>notify</tt>&rsquo; administrative file.  Edit
&lsquo;<tt>notify</tt>&rsquo; as one edits the other administrative
files (see section [[#The administrative files|The administrative files]]).  This
file follows the usual conventions for administrative
files (see section [[#The common syntax|The common syntax]]), where each line is a regular
expression followed by a command to execute.  The
command should contain a single occurrence of &lsquo;<code>%s</code>&rsquo;
which will be replaced by the user to notify; the rest
of the information regarding the notification will be
supplied to the command on standard input.  The
standard thing to put in the <code>notify</code> file is the
single line:

<div class="example" style="margin-left: 3.2em">
 ALL mail %s -s &quot;CVS notification&quot;
</div>

This causes users to be notified by electronic mail.

<div id="index-users-_0028admin-file_0029"></div>
Note that if you set this up in the straightforward
way, users receive notifications on the server machine.
One could of course write a &lsquo;<tt>notify</tt>&rsquo; script which
directed notifications elsewhere, but to make this
easy, <small>CVS</small> allows you to associate a notification
address for each user.  To do so create a file
&lsquo;<tt>users</tt>&rsquo; in &lsquo;<tt>CVSROOT</tt>&rsquo; with a line for each
user in the format <var>user</var>:<var>value</var>.  Then
instead of passing the name of the user to be notified
to &lsquo;<tt>notify</tt>&rsquo;, <small>CVS</small> will pass the <var>value</var>
(normally an email address on some other machine).

<small>CVS</small> does not notify you for your own changes.
Currently this check is done based on whether the user
name of the person taking the action which triggers
notification matches the user name of the person
getting notification.  In fact, in general, the watches
features only track one edit by each user.  It probably
would be more useful if watches tracked each working
directory separately, so this behavior might be worth
changing.


----

<div id="Editing-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Telling CVS to notify you| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Mechanisms to track who is editing files| Up ]]|</td>
<td valign="middle" align="left">|[[#Information about who is watching and editing| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-to-edit-a-file-which-is-being-watched"></div>
==== How to edit a file which is being watched ====

<div id="index-Checkout_002c-as-term-for-getting-ready-to-edit"></div>
Since a file which is being watched is checked out
read-only, you cannot simply edit it.  To make it
read-write, and inform others that you are planning to
edit it, use the <code>cvs edit</code> command.  Some systems
call this a <em>checkout</em>, but <small>CVS</small> uses that term
for obtaining a copy of the sources (see section [[#Getting the source|Getting the source]]), an operation which those systems call a
<em>get</em> or a <em>fetch</em>.

<div id="index-edit-_0028subcommand_0029"></div>
;<div id="index-cvs-edit"></div>Command<nowiki>:</nowiki> <strong>cvs edit</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><code>-a</code> <var>action</var><nowiki>]</nowiki>&hellip; <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

: Prepare to edit the working files <var>files</var>.  <small>CVS</small> makes the <var>files</var> read-write, and notifies users who have requested <code>edit</code> notification for any of <var>files</var>.

: The <code>cvs edit</code> command accepts the same options as the <code>cvs watch add</code> command, and establishes a temporary watch for the user on <var>files</var>; <small>CVS</small> will remove the watch when <var>files</var> are <code>unedit</code>ed or <code>commit</code>ted.  If the user does not wish to receive notifications, she should specify <code>-a none</code>.

: The <var>files</var> and the options are processed as for the <code>cvs watch</code> commands.



Normally when you are done with a set of changes, you
use the <code>cvs commit</code> command, which checks in your
changes and returns the watched files to their usual
read-only state.  But if you instead decide to abandon
your changes, or not to make any changes, you can use
the <code>cvs unedit</code> command.

<div id="index-unedit-_0028subcommand_0029"></div>
<div id="index-Abandoning-work"></div>
<div id="index-Reverting-to-repository-version"></div>
;<div id="index-cvs-unedit"></div>Command<nowiki>:</nowiki> <strong>cvs unedit</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

: Abandon work on the working files <var>files</var>, and revert them to the repository versions on which they are based.  <small>CVS</small> makes those <var>files</var> read-only for which users have requested notification using <code>cvs watch on</code>.  <small>CVS</small> notifies users who have requested <code>unedit</code> notification for any of <var>files</var>.

: The <var>files</var> and options are processed as for the <code>cvs watch</code> commands.

: If watches are not in use, the <code>unedit</code> command probably does not work, and the way to revert to the repository version is with the command <code>cvs update -C file</code> (see section [[#update&mdash;Bring work tree in sync with repository|update&mdash;Bring work tree in sync with repository]]). The meaning is not precisely the same; the latter may also bring in some changes which have been made in the repository since the last time you updated.

When using client/server <small>CVS</small>, you can use the
<code>cvs edit</code> and <code>cvs unedit</code> commands even if
<small>CVS</small> is unable to successfully communicate with the
server; the notifications will be sent upon the next
successful <small>CVS</small> command.


----

<div id="Watch-information"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How to edit a file which is being watched| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Mechanisms to track who is editing files| Up ]]|</td>
<td valign="middle" align="left">|[[#Using watches with old versions of CVS| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Information-about-who-is-watching-and-editing"></div>
==== Information about who is watching and editing ====

<div id="index-watchers-_0028subcommand_0029"></div>
;<div id="index-cvs-watchers"></div>Command<nowiki>:</nowiki> <strong>cvs watchers</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

: List the users currently watching changes to <var>files</var>.  The report includes the files being watched, and the mail address of each watcher.

: The <var>files</var> and options are processed as for the <code>cvs watch</code> commands.



<div id="index-editors-_0028subcommand_0029"></div>
;<div id="index-cvs-editors"></div>Command<nowiki>:</nowiki> <strong>cvs editors</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>

: List the users currently working on <var>files</var>.  The report includes the mail address of each user, the time when the user began working with the file, and the host and path of the working directory containing the file.

: The <var>files</var> and options are processed as for the <code>cvs watch</code> commands.



----

<div id="Watches-Compatibility"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Information about who is watching and editing| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Mechanisms to track who is editing files| Up ]]|</td>
<td valign="middle" align="left">|[[#Choosing between reserved or unreserved checkouts| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Using-watches-with-old-versions-of-CVS"></div>
==== Using watches with old versions of CVS ====

<div id="index-CVS-1_002e6_002c-and-watches"></div>
If you use the watch features on a repository, it
creates &lsquo;<tt>CVS</tt>&rsquo; directories in the repository and
stores the information about watches in that directory.
If you attempt to use <small>CVS</small> 1.6 or earlier with the
repository, you get an error message such as the
following (all on one line):

<div class="example" style="margin-left: 3.2em">
 cvs update: cannot open CVS/Entries for reading:
 No such file or directory
</div>

and your operation will likely be aborted.  To use the
watch features, you must upgrade all copies of <small>CVS</small>
which use that repository in local or server mode.  If
you cannot upgrade, use the <code>watch off</code> and
<code>watch remove</code> commands to remove all watches, and
that will restore the repository to a state which
<small>CVS</small> 1.6 can cope with.


----

<div id="Choosing-a-model"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Using watches with old versions of CVS| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple developers| Up ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Choosing-between-reserved-or-unreserved-checkouts"></div>
=== Choosing between reserved or unreserved checkouts ===
<div id="index-Choosing_002c-reserved-or-unreserved-checkouts"></div>

Reserved and unreserved checkouts each have pros and
cons.  Let it be said that a lot of this is a matter of
opinion or what works given different groups&rsquo; working
styles, but here is a brief description of some of the
issues.  There are many ways to organize a team of
developers.  <small>CVS</small> does not try to enforce a certain
organization.  It is a tool that can be used in several
ways.

Reserved checkouts can be very counter-productive.  If
two persons want to edit different parts of a file,
there may be no reason to prevent either of them from
doing so.  Also, it is common for someone to take out a
lock on a file, because they are planning to edit it,
but then forget to release the lock.

People, especially people who are familiar with
reserved checkouts, often wonder how often conflicts
occur if unreserved checkouts are used, and how
difficult they are to resolve.  The experience with
many groups is that they occur rarely and usually are
relatively straightforward to resolve.

The rarity of serious conflicts may be surprising, until one realizes
that they occur only when two developers disagree on the proper design
for a given section of code; such a disagreement suggests that the
team has not been communicating properly in the first place.  In order
to collaborate under ''any'' source management regimen, developers
must agree on the general design of the system; given this agreement,
overlapping changes are usually straightforward to merge.

In some cases unreserved checkouts are clearly
inappropriate.  If no merge tool exists for the kind of
file you are managing (for example word processor files
or files edited by Computer Aided Design programs), and
it is not desirable to change to a program which uses a
mergeable data format, then resolving conflicts is
going to be unpleasant enough that you generally will
be better off to simply avoid the conflicts instead, by
using reserved checkouts.

The watches features described above in [[#Mechanisms to track who is editing files|Mechanisms to track who is editing files]]
can be considered to be an intermediate model between
reserved checkouts and unreserved checkouts.  When you
go to edit a file, it is possible to find out who else
is editing it.  And rather than having the system
simply forbid both people editing the file, it can tell
you what the situation is and let you figure out
whether it is a problem in that particular case or not.
Therefore, for some groups it can be considered the
best of both the reserved checkout and unreserved
checkout worlds.


----

<div id="Revision-management"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Multiple developers| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Choosing between reserved or unreserved checkouts| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#When to commit?| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Revision-management-1"></div>
== Revision management ==
<div id="index-Revision-management"></div>


If you have read this far, you probably have a pretty
good grasp on what <small>CVS</small> can do for you.  This
chapter talks a little about things that you still have
to decide.

If you are doing development on your own using <small>CVS</small>
you could probably skip this chapter.  The questions
this chapter takes up become more important when more
than one person is working in a repository.

 [[#When to commit?|&bull; When to commit]]::              Some discussion on the subject


----

<div id="When-to-commit"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revision management| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Revision management| Up ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="When-to-commit_003f"></div>
=== When to commit? ===
<div id="index-When-to-commit"></div>
<div id="index-Committing_002c-when-to"></div>
<div id="index-Policy"></div>

Your group should decide which policy to use regarding
commits.  Several policies are possible, and as your
experience with <small>CVS</small> grows you will probably find
out what works for you.

If you commit files too quickly you might commit files
that do not even compile.  If your partner updates his
working sources to include your buggy file, he will be
unable to compile the code.  On the other hand, other
persons will not be able to benefit from the
improvements you make to the code if you commit very
seldom, and conflicts will probably be more common.

It is common to only commit files after making sure
that they can be compiled.  Some sites require that the
files pass a test suite.  Policies like this can be
enforced using the commitinfo file
(see section [[#Commitinfo|Commitinfo]]), but you should think twice before
you enforce such a convention.  By making the
development environment too controlled it might become
too regimented and thus counter-productive to the real
goal, which is to get software written.


----

<div id="Keyword-substitution"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Revision management| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#When to commit?| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Keyword List| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Keyword-substitution-1"></div>
== Keyword substitution ==
<div id="index-Keyword-substitution"></div>
<div id="index-Keyword-expansion"></div>
<div id="index-Identifying-files"></div>


As long as you edit source files inside a working
directory you can always find out the state of
your files via &lsquo;<code>cvs status</code>&rsquo; and &lsquo;<code>cvs log</code>&rsquo;.
But as soon as you export the files from your
development environment it becomes harder to identify
which revisions they are.

<small>CVS</small> can use a mechanism known as <em>keyword
substitution</em> (or <em>keyword expansion</em>) to help
identifying the files.  Embedded strings of the form
<code>$<var>keyword</var>$</code> and
<code>$<var>keyword</var>:&hellip;$</code> in a file are replaced
with strings of the form
<code>$<var>keyword</var>:<var>value</var>$</code> whenever you obtain
a new revision of the file.

 [[#Keyword List|&bull; Keyword list]]::                   Keywords
 [[#Using keywords|&bull; Using keywords]]::                 Using keywords
 [[#Avoiding substitution|&bull; Avoiding substitution]]::          Avoiding substitution
 [[#Substitution modes|&bull; Substitution modes]]::             Substitution modes
 [[#Configuring Keyord Expansion|&bull; Configuring keyword expansion]]::  Configuring keyword expansion
 [[#Problems with the $ Log$ keyword.|&bull; Log keyword]]::                    Problems with the $<i></i>Log$ keyword.


----

<div id="Keyword-list"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Keyword substitution| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| Up ]]|</td>
<td valign="middle" align="left">|[[#Using keywords| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Keyword-List"></div>
=== Keyword List ===
<div id="index-Keyword-List"></div>


This is a list of the keywords:

<div id="index-Author-keyword"></div>
;<code>$<i></i>Author$</code>
: The login name of the user who checked in the revision.

<div id="index-CVSHeader-keyword"></div>
;<code>$<i></i>CVSHeader</code>
: A standard header (similar to $<i></i>Header$, but with the CVS root stripped off). It contains the relative pathname of the <small>RCS</small> file to the CVS root, the revision number, the date (UTC), the author, the state, and the locker (if locked). Files will normally never be locked when you use <small>CVS</small>.

: Note that this keyword has only been recently introduced to <small>CVS</small> and may cause problems with existing installations if $<i></i>CVSHeader$ is already in the files for a different purpose. This keyword may be excluded using the <code>KeywordExpansion=eCVSHeader</code> in the &lsquo;<tt>CVSROOT/config</tt>&rsquo; file.  See [[#Configuring Keyord Expansion|Configuring Keyord Expansion]] for more details.

<div id="index-Date-keyword"></div>
;<code>$<i></i>Date$</code>
: The date and time (UTC) the revision was checked in.

<div id="index-Header-keyword"></div>
;<code>$<i></i>Header$</code>
: A standard header containing the full pathname of the <small>RCS</small> file, the revision number, the date (UTC), the author, the state, and the locker (if locked).  Files will normally never be locked when you use <small>CVS</small>.

<div id="index-Id-keyword"></div>
;<code>$<i></i>Id$</code>
: Same as <code>$<i></i>Header$</code>, except that the <small>RCS</small> filename is without a path.

<div id="index-Name-keyword"></div>
;<code>$<i></i>Name$</code>
: Tag name used to check out this file.  The keyword is expanded only if one checks out with an explicit tag name.  For example, when running the command <code>cvs co -r first</code>, the keyword expands to &lsquo;<code>Name: first</code>&rsquo;.

<div id="index-Locker-keyword"></div>
;<code>$<i></i>Locker$</code>
: The login name of the user who locked the revision (empty if not locked, which is the normal case unless <code>cvs admin -l</code> is in use).

<div id="index-Log-keyword"></div>
;<code>$<i></i>Log$</code>
: The log message supplied during commit, preceded by a header containing the <small>RCS</small> filename, the revision number, the author, and the date (UTC).  Existing log messages are ''not'' replaced.  Instead, the new log message is inserted after <code>$<i></i>Log:&hellip;$</code>. Each new line is prefixed with the same string which precedes the <code>$Log</code> keyword.  For example, if the file contains:

<div class="example" style="margin-left: 3.2em">
   /* Here is what people have been up to:
    *
    * $<i></i>Log: frob.c,v $
    * Revision 1.1  1997/01/03 14:23:51  joe
    * Add the superfrobnicate option
    *
    */
</div>

: then additional lines which are added when expanding the <code>$Log</code> keyword will be preceded by &lsquo;<code>   * </code>&rsquo;. Unlike previous versions of <small>CVS</small> and <small>RCS</small>, the <em>comment leader</em> from the <small>RCS</small> file is not used. The <code>$Log</code> keyword is useful for accumulating a complete change log in a source file, but for several reasons it can be problematic. See section [[#Problems with the $ Log$ keyword.|Problems with the $ <i></i>Log$ keyword.]].

<div id="index-RCSfile-keyword"></div>
;<code>$<i></i>RCSfile$</code>
: The name of the RCS file without a path.

<div id="index-Revision-keyword"></div>
;<code>$<i></i>Revision$</code>
: The revision number assigned to the revision.

<div id="index-Source-keyword"></div>
;<code>$<i></i>Source$</code>
: The full pathname of the RCS file.

<div id="index-State-keyword"></div>
;<code>$<i></i>State$</code>
: The state assigned to the revision.  States can be assigned with <code>cvs admin -s</code>&mdash;see [[#admin options|admin options]].

<div id="index-Local-keyword"></div>
;<code>Local keyword</code>
: The <code>LocalKeyword</code> option in the &lsquo;<tt>CVSROOT/config</tt>&rsquo; file may be used to specify a local keyword which is to be used as an alias for one of the other keywords. For example, if the &lsquo;<tt>CVSROOT/config</tt>&rsquo; file contains a line with <code>LocalKeyword=MYBSD=CVSHeader</code>, then a file with the local keyword $<i></i>MYBSD$ will be expanded as if it were a $<i></i>CVSHeader$ keyword. If the src/frob.c file contained this keyword, it might look something like this:

<div class="example" style="margin-left: 3.2em">
   /*
    * $<i></i>MYBSD: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $ 
    */
</div>

: Many repositories make use of a such a &ldquo;local keyword&rdquo; feature. An old patch to <small>CVS</small> provided the <code>LocalKeyword</code> feature using a <code>tag=</code> option and called this the &ldquo;custom tag&rdquo; or &ldquo;local tag&rdquo; feature. It was used in conjunction with the what they called the <code>tagexpand=</code> option. In <small>CVS</small> this other option is known as the <code>KeywordExpand</code> option.  See [[#Configuring Keyord Expansion|Configuring Keyord Expansion]] for more details.

: Examples from popular projects include: $<i></i>FreeBSD$, $<i></i>NetBSD$, $<i></i>OpenBSD$, $<i></i>XFree86$, $<i></i>Xorg$.

: The advantage of this is that you can include your local version information in a file using this local keyword without disrupting the upstream version information (which may be a different local keyword or a standard keyword). Allowing bug reports and the like to more properly identify the source of the original bug to the third-party and reducing the number of conflicts that arise during an import of a new version.

: All keyword expansion except the local keyword may be disabled using the <code>KeywordExpansion</code> option in the &lsquo;<tt>CVSROOT/config</tt>&rsquo; file&mdash;see  [[#Configuring Keyord Expansion|Configuring Keyord Expansion]] for more details.



----

<div id="Using-keywords"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Keyword substitution| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword List| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| Up ]]|</td>
<td valign="middle" align="left">|[[#Avoiding substitution| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Using-keywords-1"></div>
=== Using keywords ===

To include a keyword string you simply include the
relevant text string, such as <code>$<i></i>Id$</code>, inside the
file, and commit the file.  <small>CVS</small> will automatically
expand the string as part of the commit operation.

It is common to embed the <code>$<i></i>Id$</code> string in
the source files so that it gets passed through to
generated files.  For example, if you are managing
computer program source code, you might include a
variable which is initialized to contain that string.
Or some C compilers may provide a <code>#pragma ident</code>
directive.  Or a document management system might
provide a way to pass a string through to generated
files.


<div id="index-Ident-_0028shell-command_0029"></div>
The <code>ident</code> command (which is part of the <small>RCS</small>
package) can be used to extract keywords and their
values from a file.  This can be handy for text files,
but it is even more useful for extracting keywords from
binary files.

<div class="example" style="margin-left: 3.2em">
 $ ident samp.c
 samp.c:
      $<i></i>Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
 $ gcc samp.c
 $ ident a.out
 a.out:
      $<i></i>Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
</div>

<div id="index-What-_0028shell-command_0029"></div>
S<small>CCS</small> is another popular revision control system.
It has a command, <code>what</code>, which is very similar to
<code>ident</code> and used for the same purpose.  Many sites
without <small>RCS</small> have <small>SCCS</small>.  Since <code>what</code>
looks for the character sequence <code>@(#)</code> it is
easy to include keywords that are detected by either
command.  Simply prefix the keyword with the
magic <small>SCCS</small> phrase, like this:

<div class="example" style="margin-left: 3.2em">
 static char *id=&quot;@(#) $<i></i>Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $&quot;;
</div>


----

<div id="Avoiding-substitution"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Keyword substitution| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Using keywords| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| Up ]]|</td>
<td valign="middle" align="left">|[[#Substitution modes| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Avoiding-substitution-1"></div>
=== Avoiding substitution ===

Keyword substitution has its disadvantages.  Sometimes
you might want the literal text string
&lsquo;<code>$<i></i>Author$</code>&rsquo; to appear inside a file without
<small>CVS</small> interpreting it as a keyword and expanding it
into something like &lsquo;<code>$<i></i>Author: ceder $</code>&rsquo;.

There is unfortunately no way to selectively turn off
keyword substitution.  You can use &lsquo;<code>-ko</code>&rsquo;
(see section [[#Substitution modes|Substitution modes]]) to turn off keyword
substitution entirely.

In many cases you can avoid using keywords in
the source, even though they appear in the final
product.  For example, the source for this manual
contains &lsquo;<code>$@asis<nowiki>{</nowiki><nowiki>}</nowiki>Author$</code>&rsquo; whenever the text
&lsquo;<code>$<i></i>Author$</code>&rsquo; should appear.  In <code>nroff</code>
and <code>troff</code> you can embed the null-character
<code>\&amp;</code> inside the keyword for a similar effect.

It is also possible to specify an explicit list of
keywords to include or exclude using the
<code>KeywordExpand</code> option in the
&lsquo;<tt>CVSROOT/config</tt>&rsquo; file&ndash;see [[#Configuring Keyord Expansion|Configuring Keyord Expansion]]
for more details. This feature is intended primarily
for use with the <code>LocalKeyword</code> option&ndash;see
[[#Keyword List|Keyword List]].


----

<div id="Substitution-modes"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Keyword substitution| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Avoiding substitution| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| Up ]]|</td>
<td valign="middle" align="left">|[[#Configuring Keyord Expansion| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Substitution-modes-1"></div>
=== Substitution modes ===
<div id="index-Keyword-substitution_002c-changing-modes"></div>
<div id="index-_002dk-_0028keyword-substitution_0029"></div>
<div id="index-Kflag"></div>

Each file has a stored default substitution mode, and
each working directory copy of a file also has a
substitution mode.  The former is set by the &lsquo;<code>-k</code>&rsquo;
option to <code>cvs add</code> and <code>cvs admin</code>; the
latter is set by the &lsquo;<code>-k</code>&rsquo; or &lsquo;<code>-A</code>&rsquo; options to <code>cvs
checkout</code> or <code>cvs update</code>.  <code>cvs diff</code> also
has a &lsquo;<code>-k</code>&rsquo; option.  For some examples,
see [[#Handling binary files|Handling binary files]], and [[#Merging and keywords|Merging and keywords]].

The modes available are:

;&lsquo;<code>-kkv</code>&rsquo;
: Generate keyword strings using the default form, e.g. <code>$<i></i>Revision: 5.7 $</code> for the <code>Revision</code> keyword.

;&lsquo;<code>-kkvl</code>&rsquo;
: Like &lsquo;<code>-kkv</code>&rsquo;, except that a locker&rsquo;s name is always inserted if the given revision is currently locked. The locker&rsquo;s name is only relevant if <code>cvs admin -l</code> is in use.

;&lsquo;<code>-kk</code>&rsquo;
: Generate only keyword names in keyword strings; omit their values.  For example, for the <code>Revision</code> keyword, generate the string <code>$<i></i>Revision$</code> instead of <code>$<i></i>Revision: 5.7 $</code>.  This option is useful to ignore differences due to keyword substitution when comparing different revisions of a file (see section [[#Merging and keywords|Merging and keywords]]).

;&lsquo;<code>-ko</code>&rsquo;
: Generate the old keyword string, present in the working file just before it was checked in.  For example, for the <code>Revision</code> keyword, generate the string <code>$<i></i>Revision: 1.1 $</code> instead of <code>$<i></i>Revision: 5.7 $</code> if that is how the string appeared when the file was checked in.

;&lsquo;<code>-kb</code>&rsquo;
: Like &lsquo;<code>-ko</code>&rsquo;, but also inhibit conversion of line endings between the canonical form in which they are stored in the repository (linefeed only), and the form appropriate to the operating system in use on the client.  For systems, like unix, which use linefeed only to terminate lines, this is very similar to &lsquo;<code>-ko</code>&rsquo;.  For more information on binary files, see [[#Handling binary files|Handling binary files]].  In <small>CVS</small> version 1.12.2 and later &lsquo;<code>-kb</code>&rsquo;, as set by <code>cvs add</code>, <code>cvs admin</code>, or <code>cvs import</code> may not be overridden by a &lsquo;<code>-k</code>&rsquo; option specified on the command line.

;&lsquo;<code>-kv</code>&rsquo;
: Generate only keyword values for keyword strings.  For example, for the <code>Revision</code> keyword, generate the string <code>5.7</code> instead of <code>$<i></i>Revision: 5.7 $</code>. This can help generate files in programming languages where it is hard to strip keyword delimiters like <code>$<i></i>Revision: $</code> from a string.  However, further keyword substitution cannot be performed once the keyword names are removed, so this option should be used with care.

: One often would like to use &lsquo;<code>-kv</code>&rsquo; with <code>cvs export</code>&mdash;see section [[#export&mdash;Export sources from CVS, similar to checkout|export&mdash;Export sources from CVS, similar to checkout]].  But be aware that doesn&rsquo;t handle an export containing binary files correctly.



----

<div id="Configuring-keyword-expansion"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Keyword substitution| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Substitution modes| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| Up ]]|</td>
<td valign="middle" align="left">|[[#Problems with the $ Log$ keyword.| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Configuring-Keyord-Expansion"></div>
=== Configuring Keyord Expansion ===
<div id="index-Configuring-keyword-expansion"></div>

In a repository that includes third-party software on
vendor branches, it is sometimes helpful to configure
CVS to use a local keyword instead of the standard
$<i></i>Id$ or $<i></i>Header$ keywords. Examples from
real projects includ, $<i></i>Xorg$, $<i></i>XFree86$,
$<i></i>FreeBSD$, $<i></i>NetBSD$,
$<i></i>OpenBSD$, and even $<i></i>dotat$.
The advantage of this is that
you can include your local version information in a
file using this local keyword (sometimes called a
&ldquo;custom tag&rdquo; or a &ldquo;local tag&rdquo;) without disrupting
the upstream version information (which may be a
different local keyword or a standard keyword). In
these cases, it is typically desirable to disable the
expansion of all keywords except the configured local
keyword.

The <code>KeywordExpansion</code> option in the
&lsquo;<tt>CVSROOT/config</tt>&rsquo; file is intended to allow for the
either the explicit exclusion of a keyword or list of
keywords, or for the explicit inclusion of a keyword or
a list of keywords. This list may include the
<code>LocalKeyword</code> that has been configured.

The <code>KeywordExpansion</code> option is followed by
<code>=</code> and the next character may either be <code>i</code>
to start an inclusion list or <code>e</code> to start an
exclusion list. If the following lines were added to
the &lsquo;<tt>CVSROOT/config</tt>&rsquo; file:

<div class="example" style="margin-left: 3.2em">
         # Add a &quot;MyBSD&quot; keyword and restrict keyword
         # expansion
         LocalKeyword=MyBSD=CVSHeader
         KeywordExpand=iMyBSD
</div>

then only the $<i></i>MyBSD$ keyword would be expanded.
A list may be used. The this example:

<div class="example" style="margin-left: 3.2em">
         # Add a &quot;MyBSD&quot; keyword and restrict keyword
         # expansion to the MyBSD, Name and Date keywords.
         LocalKeyword=MyBSD=CVSHeader
         KeywordExpand=iMyBSD,Name,Date
</div>

would allow $<i></i>MyBSD$, $<i></i>Name$, and
$<i></i>Date$ to be expanded.

It is also possible to configure an exclusion list
using the following:

<div class="example" style="margin-left: 3.2em">
         # Do not expand the non-RCS keyword CVSHeader
         KeywordExpand=eCVSHeader
</div>

This allows <small>CVS</small> to ignore the recently introduced
$<i></i>CVSHeader$ keyword and retain all of the
others. The exclusion entry could also contain the
standard RCS keyword list, but this could be confusing
to users that expect RCS keywords to be expanded, so
ycare should be taken to properly set user expectations
for a repository that is configured in that manner.

If there is a desire to not have any RCS keywords
expanded and not use the <code>-ko</code> flags everywhere,
an administrator may disable all keyword expansion
using the &lsquo;<tt>CVSROOT/config</tt>&rsquo; line:

<div class="example" style="margin-left: 3.2em">
 	# Do not expand any RCS keywords
 	KeywordExpand=i
</div>

this could be confusing to users that expect RCS
keywords like $<i></i>Id$ to be expanded properly,
so care should be taken to properly set user
expectations for a repository so configured.

It should be noted that a patch to provide both the
<code>KeywordExpand</code> and <code>LocalKeyword</code> features
has been around a long time. However, that patch
implemented these features using <code>tag=</code> and
<code>tagexpand=</code> keywords and those keywords are NOT
recognized.


----

<div id="Log-keyword"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Keyword substitution| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Configuring Keyord Expansion| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Keyword substitution| Up ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Problems-with-the-_0024-Log_0024-keyword_002e"></div>
=== Problems with the $ <i></i>Log$ keyword. ===

The <code>$<i></i>Log$</code> keyword is somewhat
controversial.  As long as you are working on your
development system the information is easily accessible
even if you do not use the <code>$<i></i>Log$</code>
keyword&mdash;just do a <code>cvs log</code>.  Once you export
the file the history information might be useless
anyhow.

A more serious concern is that <small>CVS</small> is not good at
handling <code>$<i></i>Log$</code> entries when a branch is
merged onto the main trunk.  Conflicts often result
from the merging operation.

People also tend to &quot;fix&quot; the log entries in the file
(correcting spelling mistakes and maybe even factual
errors).  If that is done the information from
<code>cvs log</code> will not be consistent with the
information inside the file.  This may or may not be a
problem in real life.

It has been suggested that the <code>$<i></i>Log$</code>
keyword should be inserted ''last'' in the file, and
not in the files header, if it is to be used at all.
That way the long list of change messages will not
interfere with everyday source file browsing.


----

<div id="Tracking-sources"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Keyword substitution| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Problems with the $ Log$ keyword.| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Importing for the first time| &gt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Tracking-third_002dparty-sources"></div>
== Tracking third-party sources ==
<div id="index-Third_002dparty-sources"></div>
<div id="index-Tracking-sources"></div>

If you modify a program to better fit your site, you
probably want to include your modifications when the next
release of the program arrives.  <small>CVS</small> can help you with
this task.

<div id="index-Vendor"></div>
<div id="index-Vendor-branch"></div>
<div id="index-Branch_002c-vendor_002d"></div>
In the terminology used in <small>CVS</small>, the supplier of the
program is called a <em>vendor</em>.  The unmodified
distribution from the vendor is checked in on its own
branch, the <em>vendor branch</em>.  <small>CVS</small> reserves branch
1.1.1 for this use.

When you modify the source and commit it, your revision
will end up on the main trunk.  When a new release is
made by the vendor, you commit it on the vendor branch
and copy the modifications onto the main trunk.

Use the <code>import</code> command to create and update
the vendor branch.  When you import a new file,
the vendor branch is made the &lsquo;head&rsquo; revision, so
anyone that checks out a copy of the file gets that
revision.  When a local modification is committed it is
placed on the main trunk, and made the &lsquo;head&rsquo;
revision.

 [[#Importing for the first time|&bull; First import]]::                Importing for the first time
 [[#Updating with the import command|&bull; Update imports]]::              Updating with the import command
 [[#Reverting to the latest vendor release|&bull; Reverting local changes]]::     Reverting to the latest vendor release
 [[#How to handle binary files with cvs import|&bull; Binary files in imports]]::     Binary files require special handling
 [[#How to handle keyword substitution with cvs import|&bull; Keywords in imports]]::         Keyword substitution might be undesirable
 [[#Multiple vendor branches|&bull; Multiple vendor branches]]::    What if you get sources from several places?


----

<div id="First-import"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Tracking third-party sources| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| Up ]]|</td>
<td valign="middle" align="left">|[[#Updating with the import command| &gt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Importing-for-the-first-time"></div>
=== Importing for the first time ===
<div id="index-Importing-modules"></div>

Use the <code>import</code> command to check in the sources
for the first time.  When you use the <code>import</code>
command to track third-party sources, the <em>vendor
tag</em> and <em>release tags</em> are useful.  The
<em>vendor tag</em> is a symbolic name for the branch
(which is always 1.1.1, unless you use the &lsquo;<code>-b
<var>branch</var></code>&rsquo; flag&mdash;see [[#Multiple vendor branches|Multiple vendor branches]].).  The
<em>release tags</em> are symbolic names for a particular
release, such as &lsquo;<code>FSF_0_04</code>&rsquo;.

Note that <code>import</code> does ''not'' change the
directory in which you invoke it.  In particular, it
does not set up that directory as a <small>CVS</small> working
directory; if you want to work with the sources import
them first and then check them out into a different
directory (see section [[#Getting the source|Getting the source]]).

<div id="index-wdiff-_0028import-example_0029"></div>
Suppose you have the sources to a program called
<code>wdiff</code> in a directory &lsquo;<tt>wdiff-0.04</tt>&rsquo;,
and are going to make private modifications that you
want to be able to use even when new releases are made
in the future.  You start by importing the source to
your repository:

<div class="example" style="margin-left: 3.2em">
 $ cd wdiff-0.04
 $ cvs import -m &quot;Import of FSF v. 0.04&quot; fsf/wdiff FSF_DIST WDIFF_0_04
</div>

The vendor tag is named &lsquo;<code>FSF_DIST</code>&rsquo; in the above
example, and the only release tag assigned is
&lsquo;<code>WDIFF_0_04</code>&rsquo;.


----

<div id="Update-imports"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Tracking third-party sources| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Importing for the first time| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| Up ]]|</td>
<td valign="middle" align="left">|[[#Reverting to the latest vendor release| &gt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Updating-with-the-import-command"></div>
=== Updating with the import command ===

When a new release of the source arrives, you import it into the
repository with the same <code>import</code> command that you used to set up
the repository in the first place.  The only difference is that you
specify a different release tag this time:

<div class="example" style="margin-left: 3.2em">
 $ tar xfz wdiff-0.05.tar.gz
 $ cd wdiff-0.05
 $ cvs import -m &quot;Import of FSF v. 0.05&quot; fsf/wdiff FSF_DIST WDIFF_0_05
</div>

For files that have not been modified locally, the newly created
revision becomes the head revision.  If you have made local
changes, <code>import</code> will warn you that you must merge the changes
into the main trunk, and tell you to use &lsquo;<code>checkout -j</code>&rsquo; to do so:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff
</div>

The above command will check out the latest revision of
&lsquo;<code>wdiff</code>&rsquo;, merging the changes made on the vendor branch &lsquo;<code>FSF_DIST</code>&rsquo;
since yesterday into the working copy.  If any conflicts arise during
the merge they should be resolved in the normal way (see section [[#Conflicts example|Conflicts example]]).  Then, the modified files may be committed.

However, it is much better to use the two release tags rather than using
a date on the branch as suggested above:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff
</div>

The reason this is better is that
using a date, as suggested above, assumes that you do
not import more than one release of a product per day.
More importantly, using the release tags allows <small>CVS</small> to detect files
that were removed between the two vendor releases and mark them for
removal.  Since <code>import</code> has no way to detect removed files, you
should do a merge like this even if <code>import</code> doesn&rsquo;t tell you to.


----

<div id="Reverting-local-changes"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Tracking third-party sources| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Updating with the import command| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| Up ]]|</td>
<td valign="middle" align="left">|[[#How to handle binary files with cvs import| &gt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Reverting-to-the-latest-vendor-release"></div>
=== Reverting to the latest vendor release ===

You can also revert local changes completely and return
to the latest vendor release by changing the &lsquo;head&rsquo;
revision back to the vendor branch on all files.  For
example, if you have a checked-out copy of the sources
in &lsquo;<tt>~/work.d/wdiff</tt>&rsquo;, and you want to revert to the
vendor&rsquo;s version for all the files in that directory,
you would type:

<div class="example" style="margin-left: 3.2em">
 $ cd ~/work.d/wdiff
 $ cvs admin -bWDIFF .
</div>

You must specify the &lsquo;<code>-bWDIFF</code>&rsquo; without any space
after the &lsquo;<code>-b</code>&rsquo;.  See section [[#admin options|admin options]].


----

<div id="Binary-files-in-imports"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Tracking third-party sources| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Reverting to the latest vendor release| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| Up ]]|</td>
<td valign="middle" align="left">|[[#How to handle keyword substitution with cvs import| &gt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-to-handle-binary-files-with-cvs-import"></div>
=== How to handle binary files with cvs import ===

Use the &lsquo;<code>-k</code>&rsquo; wrapper option to tell import which
files are binary.  See section [[#The cvswrappers file|The cvswrappers file]].


----

<div id="Keywords-in-imports"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Tracking third-party sources| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How to handle binary files with cvs import| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| Up ]]|</td>
<td valign="middle" align="left">|[[#Multiple vendor branches| &gt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-to-handle-keyword-substitution-with-cvs-import"></div>
=== How to handle keyword substitution with cvs import ===

The sources which you are importing may contain
keywords (see section [[#Keyword substitution|Keyword substitution]]).  For example,
the vendor may use <small>CVS</small> or some other system
which uses similar keyword expansion syntax.  If you
just import the files in the default fashion, then
the keyword expansions supplied by the vendor will
be replaced by keyword expansions supplied by your
own copy of <small>CVS</small>.  It may be more convenient to
maintain the expansions supplied by the vendor, so
that this information can supply information about
the sources that you imported from the vendor.

To maintain the keyword expansions supplied by the
vendor, supply the &lsquo;<code>-ko</code>&rsquo; option to <code>cvs
import</code> the first time you import the file.
This will turn off keyword expansion
for that file entirely, so if you want to be more
selective you&rsquo;ll have to think about what you want
and use the &lsquo;<code>-k</code>&rsquo; option to <code>cvs update</code> or
<code>cvs admin</code> as appropriate.


----

<div id="Multiple-vendor-branches"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Tracking third-party sources| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How to handle keyword substitution with cvs import| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Tracking third-party sources| Up ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Multiple-vendor-branches-1"></div>
=== Multiple vendor branches ===

All the examples so far assume that there is only one
vendor from which you are getting sources.  In some
situations you might get sources from a variety of
places.  For example, suppose that you are dealing with
a project where many different people and teams are
modifying the software.  There are a variety of ways to
handle this, but in some cases you have a bunch of
source trees lying around and what you want to do more
than anything else is just to all put them in <small>CVS</small> so
that you at least have them in one place.

For handling situations in which there may be more than
one vendor, you may specify the &lsquo;<code>-b</code>&rsquo; option to
<code>cvs import</code>.  It takes as an argument the vendor
branch to import to.  The default is &lsquo;<code>-b 1.1.1</code>&rsquo;.

For example, suppose that there are two teams, the red
team and the blue team, that are sending you sources.
You want to import the red team&rsquo;s efforts to branch
1.1.1 and use the vendor tag RED.  You want to import
the blue team&rsquo;s efforts to branch 1.1.3 and use the
vendor tag BLUE.  So the commands you might use are:

<div class="example" style="margin-left: 3.2em">
 $ cvs import dir RED RED_1-0
 $ cvs import -b 1.1.3 dir BLUE BLUE_1-5
</div>

Note that if your vendor tag does not match your
&lsquo;<code>-b</code>&rsquo; option, <small>CVS</small> will not detect this case!  For
example,

<div class="example" style="margin-left: 3.2em">
 $ cvs import -b 1.1.3 dir RED RED_1-0
</div>

Be careful; this kind of mismatch is sure to sow
confusion or worse.  I can&rsquo;t think of a useful purpose
for the ability to specify a mismatch here, but if you
discover such a use, don&rsquo;t.  <small>CVS</small> is likely to make this
an error in some future release.



----

<div id="Builds"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Tracking third-party sources| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Multiple vendor branches| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Special Files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Special Files| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-your-build-system-interacts-with-CVS"></div>
== How your build system interacts with CVS ==
<div id="index-Builds"></div>
<div id="index-make"></div>

As mentioned in the introduction, <small>CVS</small> does not
contain software for building your software from source
code.  This section describes how various aspects of
your build system might interact with <small>CVS</small>.

One common question, especially from people who are
accustomed to <small>RCS</small>, is how to make their build get
an up to date copy of the sources.  The answer to this
with <small>CVS</small> is two-fold.  First of all, since
<small>CVS</small> itself can recurse through directories, there
is no need to modify your &lsquo;<tt>Makefile</tt>&rsquo; (or whatever
configuration file your build tool uses) to make sure
each file is up to date.  Instead, just use two
commands, first <code>cvs -q update</code> and then
<code>make</code> or whatever the command is to invoke your
build tool.  Secondly, you do not necessarily
''want'' to get a copy of a change someone else made
until you have finished your own work.  One suggested
approach is to first update your sources, then
implement, build and
test the change you were thinking of, and then commit
your sources (updating first if necessary).  By
periodically (in between changes, using the approach
just described) updating your entire tree, you ensure
that your sources are sufficiently up to date.

<div id="index-Bill-of-materials"></div>
One common need is to record which versions of which
source files went into a particular build.  This kind
of functionality is sometimes called <em>bill of
materials</em> or something similar.  The best way to do
this with <small>CVS</small> is to use the <code>tag</code> command to
record which versions went into a given build
(see section [[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]).

Using <small>CVS</small> in the most straightforward manner
possible, each developer will have a copy of the entire
source tree which is used in a particular build.  If
the source tree is small, or if developers are
geographically dispersed, this is the preferred
solution.  In fact one approach for larger projects is
to break a project down into smaller
separately-compiled subsystems, and arrange a way of
releasing them internally so that each developer need
check out only those subsystems which they are
actively working on.

Another approach is to set up a structure which allows
developers to have their own copies of some files, and
for other files to access source files from a central
location.  Many people have come up with some such a
system using features such as the symbolic link feature
found in many operating systems, or the <code>VPATH</code>
feature found in many versions of <code>make</code>.  One build
tool which is designed to help with this kind of thing
is Odin (see
<code>ftp://ftp.cs.colorado.edu/pub/distribs/odin</code>).


----

<div id="Special-Files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#How your build system interacts with CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How your build system interacts with CVS| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Special-Files-1"></div>
== Special Files ==

<div id="index-Special-files"></div>
<div id="index-Device-nodes"></div>
<div id="index-Ownership_002c-saving-in-CVS"></div>
<div id="index-Permissions_002c-saving-in-CVS"></div>
<div id="index-Hard-links"></div>
<div id="index-Symbolic-links"></div>

In normal circumstances, <small>CVS</small> works only with regular
files.  Every file in a project is assumed to be
persistent; it must be possible to open, read and close
them; and so on.  <small>CVS</small> also ignores file permissions and
ownerships, leaving such issues to be resolved by the
developer at installation time.  In other words, it is
not possible to &quot;check in&quot; a device into a repository;
if the device file cannot be opened, <small>CVS</small> will refuse to
handle it.  Files also lose their ownerships and
permissions during repository transactions.



----

<div id="CVS-commands"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Special Files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Special Files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Overall structure of CVS commands| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Guide-to-CVS-commands"></div>
== Guide to CVS commands ==

This appendix describes the overall structure of
<small>CVS</small> commands, and describes some commands in
detail (others are described elsewhere; for a quick
reference to <small>CVS</small> commands, see section [[#Quick reference to CVS commands|Quick reference to CVS commands]]).

 [[#Overall structure of CVS commands|&bull; Structure]]::                   Overall structure of CVS commands
 [[#CVS&rsquo;s exit status|&bull; Exit status]]::                 Indicating CVS's success or failure
 [[#Default options and the ~/.cvsrc file|&bull; ~/.cvsrc]]::                    Default options with the ~/.csvrc file
 [[#Global options|&bull; Global options]]::              Options you give to the left of cvs_command
 [[#Common command options|&bull; Common options]]::              Options you give to the right of cvs_command
 [[#admin&mdash;Administration|&bull; admin]]::                       Administration
 [[#checkout&mdash;Check out sources for editing|&bull; checkout]]::                    Checkout sources for editing
 [[#commit&mdash;Check files into the repository|&bull; commit]]::                      Check files into the repository
 [[#diff&mdash;Show differences between revisions|&bull; diff]]::                        Show differences between revisions
 [[#export&mdash;Export sources from CVS, similar to checkout|&bull; export]]::                      Export sources from CVS, similar to checkout
 [[#history&mdash;Show status of files and users|&bull; history]]::                     Show status of files and users
 [[#import&mdash;Import sources into CVS, using vendor branches|&bull; import]]::                      Import sources into CVS, using vendor branches
 [[#log&mdash;Print out log information for files|&bull; log]]::                         Show log messages for files
 [[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases|&bull; rdiff]]::                       'patch' format diffs between releases
 [[#release&mdash;Indicate that a Module is no longer in use|&bull; release]]::                     Indicate that a directory is no longer in use
 [[#update&mdash;Bring work tree in sync with repository|&bull; update]]::                      Bring work tree in sync with repository


----

<div id="Structure"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#CVS&rsquo;s exit status| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Overall-structure-of-CVS-commands"></div>
=== Overall structure of CVS commands ===
<div id="index-Structure"></div>
<div id="index-CVS-command-structure"></div>
<div id="index-Command-structure"></div>
<div id="index-Format-of-CVS-commands"></div>

The overall format of all <small>CVS</small> commands is:

<div class="example" style="margin-left: 3.2em">
 cvs <nowiki>[</nowiki> cvs_options <nowiki>]</nowiki> cvs_command <nowiki>[</nowiki> command_options <nowiki>]</nowiki> <nowiki>[</nowiki> command_args <nowiki>]</nowiki>
</div>

;<code>cvs</code>
: The name of the <small>CVS</small> program.

;<code>cvs_options</code>
: Some options that affect all sub-commands of <small>CVS</small>.  These are described below.

;<code>cvs_command</code>
: One of several different sub-commands.  Some of the commands have aliases that can be used instead; those aliases are noted in the reference manual for that command.  There are only two situations where you may omit &lsquo;<code>cvs_command</code>&rsquo;: &lsquo;<code>cvs -H</code>&rsquo; elicits a list of available commands, and &lsquo;<code>cvs -v</code>&rsquo; displays version information on <small>CVS</small> itself.

;<code>command_options</code>
: Options that are specific for the command.

;<code>command_args</code>
: Arguments to the commands.

There is unfortunately some confusion between
<code>cvs_options</code> and <code>command_options</code>.
&lsquo;<code>-l</code>&rsquo;, when given as a <code>cvs_option</code>, only
affects some of the commands.  When it is given as a
<code>command_option</code> is has a different meaning, and
is accepted by more commands.  In other words, do not
take the above categorization too seriously.  Look at
the documentation instead.


----

<div id="Exit-status"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Overall structure of CVS commands| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#Default options and the ~/.cvsrc file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="CVS_0027s-exit-status"></div>
=== CVS&rsquo;s exit status ===
<div id="index-Exit-status_002c-of-CVS"></div>

<small>CVS</small> can indicate to the calling environment whether it
succeeded or failed by setting its <em>exit status</em>.
The exact way of testing the exit status will vary from
one operating system to another.  For example in a unix
shell script the &lsquo;<code>$?</code>&rsquo; variable will be 0 if the
last command returned a successful exit status, or
greater than 0 if the exit status indicated failure.

If <small>CVS</small> is successful, it returns a successful status;
if there is an error, it prints an error message and
returns a failure status.  The one exception to this is
the <code>cvs diff</code> command.  It will return a
successful status if it found no differences, or a
failure status if there were differences or if there
was an error.  Because this behavior provides no good
way to detect errors, in the future it is possible that
<code>cvs diff</code> will be changed to behave like the
other <small>CVS</small> commands.


----

<div id="g_t_007e_002f_002ecvsrc"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#CVS&rsquo;s exit status| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#Global options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Default-options-and-the-_007e_002f_002ecvsrc-file"></div>
=== Default options and the ~/.cvsrc file ===
<div id="index-_002ecvsrc-file"></div>
<div id="index-Option-defaults"></div>

There are some <code>command_options</code> that are used so
often that you might have set up an alias or some other
means to make sure you always specify that option.  One
example (the one that drove the implementation of the
&lsquo;<tt>.cvsrc</tt>&rsquo; support, actually) is that many people find the
default output of the &lsquo;<code>diff</code>&rsquo; command to be very
hard to read, and that either context diffs or unidiffs
are much easier to understand.

The &lsquo;<tt>~/.cvsrc</tt>&rsquo; file is a way that you can add
default options to <code>cvs_commands</code> within cvs,
instead of relying on aliases or other shell scripts.

The format of the &lsquo;<tt>~/.cvsrc</tt>&rsquo; file is simple.  The
file is searched for a line that begins with the same
name as the <code>cvs_command</code> being executed.  If a
match is found, then the remainder of the line is split
up (at whitespace characters) into separate options and
added to the command arguments ''before'' any
options from the command line.

If a command has two names (e.g., <code>checkout</code> and
<code>co</code>), the official name, not necessarily the one
used on the command line, will be used to match against
the file.  So if this is the contents of the user&rsquo;s
&lsquo;<tt>~/.cvsrc</tt>&rsquo; file:

<div class="example" style="margin-left: 3.2em">
 log -N
 diff -uN
 rdiff -u
 update -Pd
 checkout -P
 release -d
</div>

the command &lsquo;<code>cvs checkout foo</code>&rsquo; would have the
&lsquo;<code>-P</code>&rsquo; option added to the arguments, as well as
&lsquo;<code>cvs co foo</code>&rsquo;.

With the example file above, the output from &lsquo;<code>cvs
diff foobar</code>&rsquo; will be in unidiff format.  &lsquo;<code>cvs diff
-c foobar</code>&rsquo; will provide context diffs, as usual.
Getting &quot;old&quot; format diffs would be slightly more
complicated, because <code>diff</code> doesn&rsquo;t have an option
to specify use of the &quot;old&quot; format, so you would need
&lsquo;<code>cvs -f diff foobar</code>&rsquo;.

In place of the command name you can use <code>cvs</code> to
specify global options (see section [[#Global options|Global options]]).  For
example the following line in &lsquo;<tt>.cvsrc</tt>&rsquo;

<div class="example" style="margin-left: 3.2em">
 cvs -z6
</div>

causes <small>CVS</small> to use compression level 6.


----

<div id="Global-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Default options and the ~/.cvsrc file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#Common command options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Global-options-1"></div>
=== Global options ===
<div id="index-Options_002c-global"></div>
<div id="index-Global-options"></div>
<div id="index-Left_002dhand-options"></div>

The available &lsquo;<code>cvs_options</code>&rsquo; (that are given to the
left of &lsquo;<code>cvs_command</code>&rsquo;) are:

;<code>--allow-root=<var>rootdir</var></code>
: Specify legal <small>CVSROOT</small> directory.  See [[#Setting up the server for password authentication|Setting up the server for password authentication]].

<div id="index-Authentication_002c-stream"></div>
<div id="index-Stream-authentication"></div>
;<code>-a</code>
: Authenticate all communication between the client and the server.  Only has an effect on the <small>CVS</small> client. As of this writing, this is only implemented when using a GSSAPI connection (see section [[#Direct connection with GSSAPI|Direct connection with GSSAPI]]). Authentication prevents certain sorts of attacks involving hijacking the active <small>TCP</small> connection. Enabling authentication does not enable encryption.

<div id="index-RCSBIN_002c-overriding"></div>
<div id="index-Overriding-RCSBIN"></div>
;<code>-b <var>bindir</var></code>
: In <small>CVS</small> 1.9.18 and older, this specified that <small>RCS</small> programs are in the <var>bindir</var> directory. Current versions of <small>CVS</small> do not run <small>RCS</small> programs; for compatibility this option is accepted, but it does nothing.

<div id="index-TMPDIR_002c-overriding"></div>
<div id="index-Overriding-TMPDIR"></div>
;<code>-T <var>tempdir</var></code>
: Use <var>tempdir</var> as the directory where temporary files are located.  Overrides the setting of the <code>$TMPDIR</code> environment variable and any precompiled directory.  This parameter should be specified as an absolute pathname. (When running client/server, &lsquo;<code>-T</code>&rsquo; affects only the local process; specifying &lsquo;<code>-T</code>&rsquo; for the client has no effect on the server and vice versa.)

<div id="index-CVSROOT_002c-overriding"></div>
<div id="index-Overriding-CVSROOT"></div>
;<code>-d <var>cvs_root_directory</var></code>
: Use <var>cvs_root_directory</var> as the root directory pathname of the repository.  Overrides the setting of the <code>$CVSROOT</code> environment variable.  See section [[#The Repository|The Repository]].

<div id="index-EDITOR_002c-overriding"></div>
<div id="index-Overriding-EDITOR"></div>
;<code>-e <var>editor</var></code>
: Use <var>editor</var> to enter revision log information.  Overrides the setting of the <code>$CVSEDITOR</code> and <code>$EDITOR</code> environment variables.  For more information, see [[#Committing your changes|Committing your changes]].

;<code>-f</code>
: Do not read the &lsquo;<tt>~/.cvsrc</tt>&rsquo; file.  This option is most often used because of the non-orthogonality of the <small>CVS</small> option set.  For example, the &lsquo;<code>cvs log</code>&rsquo; option &lsquo;<code>-N</code>&rsquo; (turn off display of tag names) does not have a corresponding option to turn the display on.  So if you have &lsquo;<code>-N</code>&rsquo; in the &lsquo;<tt>~/.cvsrc</tt>&rsquo; entry for &lsquo;<code>log</code>&rsquo;, you may need to use &lsquo;<code>-f</code>&rsquo; to show the tag names.

;<code>-H</code>
;<code>--help</code>
: Display usage information about the specified &lsquo;<code>cvs_command</code>&rsquo; (but do not actually execute the command).  If you don&rsquo;t specify a command name, &lsquo;<code>cvs -H</code>&rsquo; displays overall help for <small>CVS</small>, including a list of other help options.

;<code>-l</code>
: Do not log the &lsquo;<code>cvs_command</code>&rsquo; in the command history (but execute it anyway).  See section [[#history&mdash;Show status of files and users|history&mdash;Show status of files and users]], for information on command history.

<div id="index-Read_002donly-repository-mode"></div>
;<code>-R</code>
: Turns on read-only repository mode.  This allows one to check out from a read-only repository, such as within an anoncvs server, or from a CDROM repository.

: Same effect as if the <code>CVSREADONLYFS</code> environment variable is set. Using &lsquo;<code>-R</code>&rsquo; can also considerably speed up checkout&rsquo;s over NFS.

<div id="index-Read_002donly-mode"></div>
;<code>-n</code>
: Do not change any files.  Attempt to execute the &lsquo;<code>cvs_command</code>&rsquo;, but only to issue reports; do not remove, update, or merge any existing files, or create any new files.

: Note that <small>CVS</small> will not necessarily produce exactly the same output as without &lsquo;<code>-n</code>&rsquo;.  In some cases the output will be the same, but in other cases <small>CVS</small> will skip some of the processing that would have been required to produce the exact same output.

;<code>-Q</code>
: Cause the command to be really quiet; the command will only generate output for serious problems.

;<code>-q</code>
: Cause the command to be somewhat quiet; informational messages, such as reports of recursion through subdirectories, are suppressed.

<div id="index-Read_002donly-files_002c-and-_002dr"></div>
;<code>-r</code>
: Make new working files read-only.  Same effect as if the <code>$CVSREAD</code> environment variable is set (see section [[#All environment variables which affect CVS|All environment variables which affect CVS]]).  The default is to make working files writable, unless watches are on (see section [[#Mechanisms to track who is editing files|Mechanisms to track who is editing files]]).

;<code>-s <var>variable</var>=<var>value</var></code>
: Set a user variable (see section [[#Expansions in administrative files|Expansions in administrative files]]).

<div id="index-Trace"></div>
;<code>-t</code>
: Trace program execution; display messages showing the steps of <small>CVS</small> activity.  Particularly useful with &lsquo;<code>-n</code>&rsquo; to explore the potential impact of an unfamiliar command.

;<code>-v</code>
;<code>--version</code>
: Display version and copyright information for <small>CVS</small>.

<div id="index-CVSREAD_002c-overriding"></div>
<div id="index-Overriding-CVSREAD"></div>
;<code>-w</code>
: Make new working files read-write.  Overrides the setting of the <code>$CVSREAD</code> environment variable. Files are created read-write by default, unless <code>$CVSREAD</code> is set or &lsquo;<code>-r</code>&rsquo; is given.

;<code>-x</code>
<div id="index-Encryption"></div>
: Encrypt all communication between the client and the server.  Only has an effect on the <small>CVS</small> client.  As of this writing, this is only implemented when using a GSSAPI connection (see section [[#Direct connection with GSSAPI|Direct connection with GSSAPI]]) or a Kerberos connection (see section [[#Direct connection with kerberos|Direct connection with kerberos]]). Enabling encryption implies that message traffic is also authenticated.  Encryption support is not available by default; it must be enabled using a special configure option, &lsquo;<tt>--enable-encryption</tt>&rsquo;, when you build <small>CVS</small>.

;<code>-z <var>gzip-level</var></code>
<div id="index-Compression"></div>
<div id="index-Gzip"></div>
: Set the compression level. Valid levels are 1 (high speed, low compression) to 9 (low speed, high compression), or 0 to disable compression (the default). Only has an effect on the <small>CVS</small> client.



----

<div id="Common-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Global options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#admin&mdash;Administration| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Common-command-options"></div>
=== Common command options ===
<div id="index-Common-options"></div>
<div id="index-Right_002dhand-options"></div>

This section describes the &lsquo;<code>command_options</code>&rsquo; that
are available across several <small>CVS</small> commands.  These
options are always given to the right of
&lsquo;<code>cvs_command</code>&rsquo;. Not all
commands support all of these options; each option is
only supported for commands where it makes sense.
However, when a command has one of these options you
can almost always count on the same behavior of the
option as in other commands.  (Other command options,
which are listed with the individual commands, may have
different behavior from one <small>CVS</small> command to the other).

'''Note: the &lsquo;<code>history</code>&rsquo; command is an exception; it supports
many options that conflict even with these standard options.'''

<div id="index-Dates"></div>
<div id="index-Time"></div>
<div id="index-Specifying-dates"></div>
;<code>-D <var>date_spec</var></code>
: Use the most recent revision no later than <var>date_spec</var>. <var>date_spec</var> is a single argument, a date description specifying a date in the past.

: The specification is <em>sticky</em> when you use it to make a private copy of a source file; that is, when you get a working file using &lsquo;<code>-D</code>&rsquo;, <small>CVS</small> records the date you specified, so that further updates in the same directory will use the same date (for more information on sticky tags/dates, see section [[#Sticky tags|Sticky tags]]).

: &lsquo;<code>-D</code>&rsquo; is available with the <code>annotate</code>, <code>checkout</code>, <code>diff</code>, <code>export</code>, <code>history</code>, <code>rdiff</code>, <code>rtag</code>, <code>tag</code>, and <code>update</code> commands. (The <code>history</code> command uses this option in a slightly different way; see section [[#history options|history options]]).


<div id="index-Timezone_002c-in-input"></div>
<div id="index-Zone_002c-time_002c-in-input"></div>
: A wide variety of date formats are supported by <small>CVS</small>.  The most standard ones are ISO8601 (from the International Standards Organization) and the Internet e-mail standard (specified in RFC822 as amended by RFC1123).

: ISO8601 dates have many variants but a few examples are:

<div class="example" style="margin-left: 3.2em">
 1972-09-24
 1972-09-24 20:05
</div>

: There are a lot more ISO8601 date formats, and <small>CVS</small> accepts many of them, but you probably don&rsquo;t want to hear the ''whole'' long story<nowiki> :</nowiki>-).


: In addition to the dates allowed in Internet e-mail itself, <small>CVS</small> also allows some of the fields to be omitted.  For example:

<div class="example" style="margin-left: 3.2em">
 24 Sep 1972 20:05
 24 Sep
</div>

: The date is interpreted as being in the local timezone, unless a specific timezone is specified.

: These two date formats are preferred.  However, <small>CVS</small> currently accepts a wide variety of other date formats.  They are intentionally not documented here in any detail, and future versions of <small>CVS</small> might not accept all of them.

: One such format is <code><var>month</var>/<var>day</var>/<var>year</var></code>.  This may confuse people who are accustomed to having the month and day in the other order; &lsquo;<code>1/4/96</code>&rsquo; is January 4, not April 1.

: Remember to quote the argument to the &lsquo;<code>-D</code>&rsquo; flag so that your shell doesn&rsquo;t interpret spaces as argument separators.  A command using the &lsquo;<code>-D</code>&rsquo; flag can look like this:

<div class="example" style="margin-left: 3.2em">
 $ cvs diff -D &quot;1 hour ago&quot; cvs.texinfo
</div>

<div id="index-Forcing-a-tag-match"></div>
;<code>-f</code>
: When you specify a particular date or tag to <small>CVS</small> commands, they normally ignore files that do not contain the tag (or did not exist prior to the date) that you specified.  Use the &lsquo;<code>-f</code>&rsquo; option if you want files retrieved even when there is no match for the tag or date.  (The most recent revision of the file will be used).

: Note that even with &lsquo;<code>-f</code>&rsquo;, a tag that you specify must exist (that is, in some file, not necessary in every file).  This is so that <small>CVS</small> will continue to give an error if you mistype a tag name.

: &lsquo;<code>-f</code>&rsquo; is available with these commands: <code>annotate</code>, <code>checkout</code>, <code>export</code>, <code>rdiff</code>, <code>rtag</code>, and <code>update</code>.

: '''WARNING:  The <code>commit</code> and <code>remove</code> commands also have a &lsquo;<code>-f</code>&rsquo; option, but it has a different behavior for those commands.  See [[#commit options|commit options]], and [[#Removing files|Removing files]].'''

;<code>-k <var>kflag</var></code>
: Override the default processing of RCS keywords other than &lsquo;<code>-kb</code>&rsquo;.  See section [[#Keyword substitution|Keyword substitution]], for the meaning of <var>kflag</var>.  Used with the <code>checkout</code> and <code>update</code> commands, your <var>kflag</var> specification is <em>sticky</em>; that is, when you use this option with a <code>checkout</code> or <code>update</code> command, <small>CVS</small> associates your selected <var>kflag</var> with any files it operates on, and continues to use that <var>kflag</var> with future commands on the same files until you specify otherwise.

: The &lsquo;<code>-k</code>&rsquo; option is available with the <code>add</code>, <code>checkout</code>, <code>diff</code>, <code>export</code>, <code>import</code> and <code>update</code> commands.

: '''WARNING: Prior to CVS version 1.12.2, the &lsquo;<code>-k</code>&rsquo; flag overrode the &lsquo;<code>-kb</code>&rsquo; indication for a binary file.  This could sometimes corrupt binary files.  See section [[#Merging and keywords|Merging and keywords]], for more.'''

;<code>-l</code>
: Local; run only in current working directory, rather than recursing through subdirectories.

: Available with the following commands: <code>annotate</code>, <code>checkout</code>, <code>commit</code>, <code>diff</code>, <code>edit</code>, <code>editors</code>, <code>export</code>, <code>log</code>, <code>rdiff</code>, <code>remove</code>, <code>rtag</code>, <code>status</code>, <code>tag</code>, <code>unedit</code>, <code>update</code>, <code>watch</code>, and <code>watchers</code>.

<div id="index-Editor_002c-avoiding-invocation-of"></div>
<div id="index-Avoiding-editor-invocation"></div>
;<code>-m <var>message</var></code>
: Use <var>message</var> as log information, instead of invoking an editor.

: Available with the following commands: <code>add</code>, <code>commit</code> and <code>import</code>.

;<code>-n</code>
: Do not run any tag program.  (A program can be specified to run in the modules database (see section [[#The modules file|The modules file]]); this option bypasses it).

: '''Note: this is not the same as the &lsquo;<code>cvs -n</code>&rsquo; program option, which you can specify to the left of a cvs command!'''

: Available with the <code>checkout</code>, <code>commit</code>, <code>export</code>, and <code>rtag</code> commands.

;<code>-P</code>
: Prune empty directories.  See [[#Removing directories|Removing directories]].

;<code>-p</code>
: Pipe the files retrieved from the repository to standard output, rather than writing them in the current directory.  Available with the <code>checkout</code> and <code>update</code> commands.

;<code>-R</code>
: Process directories recursively.  This is on by default.

: Available with the following commands: <code>annotate</code>, <code>checkout</code>, <code>commit</code>, <code>diff</code>, <code>edit</code>, <code>editors</code>, <code>export</code>, <code>rdiff</code>, <code>remove</code>, <code>rtag</code>, <code>status</code>, <code>tag</code>, <code>unedit</code>, <code>update</code>, <code>watch</code>, and <code>watchers</code>.

;<code>-r <var>tag</var></code>
<div id="index-HEAD_002c-special-tag"></div>
<div id="index-BASE_002c-special-tag"></div>
: Use the revision specified by the <var>tag</var> argument instead of the default <em>head</em> revision.  As well as arbitrary tags defined with the <code>tag</code> or <code>rtag</code> command, two special tags are always available: &lsquo;<code>HEAD</code>&rsquo; refers to the most recent version available in the repository, and &lsquo;<code>BASE</code>&rsquo; refers to the revision you last checked out into the current working directory.


: The tag specification is sticky when you use this with <code>checkout</code> or <code>update</code> to make your own copy of a file: <small>CVS</small> remembers the tag and continues to use it on future update commands, until you specify otherwise (for more information on sticky tags/dates, see section [[#Sticky tags|Sticky tags]]).

: The tag can be either a symbolic or numeric tag, as described in [[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]], or the name of a branch, as described in [[#Branching and merging|Branching and merging]].

: Specifying the &lsquo;<code>-q</code>&rsquo; global option along with the &lsquo;<code>-r</code>&rsquo; command option is often useful, to suppress the warning messages when the <small>RCS</small> file does not contain the specified tag.

: '''Note: this is not the same as the overall &lsquo;<code>cvs -r</code>&rsquo; option, which you can specify to the left of a <small>CVS</small> command!'''

: &lsquo;<code>-r</code>&rsquo; is available with the <code>checkout</code>, <code>commit</code>, <code>diff</code>, <code>history</code>, <code>export</code>, <code>rdiff</code>, <code>rtag</code>, and <code>update</code> commands.

;<code>-W</code>
: Specify file names that should be filtered.  You can use this option repeatedly.  The spec can be a file name pattern of the same type that you can specify in the &lsquo;<tt>.cvswrappers</tt>&rsquo; file. Available with the following commands: <code>import</code>, and <code>update</code>.



----

<div id="admin"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Common command options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#admin options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="admin_002d_002d_002dAdministration"></div>
=== admin&mdash;Administration ===
<div id="index-Admin-_0028subcommand_0029"></div>


* Requires: repository, working directory.

* Changes: repository.

* Synonym: rcs

This is the <small>CVS</small> interface to assorted
administrative facilities.  Some of them have
questionable usefulness for <small>CVS</small> but exist for
historical purposes.  Some of the questionable options
are likely to disappear in the future.  This command
''does'' work recursively, so extreme care should be
used.

<div id="index-cvsadmin"></div>
<div id="index-UserAdminOptions_002c-in-CVSROOT_002fconfig"></div>
On unix, if there is a group named <code>cvsadmin</code>,
only members of that group can run <code>cvs admin</code>
commands, except for those specified using the
<code>UserAdminOptions</code> configuration option in the
&lsquo;<tt>CVSROOT/config</tt>&rsquo; file.  Options specified using
<code>UserAdminOptions</code> can be run by any user.  See
[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]] for more on <code>UserAdminOptions</code>.

The <code>cvsadmin</code> group should exist on the server,
or any system running the non-client/server <small>CVS</small>.
To disallow <code>cvs admin</code> for all users, create a
group with no users in it.  On NT, the <code>cvsadmin</code>
feature does not exist and all users
can run <code>cvs admin</code>.

 [[#admin options|&bull; admin options]]::               admin options


----

<div id="admin-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#admin&mdash;Administration| &lt; ]]|</td>
<td valign="middle" align="left">|[[#admin&mdash;Administration| Up ]]|</td>
<td valign="middle" align="left">|[[#checkout&mdash;Check out sources for editing| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="admin-options-1"></div>
==== admin options ====

Some of these options have questionable usefulness for
<small>CVS</small> but exist for historical purposes.  Some even
make it impossible to use <small>CVS</small> until you undo the
effect!

;<code>-A<var>oldfile</var></code>
: Might not work together with <small>CVS</small>.  Append the access list of <var>oldfile</var> to the access list of the <small>RCS</small> file.

;<code>-a<var>logins</var></code>
: Might not work together with <small>CVS</small>.  Append the login names appearing in the comma-separated list <var>logins</var> to the access list of the <small>RCS</small> file.

;<code>-b<nowiki>[</nowiki><var>rev</var><nowiki>]</nowiki></code>
: Set the default branch to <var>rev</var>.  In <small>CVS</small>, you normally do not manipulate default branches; sticky tags (see section [[#Sticky tags|Sticky tags]]) are a better way to decide which branch you want to work on.  There is one reason to run <code>cvs admin -b</code>: to revert to the vendor&rsquo;s version when using vendor branches (see section [[#Reverting to the latest vendor release|Reverting to the latest vendor release]]). There can be no space between &lsquo;<code>-b</code>&rsquo; and its argument.

<div id="index-Comment-leader"></div>
;<code>-c<var>string</var></code>
: Sets the comment leader to <var>string</var>.  The comment leader is not used by current versions of <small>CVS</small> or <small>RCS</small> 5.7.  Therefore, you can almost surely not worry about it.  See section [[#Keyword substitution|Keyword substitution]].

;<code>-e<nowiki>[</nowiki><var>logins</var><nowiki>]</nowiki></code>
: Might not work together with <small>CVS</small>.  Erase the login names appearing in the comma-separated list <var>logins</var> from the access list of the RCS file.  If <var>logins</var> is omitted, erase the entire access list. There can be no space between &lsquo;<code>-e</code>&rsquo; and its argument.

;<code>-I</code>
: Run interactively, even if the standard input is not a terminal.  This option does not work with the client/server <small>CVS</small> and is likely to disappear in a future release of <small>CVS</small>.

;<code>-i</code>
: Useless with <small>CVS</small>.  This creates and initializes a new <small>RCS</small> file, without depositing a revision.  With <small>CVS</small>, add files with the <code>cvs add</code> command (see section [[#Adding files to a directory|Adding files to a directory]]).

;<code>-k<var>subst</var></code>
: Set the default keyword substitution to <var>subst</var>.  See section [[#Keyword substitution|Keyword substitution]].  Giving an explicit &lsquo;<code>-k</code>&rsquo; option to <code>cvs update</code>, <code>cvs export</code>, or <code>cvs checkout</code> overrides this default.

;<code>-l<nowiki>[</nowiki><var>rev</var><nowiki>]</nowiki></code>
: Lock the revision with number <var>rev</var>.  If a branch is given, lock the latest revision on that branch.  If <var>rev</var> is omitted, lock the latest revision on the default branch.  There can be no space between &lsquo;<code>-l</code>&rsquo; and its argument.

: This can be used in conjunction with the &lsquo;<tt>rcslock.pl</tt>&rsquo; script in the &lsquo;<tt>contrib</tt>&rsquo; directory of the <small>CVS</small> source distribution to provide reserved checkouts (where only one user can be editing a given file at a time).  See the comments in that file for details (and see the &lsquo;<tt>README</tt>&rsquo; file in that directory for disclaimers about the unsupported nature of contrib).  According to comments in that file, locking must set to strict (which is the default).

;<code>-L</code>
: Set locking to strict.  Strict locking means that the owner of an RCS file is not exempt from locking for checkin.  For use with <small>CVS</small>, strict locking must be set; see the discussion under the &lsquo;<code>-l</code>&rsquo; option above.

<div id="index-Changing-a-log-message"></div>
<div id="index-Replacing-a-log-message"></div>
<div id="index-Correcting-a-log-message"></div>
<div id="index-Fixing-a-log-message"></div>
<div id="index-Log-message_002c-correcting"></div>
;<code>-m<var>rev</var>:<var>msg</var></code>
: Replace the log message of revision <var>rev</var> with <var>msg</var>.


;<code>-N<var>name</var><nowiki>[</nowiki>:<nowiki>[</nowiki><var>rev</var><nowiki>]]</nowiki></code>
: Act like &lsquo;<code>-n</code>&rsquo;, except override any previous assignment of <var>name</var>.  For use with magic branches, see [[#Magic branch numbers|Magic branch numbers]].

;<code>-n<var>name</var><nowiki>[</nowiki>:<nowiki>[</nowiki><var>rev</var><nowiki>]]</nowiki></code>
: Associate the symbolic name <var>name</var> with the branch or revision <var>rev</var>.  It is normally better to use &lsquo;<code>cvs tag</code>&rsquo; or &lsquo;<code>cvs rtag</code>&rsquo; instead.  Delete the symbolic name if both &lsquo;<code>:</code>&rsquo; and <var>rev</var> are omitted; otherwise, print an error message if <var>name</var> is already associated with another number. If <var>rev</var> is symbolic, it is expanded before association.  A <var>rev</var> consisting of a branch number followed by a &lsquo;<code>.</code>&rsquo; stands for the current latest revision in the branch.  A &lsquo;<code>:</code>&rsquo; with an empty <var>rev</var> stands for the current latest revision on the default branch, normally the trunk.  For example, &lsquo;<code>cvs admin -n<var>name</var>:</code>&rsquo; associates <var>name</var> with the current latest revision of all the RCS files; this contrasts with &lsquo;<code>cvs admin -n<var>name</var>:$</code>&rsquo; which associates <var>name</var> with the revision numbers extracted from keyword strings in the corresponding working files.

<div id="index-Deleting-revisions"></div>
<div id="index-Outdating-revisions"></div>
<div id="index-Saving-space"></div>
;<code>-o<var>range</var></code>
: Deletes (<em>outdates</em>) the revisions given by <var>range</var>.

: Note that this command can be quite dangerous unless you know ''exactly'' what you are doing (for example see the warnings below about how the <var>rev1</var>:<var>rev2</var> syntax is confusing).

: If you are short on disc this option might help you. But think twice before using it&mdash;there is no way short of restoring the latest backup to undo this command! If you delete different revisions than you planned, either due to carelessness or (heaven forbid) a <small>CVS</small> bug, there is no opportunity to correct the error before the revisions are deleted.  It probably would be a good idea to experiment on a copy of the repository first.

: Specify <var>range</var> in one of the following ways:

:;<code><var>rev1</var>::<var>rev2</var></code>
:: Collapse all revisions between rev1 and rev2, so that <small>CVS</small> only stores the differences associated with going from rev1 to rev2, not intermediate steps.  For example, after &lsquo;<code>-o 1.3::1.5</code>&rsquo; one can retrieve revision 1.3, revision 1.5, or the differences to get from 1.3 to 1.5, but not the revision 1.4, or the differences between 1.3 and 1.4.  Other examples: &lsquo;<code>-o 1.3::1.4</code>&rsquo; and &lsquo;<code>-o 1.3::1.3</code>&rsquo; have no effect, because there are no intermediate revisions to remove.

:;<code>::<var>rev</var></code>
:: Collapse revisions between the beginning of the branch containing <var>rev</var> and <var>rev</var> itself.  The branchpoint and <var>rev</var> are left intact.  For example, &lsquo;<code>-o<nowiki> :</nowiki>:1.3.2.6</code>&rsquo; deletes revision 1.3.2.1, revision 1.3.2.5, and everything in between, but leaves 1.3 and 1.3.2.6 intact.

:;<code><var>rev</var>::</code>
:: Collapse revisions between <var>rev</var> and the end of the branch containing <var>rev</var>.  Revision <var>rev</var> is left intact but the head revision is deleted.

:;<code><var>rev</var></code>
:: Delete the revision <var>rev</var>.  For example, &lsquo;<code>-o 1.3</code>&rsquo; is equivalent to &lsquo;<code>-o 1.2::1.4</code>&rsquo;.

:;<code><var>rev1</var>:<var>rev2</var></code>
:: Delete the revisions from <var>rev1</var> to <var>rev2</var>, inclusive, on the same branch.  One will not be able to retrieve <var>rev1</var> or <var>rev2</var> or any of the revisions in between.  For example, the command &lsquo;<code>cvs admin -oR_1_01:R_1_02 .</code>&rsquo; is rarely useful. It means to delete revisions up to, and including, the tag R_1_02.  But beware!  If there are files that have not changed between R_1_02 and R_1_03 the file will have ''the same'' numerical revision number assigned to the tags R_1_02 and R_1_03.  So not only will it be impossible to retrieve R_1_02; R_1_03 will also have to be restored from the tapes!  In most cases you want to specify <var>rev1</var>::<var>rev2</var> instead.

:;<code>:<var>rev</var></code>
:: Delete revisions from the beginning of the branch containing <var>rev</var> up to and including <var>rev</var>.

:;<code><var>rev</var>:</code>
:: Delete revisions from revision <var>rev</var>, including <var>rev</var> itself, to the end of the branch containing <var>rev</var>.

: None of the revisions to be deleted may have branches or locks.

: If any of the revisions to be deleted have symbolic names, and one specifies one of the &lsquo;<code>::</code>&rsquo; syntaxes, then <small>CVS</small> will give an error and not delete any revisions.  If you really want to delete both the symbolic names and the revisions, first delete the symbolic names with <code>cvs tag -d</code>, then run <code>cvs admin -o</code>.  If one specifies the non-&lsquo;<code>::</code>&rsquo; syntaxes, then <small>CVS</small> will delete the revisions but leave the symbolic names pointing to nonexistent revisions.  This behavior is preserved for compatibility with previous versions of <small>CVS</small>, but because it isn&rsquo;t very useful, in the future it may change to be like the &lsquo;<code>::</code>&rsquo; case.

: Due to the way <small>CVS</small> handles branches <var>rev</var> cannot be specified symbolically if it is a branch. See section [[#Magic branch numbers|Magic branch numbers]], for an explanation.

: Make sure that no-one has checked out a copy of the revision you outdate.  Strange things will happen if he starts to edit it and tries to check it back in.  For this reason, this option is not a good way to take back a bogus commit; commit a new revision undoing the bogus change instead (see section [[#Merging differences between any two revisions|Merging differences between any two revisions]]).

;<code>-q</code>
: Run quietly; do not print diagnostics.

;<code>-s<var>state</var><nowiki>[</nowiki>:<var>rev</var><nowiki>]</nowiki></code>
: Useful with <small>CVS</small>.  Set the state attribute of the revision <var>rev</var> to <var>state</var>.  If <var>rev</var> is a branch number, assume the latest revision on that branch.  If <var>rev</var> is omitted, assume the latest revision on the default branch.  Any identifier is acceptable for <var>state</var>.  A useful set of states is &lsquo;<code>Exp</code>&rsquo; (for experimental), &lsquo;<code>Stab</code>&rsquo; (for stable), and &lsquo;<code>Rel</code>&rsquo; (for released).  By default, the state of a new revision is set to &lsquo;<code>Exp</code>&rsquo; when it is created.  The state is visible in the output from <var>cvs log</var> (see section [[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]]), and in the &lsquo;<code>$<i></i>Log$</code>&rsquo; and &lsquo;<code>$<i></i>State$</code>&rsquo; keywords (see section [[#Keyword substitution|Keyword substitution]]).  Note that <small>CVS</small> uses the <code>dead</code> state for its own purposes; to take a file to or from the <code>dead</code> state use commands like <code>cvs remove</code> and <code>cvs add</code>, not <code>cvs admin -s</code>.

;<code>-t<nowiki>[</nowiki><var>file</var><nowiki>]</nowiki></code>
: Useful with <small>CVS</small>.  Write descriptive text from the contents of the named <var>file</var> into the RCS file, deleting the existing text.  The <var>file</var> pathname may not begin with &lsquo;<code>-</code>&rsquo;.  The descriptive text can be seen in the output from &lsquo;<code>cvs log</code>&rsquo; (see section [[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]]). There can be no space between &lsquo;<code>-t</code>&rsquo; and its argument.

: If <var>file</var> is omitted, obtain the text from standard input, terminated by end-of-file or by a line containing &lsquo;<code>.</code>&rsquo; by itself. Prompt for the text if interaction is possible; see &lsquo;<code>-I</code>&rsquo;.

;<code>-t-<var>string</var></code>
: Similar to &lsquo;<code>-t<var>file</var></code>&rsquo;. Write descriptive text from the <var>string</var> into the <small>RCS</small> file, deleting the existing text. There can be no space between &lsquo;<code>-t</code>&rsquo; and its argument.


;<code>-U</code>
: Set locking to non-strict.  Non-strict locking means that the owner of a file need not lock a revision for checkin.  For use with <small>CVS</small>, strict locking must be set; see the discussion under the &lsquo;<code>-l</code>&rsquo; option above.

;<code>-u<nowiki>[</nowiki><var>rev</var><nowiki>]</nowiki></code>
: See the option &lsquo;<code>-l</code>&rsquo; above, for a discussion of using this option with <small>CVS</small>.  Unlock the revision with number <var>rev</var>.  If a branch is given, unlock the latest revision on that branch.  If <var>rev</var> is omitted, remove the latest lock held by the caller. Normally, only the locker of a revision may unlock it; somebody else unlocking a revision breaks the lock. This causes the original locker to be sent a <code>commit</code> notification (see section [[#Telling CVS to notify you|Telling CVS to notify you]]). There can be no space between &lsquo;<code>-u</code>&rsquo; and its argument.

;<code>-V<var>n</var></code>
: In previous versions of <small>CVS</small>, this option meant to write an <small>RCS</small> file which would be acceptable to <small>RCS</small> version <var>n</var>, but it is now obsolete and specifying it will produce an error.

;<code>-x<var>suffixes</var></code>
: In previous versions of <small>CVS</small>, this was documented as a way of specifying the names of the <small>RCS</small> files.  However, <small>CVS</small> has always required that the <small>RCS</small> files used by <small>CVS</small> end in &lsquo;<code>,v</code>&rsquo;, so this option has never done anything useful.




----

<div id="checkout"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#admin options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#checkout options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="checkout_002d_002d_002dCheck-out-sources-for-editing"></div>
=== checkout&mdash;Check out sources for editing ===
<div id="index-checkout-_0028subcommand_0029"></div>
<div id="index-co-_0028subcommand_0029"></div>


* Synopsis: checkout <nowiki>[</nowiki>options<nowiki>]</nowiki> modules&hellip;

* Requires: repository.

* Changes: working directory.

* Synonyms: co, get

Create or update a working directory containing copies of the
source files specified by <var>modules</var>.  You must execute
<code>checkout</code> before using most of the other <small>CVS</small>
commands, since most of them operate on your working
directory.

The <var>modules</var> are either
symbolic names for some
collection of source directories and files, or paths to
directories or files in the repository.  The symbolic
names are defined in the &lsquo;<code>modules</code>&rsquo; file.
See section [[#The modules file|The modules file]].

Depending on the modules you specify, <code>checkout</code> may
recursively create directories and populate them with
the appropriate source files.  You can then edit these
source files at any time (regardless of whether other
software developers are editing their own copies of the
sources); update them to include new changes applied by
others to the source repository; or commit your work as
a permanent change to the source repository.

Note that <code>checkout</code> is used to create
directories.  The top-level directory created is always
added to the directory where <code>checkout</code> is
invoked, and usually has the same name as the specified
module.  In the case of a module alias, the created
sub-directory may have a different name, but you can be
sure that it will be a sub-directory, and that
<code>checkout</code> will show the relative path leading to
each file as it is extracted into your private work
area (unless you specify the &lsquo;<code>-Q</code>&rsquo; global option).

The files created by <code>checkout</code> are created
read-write, unless the &lsquo;<code>-r</code>&rsquo; option to <small>CVS</small>
(see section [[#Global options|Global options]]) is specified, the
<code>CVSREAD</code> environment variable is specified
(see section [[#All environment variables which affect CVS|All environment variables which affect CVS]]), or a watch is in
effect for that file (see section [[#Mechanisms to track who is editing files|Mechanisms to track who is editing files]]).

Note that running <code>checkout</code> on a directory that was already
built by a prior <code>checkout</code> is also permitted.
This is similar to specifying the &lsquo;<code>-d</code>&rsquo; option
to the <code>update</code> command in the sense that new
directories that have been created in the repository
will appear in your work area.
However, <code>checkout</code> takes a module name whereas
<code>update</code> takes a directory name.  Also
to use <code>checkout</code> this way it must be run from the
top level directory (where you originally ran
<code>checkout</code> from), so before you run
<code>checkout</code> to update an existing directory, don&rsquo;t
forget to change your directory to the top level
directory.

For the output produced by the <code>checkout</code> command
see [[#update output|update output]].

 [[#checkout options|&bull; checkout options]]::            checkout options
 [[#checkout examples|&bull; checkout examples]]::           checkout examples


----

<div id="checkout-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#checkout&mdash;Check out sources for editing| &lt; ]]|</td>
<td valign="middle" align="left">|[[#checkout&mdash;Check out sources for editing| Up ]]|</td>
<td valign="middle" align="left">|[[#checkout examples| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="checkout-options-1"></div>
==== checkout options ====

These standard options are supported by <code>checkout</code>
(see section [[#Common command options|Common command options]], for a complete description of
them):

;<code>-D <var>date</var></code>
: Use the most recent revision no later than <var>date</var>. This option is sticky, and implies &lsquo;<code>-P</code>&rsquo;.  See [[#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

;<code>-f</code>
: Only useful with the &lsquo;<code>-D <var>date</var></code>&rsquo; or &lsquo;<code>-r <var>tag</var></code>&rsquo; flags.  If no matching revision is found, retrieve the most recent revision (instead of ignoring the file).

;<code>-k <var>kflag</var></code>
: Process keywords according to <var>kflag</var>.  See [[#Keyword substitution|Keyword substitution]]. This option is sticky; future updates of this file in this working directory will use the same <var>kflag</var>.  The <code>status</code> command can be viewed to see the sticky options.  See [[#Quick reference to CVS commands|Quick reference to CVS commands]], for more information on the <code>status</code> command.

;<code>-l</code>
: Local; run only in current working directory.

;<code>-n</code>
: Do not run any checkout program (as specified with the &lsquo;<code>-o</code>&rsquo; option in the modules file; see section [[#The modules file|The modules file]]).

;<code>-P</code>
: Prune empty directories.  See [[#Moving and renaming directories|Moving and renaming directories]].

;<code>-p</code>
: Pipe files to the standard output.

;<code>-R</code>
: Checkout directories recursively.  This option is on by default.

;<code>-r <var>tag</var></code>
: Use revision <var>tag</var>.  This option is sticky, and implies &lsquo;<code>-P</code>&rsquo;. See [[#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

In addition to those, you can use these special command
options with <code>checkout</code>:

;<code>-A</code>
: Reset any sticky tags, dates, or &lsquo;<code>-k</code>&rsquo; options. See [[#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

;<code>-c</code>
: Copy the module file, sorted, to the standard output, instead of creating or modifying any files or directories in your working directory.

;<code>-d <var>dir</var></code>
: Create a directory called <var>dir</var> for the working files, instead of using the module name.  In general, using this flag is equivalent to using &lsquo;<code>mkdir <var>dir</var>; cd <var>dir</var></code>&rsquo; followed by the checkout command without the &lsquo;<code>-d</code>&rsquo; flag.

: There is an important exception, however.  It is very convenient when checking out a single item to have the output appear in a directory that doesn&rsquo;t contain empty intermediate directories.  In this case ''only'', <small>CVS</small> tries to &ldquo;shorten&rdquo; pathnames to avoid those empty directories.

: For example, given a module &lsquo;<code>foo</code>&rsquo; that contains the file &lsquo;<code>bar.c</code>&rsquo;, the command &lsquo;<code>cvs co -d dir foo</code>&rsquo; will create directory &lsquo;<code>dir</code>&rsquo; and place &lsquo;<code>bar.c</code>&rsquo; inside.  Similarly, given a module &lsquo;<code>bar</code>&rsquo; which has subdirectory &lsquo;<code>baz</code>&rsquo; wherein there is a file &lsquo;<code>quux.c</code>&rsquo;, the command &lsquo;<code>cvs co -d dir bar/baz</code>&rsquo; will create directory &lsquo;<code>dir</code>&rsquo; and place &lsquo;<code>quux.c</code>&rsquo; inside.

: Using the &lsquo;<code>-N</code>&rsquo; flag will defeat this behavior. Given the same module definitions above, &lsquo;<code>cvs co -N -d dir foo</code>&rsquo; will create directories &lsquo;<code>dir/foo</code>&rsquo; and place &lsquo;<code>bar.c</code>&rsquo; inside, while &lsquo;<code>cvs co -N -d dir bar/baz</code>&rsquo; will create directories &lsquo;<code>dir/bar/baz</code>&rsquo; and place &lsquo;<code>quux.c</code>&rsquo; inside.

;<code>-j <var>tag</var></code>
: With two &lsquo;<code>-j</code>&rsquo; options, merge changes from the revision specified with the first &lsquo;<code>-j</code>&rsquo; option to the revision specified with the second &lsquo;<code>j</code>&rsquo; option, into the working directory.

: With one &lsquo;<code>-j</code>&rsquo; option, merge changes from the ancestor revision to the revision specified with the &lsquo;<code>-j</code>&rsquo; 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 &lsquo;<code>-j</code>&rsquo; option.

: 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: &lsquo;<code>-j<var>Symbolic_Tag</var>:<var>Date_Specifier</var></code>&rsquo;.

: See section [[#Branching and merging|Branching and merging]].

;<code>-N</code>
: Only useful together with &lsquo;<code>-d <var>dir</var></code>&rsquo;.  With this option, <small>CVS</small> will not &ldquo;shorten&rdquo; module paths in your working directory when you check out a single module.  See the &lsquo;<code>-d</code>&rsquo; flag for examples and a discussion.

;<code>-s</code>
: Like &lsquo;<code>-c</code>&rsquo;, but include the status of all modules, and sort it by the status string.  See section [[#The modules file|The modules file]], for info about the &lsquo;<code>-s</code>&rsquo; option that is used inside the modules file to set the module status.


----

<div id="checkout-examples"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#checkout options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#checkout&mdash;Check out sources for editing| Up ]]|</td>
<td valign="middle" align="left">|[[#commit&mdash;Check files into the repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="checkout-examples-1"></div>
==== checkout examples ====

Get a copy of the module &lsquo;<code>tc</code>&rsquo;:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout tc
</div>

Get a copy of the module &lsquo;<code>tc</code>&rsquo; as it looked one day
ago:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -D yesterday tc
</div>


----

<div id="commit"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#checkout examples| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#commit options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="commit_002d_002d_002dCheck-files-into-the-repository"></div>
=== commit&mdash;Check files into the repository ===
<div id="index-commit-_0028subcommand_0029"></div>


* Synopsis: commit <nowiki>[</nowiki>-lnRf<nowiki>]</nowiki> <nowiki>[</nowiki>-m &rsquo;log_message&rsquo; | -F file<nowiki>]</nowiki> <nowiki>[</nowiki>-r revision<nowiki>]</nowiki> <nowiki>[</nowiki>files&hellip;<nowiki>]</nowiki>

* Requires: working directory, repository.

* Changes: repository.

* Synonym: ci

Use <code>commit</code> when you want to incorporate changes
from your working source files into the source
repository.

If you don&rsquo;t specify particular files to commit, all of
the files in your working current directory are
examined.  <code>commit</code> is careful to change in the
repository only those files that you have really
changed.  By default (or if you explicitly specify the
&lsquo;<code>-R</code>&rsquo; option), files in subdirectories are also
examined and committed if they have changed; you can
use the &lsquo;<code>-l</code>&rsquo; option to limit <code>commit</code> to the
current directory only.

<code>commit</code> verifies that the selected files are up
to date with the current revisions in the source
repository; it will notify you, and exit without
committing, if any of the specified files must be made
current first with <code>update</code> (see section [[#update&mdash;Bring work tree in sync with repository|update&mdash;Bring work tree in sync with repository]]).
<code>commit</code> does not call the <code>update</code> command
for you, but rather leaves that for you to do when the
time is right.

When all is well, an editor is invoked to allow you to
enter a log message that will be written to one or more
logging programs (see section [[#The modules file|The modules file]], and see section [[#Loginfo|Loginfo]])
and placed in the <small>RCS</small> file inside the
repository.  This log message can be retrieved with the
<code>log</code> command; see [[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]].  You can specify the
log message on the command line with the &lsquo;<code>-m
<var>message</var></code>&rsquo; option, and thus avoid the editor invocation,
or use the &lsquo;<code>-F <var>file</var></code>&rsquo; option to specify
that the argument file contains the log message.

 [[#commit options|&bull; commit options]]::              commit options
 [[#commit examples|&bull; commit examples]]::             commit examples


----

<div id="commit-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#commit&mdash;Check files into the repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#commit&mdash;Check files into the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#commit examples| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="commit-options-1"></div>
==== commit options ====

These standard options are supported by <code>commit</code>
(see section [[#Common command options|Common command options]], for a complete description of
them):

;<code>-l</code>
: Local; run only in current working directory.

;<code>-R</code>
: Commit directories recursively.  This is on by default.

;<code>-r <var>revision</var></code>
: Commit to <var>revision</var>.  <var>revision</var> must be either a branch, or a revision on the main trunk that is higher than any existing revision number (see section [[#Assigning revisions|Assigning revisions]]).  You cannot commit to a specific revision on a branch.

<code>commit</code> also supports these options:

;<code>-F <var>file</var></code>
: Read the log message from <var>file</var>, instead of invoking an editor.

;<code>-f</code>
: Note that this is not the standard behavior of the &lsquo;<code>-f</code>&rsquo; option as defined in [[#Common command options|Common command options]].

: Force <small>CVS</small> to commit a new revision even if you haven&rsquo;t made any changes to the file.  If the current revision of <var>file</var> is 1.7, then the following two commands are equivalent:

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -f <var>file</var>
 $ cvs commit -r 1.8 <var>file</var>
</div>

: The &lsquo;<code>-f</code>&rsquo; option disables recursion (i.e., it implies &lsquo;<code>-l</code>&rsquo;).  To force <small>CVS</small> to commit a new revision for all files in all subdirectories, you must use &lsquo;<code>-f -R</code>&rsquo;.

;<code>-m <var>message</var></code>
: Use <var>message</var> as the log message, instead of invoking an editor.


----

<div id="commit-examples"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#commit options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#commit&mdash;Check files into the repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Committing to a branch| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="commit-examples-1"></div>
==== commit examples ====



----

<div id="Committing-to-a-branch"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#commit examples| &lt; ]]|</td>
<td valign="middle" align="left">|[[#commit examples| Up ]]|</td>
<td valign="middle" align="left">|[[#Creating the branch after editing| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
===== Committing to a branch =====

You can commit to a branch revision (one that has an
even number of dots) with the &lsquo;<code>-r</code>&rsquo; option.  To
create a branch revision, use the &lsquo;<code>-b</code>&rsquo; option
of the <code>rtag</code> or <code>tag</code> commands
(see section [[#Branching and merging|Branching and merging]]).  Then, either <code>checkout</code> or
<code>update</code> can be used to base your sources on the
newly created branch.  From that point on, all
<code>commit</code> changes made within these working sources
will be automatically added to a branch revision,
thereby not disturbing main-line development in any
way.  For example, if you had to create a patch to the
1.2 version of the product, even though the 2.0 version
is already under development, you might do:

<div class="example" style="margin-left: 3.2em">
 $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
 $ cvs checkout -r FCS1_2_Patch product_module
 $ cd product_module
 <nowiki>[[</nowiki> hack away <nowiki>]]</nowiki>
 $ cvs commit
</div>

This works automatically since the &lsquo;<code>-r</code>&rsquo; option is
sticky.


----

<div id="Creating-the-branch-after-editing"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Committing to a branch| &lt; ]]|</td>
<td valign="middle" align="left">|[[#commit examples| Up ]]|</td>
<td valign="middle" align="left">|[[#diff&mdash;Show differences between revisions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
===== Creating the branch after editing =====

Say you have been working on some extremely
experimental software, based on whatever revision you
happened to checkout last week.  If others in your
group would like to work on this software with you, but
without disturbing main-line development, you could
commit your change to a new branch.  Others can then
checkout your experimental stuff and utilize the full
benefit of <small>CVS</small> conflict resolution.  The scenario might
look like:

<div class="example" style="margin-left: 3.2em">
 <nowiki>[[</nowiki> hacked sources are present <nowiki>]]</nowiki>
 $ cvs tag -b EXPR1
 $ cvs update -r EXPR1
 $ cvs commit
</div>

The <code>update</code> command will make the &lsquo;<code>-r
EXPR1</code>&rsquo; option sticky on all files.  Note that your
changes to the files will never be removed by the
<code>update</code> command.  The <code>commit</code> will
automatically commit to the correct branch, because the
&lsquo;<code>-r</code>&rsquo; is sticky.  You could also do like this:

<div class="example" style="margin-left: 3.2em">
 <nowiki>[[</nowiki> hacked sources are present <nowiki>]]</nowiki>
 $ cvs tag -b EXPR1
 $ cvs commit -r EXPR1
</div>

but then, only those files that were changed by you
will have the &lsquo;<code>-r EXPR1</code>&rsquo; sticky flag.  If you hack
away, and commit without specifying the &lsquo;<code>-r EXPR1</code>&rsquo;
flag, some files may accidentally end up on the main
trunk.

To work with you on the experimental change, others
would simply do

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -r EXPR1 whatever_module
</div>


----

<div id="diff"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Creating the branch after editing| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#diff options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="diff_002d_002d_002dShow-differences-between-revisions"></div>
=== diff&mdash;Show differences between revisions ===
<div id="index-diff-_0028subcommand_0029"></div>


* Synopsis: diff <nowiki>[</nowiki>-lR<nowiki>]</nowiki> <nowiki>[</nowiki>-k kflag<nowiki>]</nowiki> <nowiki>[</nowiki>format_options<nowiki>]</nowiki> <nowiki>[[</nowiki>-r rev1 | -D date1<nowiki>]</nowiki> <nowiki>[</nowiki>-r rev2 |  -D date2<nowiki>]]</nowiki> <nowiki>[</nowiki>files&hellip;<nowiki>]</nowiki>

* Requires: working directory, repository.

* Changes: nothing.

The <code>diff</code> command is used to compare different
revisions of files.  The default action is to compare
your working files with the revisions they were based
on, and report any differences that are found.

If any file names are given, only those files are
compared.  If any directories are given, all files
under them will be compared.

The exit status for diff is different than for other
<small>CVS</small> commands; for details [[#CVS&rsquo;s exit status|CVS&rsquo;s exit status]].

 [[#diff options|&bull; diff options]]::                diff options
 [[#diff examples|&bull; diff examples]]::               diff examples


----

<div id="diff-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#diff&mdash;Show differences between revisions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#diff&mdash;Show differences between revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#Line group formats| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="diff-options-1"></div>
==== diff options ====

These standard options are supported by <code>diff</code>
(see section [[#Common command options|Common command options]], for a complete description of
them):

;<code>-D <var>date</var></code>
: Use the most recent revision no later than <var>date</var>. See &lsquo;<code>-r</code>&rsquo; for how this affects the comparison.

;<code>-k <var>kflag</var></code>
: Process keywords according to <var>kflag</var>.  See [[#Keyword substitution|Keyword substitution]].

;<code>-l</code>
: Local; run only in current working directory.

;<code>-R</code>
: Examine directories recursively.  This option is on by default.

;<code>-r <var>tag</var></code>
: Compare with revision <var>tag</var>.  Zero, one or two &lsquo;<code>-r</code>&rsquo; options can be present.  With no &lsquo;<code>-r</code>&rsquo; option, the working file will be compared with the revision it was based on.  With one &lsquo;<code>-r</code>&rsquo;, that revision will be compared to your current working file. With two &lsquo;<code>-r</code>&rsquo; options those two revisions will be compared (and your working file will not affect the outcome in any way).

: One or both &lsquo;<code>-r</code>&rsquo; options can be replaced by a &lsquo;<code>-D <var>date</var></code>&rsquo; option, described above.

The following options specify the format of the
output.  They have the same meaning as in GNU diff.
Most options have two equivalent names, one of which is a single letter
preceded by &lsquo;<code>-</code>&rsquo;, and the other of which is a long name preceded by
&lsquo;<code>--</code>&rsquo;.

;&lsquo;<code>-<var>lines</var></code>&rsquo;
: Show <var>lines</var> (an integer) lines of context.  This option does not specify an output format by itself; it has no effect unless it is combined with &lsquo;<code>-c</code>&rsquo; or &lsquo;<code>-u</code>&rsquo;.  This option is obsolete.  For proper operation, <code>patch</code> typically needs at least two lines of context.

;&lsquo;<code>-a</code>&rsquo;
: Treat all files as text and compare them line-by-line, even if they do not seem to be text.

;&lsquo;<code>-b</code>&rsquo;
: Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent.

;&lsquo;<code>-B</code>&rsquo;
: Ignore changes that just insert or delete blank lines.

;&lsquo;<code>--binary</code>&rsquo;
: Read and write data in binary mode.

;&lsquo;<code>--brief</code>&rsquo;
: Report only whether the files differ, not the details of the differences.

;&lsquo;<code>-c</code>&rsquo;
: Use the context output format.

;&lsquo;<code>-C <var>lines</var></code>&rsquo;
;&lsquo;<code>--context<span class="roman" style="font-family:serif; font-weight:normal"><nowiki>[</nowiki></span>=<var>lines</var><span class="roman" style="font-family:serif; font-weight:normal"><nowiki>]</nowiki></span></code>&rsquo;
: Use the context output format, showing <var>lines</var> (an integer) lines of context, or three if <var>lines</var> is not given. For proper operation, <code>patch</code> typically needs at least two lines of context.

;&lsquo;<code>--changed-group-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output a line group containing differing lines from both files in if-then-else format.  See section [[#Line group formats|Line group formats]].

;&lsquo;<code>-d</code>&rsquo;
: Change the algorithm to perhaps find a smaller set of changes.  This makes <code>diff</code> slower (sometimes much slower).

;&lsquo;<code>-e</code>&rsquo;
;&lsquo;<code>--ed</code>&rsquo;
: Make output that is a valid <code>ed</code> script.

;&lsquo;<code>--expand-tabs</code>&rsquo;
: Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files.

;&lsquo;<code>-f</code>&rsquo;
: Make output that looks vaguely like an <code>ed</code> script but has changes in the order they appear in the file.

;&lsquo;<code>-F <var>regexp</var></code>&rsquo;
: In context and unified format, for each hunk of differences, show some of the last preceding line that matches <var>regexp</var>.

;&lsquo;<code>--forward-ed</code>&rsquo;
: Make output that looks vaguely like an <code>ed</code> script but has changes in the order they appear in the file.

;&lsquo;<code>-H</code>&rsquo;
: Use heuristics to speed handling of large files that have numerous scattered small changes.

;&lsquo;<code>--horizon-lines=<var>lines</var></code>&rsquo;
: Do not discard the last <var>lines</var> lines of the common prefix and the first <var>lines</var> lines of the common suffix.

;&lsquo;<code>-i</code>&rsquo;
: Ignore changes in case; consider upper- and lower-case letters equivalent.

;&lsquo;<code>-I <var>regexp</var></code>&rsquo;
: Ignore changes that just insert or delete lines that match <var>regexp</var>.

;&lsquo;<code>--ifdef=<var>name</var></code>&rsquo;
: Make merged if-then-else output using <var>name</var>.

;&lsquo;<code>--ignore-all-space</code>&rsquo;
: Ignore white space when comparing lines.

;&lsquo;<code>--ignore-blank-lines</code>&rsquo;
: Ignore changes that just insert or delete blank lines.

;&lsquo;<code>--ignore-case</code>&rsquo;
: Ignore changes in case; consider upper- and lower-case to be the same.

;&lsquo;<code>--ignore-matching-lines=<var>regexp</var></code>&rsquo;
: Ignore changes that just insert or delete lines that match <var>regexp</var>.

;&lsquo;<code>--ignore-space-change</code>&rsquo;
: Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent.

;&lsquo;<code>--initial-tab</code>&rsquo;
: Output a tab rather than a space before the text of a line in normal or context format.  This causes the alignment of tabs in the line to look normal.

;&lsquo;<code>-L <var>label</var></code>&rsquo;
: Use <var>label</var> instead of the file name in the context format and unified format headers.

;&lsquo;<code>--label=<var>label</var></code>&rsquo;
: Use <var>label</var> instead of the file name in the context format and unified format headers.

;&lsquo;<code>--left-column</code>&rsquo;
: Print only the left column of two common lines in side by side format.

;&lsquo;<code>--line-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output all input lines in if-then-else format. See section [[#Line formats|Line formats]].

;&lsquo;<code>--minimal</code>&rsquo;
: Change the algorithm to perhaps find a smaller set of changes.  This makes <code>diff</code> slower (sometimes much slower).

;&lsquo;<code>-n</code>&rsquo;
: Output RCS-format diffs; like &lsquo;<code>-f</code>&rsquo; except that each command specifies the number of lines affected.

;&lsquo;<code>-N</code>&rsquo;
;&lsquo;<code>--new-file</code>&rsquo;
: In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory.

;&lsquo;<code>--new-group-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output a group of lines taken from just the second file in if-then-else format.  See section [[#Line group formats|Line group formats]].

;&lsquo;<code>--new-line-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output a line taken from just the second file in if-then-else format.  See section [[#Line formats|Line formats]].

;&lsquo;<code>--old-group-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output a group of lines taken from just the first file in if-then-else format.  See section [[#Line group formats|Line group formats]].

;&lsquo;<code>--old-line-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output a line taken from just the first file in if-then-else format.  See section [[#Line formats|Line formats]].

;&lsquo;<code>-p</code>&rsquo;
: Show which C function each change is in.

;&lsquo;<code>--rcs</code>&rsquo;
: Output RCS-format diffs; like &lsquo;<code>-f</code>&rsquo; except that each command specifies the number of lines affected.

;&lsquo;<code>--report-identical-files</code>&rsquo;
;&lsquo;<code>-s</code>&rsquo;
: Report when two files are the same.

;&lsquo;<code>--show-c-function</code>&rsquo;
: Show which C function each change is in.

;&lsquo;<code>--show-function-line=<var>regexp</var></code>&rsquo;
: In context and unified format, for each hunk of differences, show some of the last preceding line that matches <var>regexp</var>.

;&lsquo;<code>--side-by-side</code>&rsquo;
: Use the side by side output format.

;&lsquo;<code>--speed-large-files</code>&rsquo;
: Use heuristics to speed handling of large files that have numerous scattered small changes.

;&lsquo;<code>--suppress-common-lines</code>&rsquo;
: Do not print common lines in side by side format.

;&lsquo;<code>-t</code>&rsquo;
: Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files.

;&lsquo;<code>-T</code>&rsquo;
: Output a tab rather than a space before the text of a line in normal or context format.  This causes the alignment of tabs in the line to look normal.

;&lsquo;<code>--text</code>&rsquo;
: Treat all files as text and compare them line-by-line, even if they do not appear to be text.

;&lsquo;<code>-u</code>&rsquo;
: Use the unified output format.

;&lsquo;<code>--unchanged-group-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output a group of common lines taken from both files in if-then-else format.  See section [[#Line group formats|Line group formats]].

;&lsquo;<code>--unchanged-line-format=<var>format</var></code>&rsquo;
: Use <var>format</var> to output a line common to both files in if-then-else format.  See section [[#Line formats|Line formats]].

;&lsquo;<code>-U <var>lines</var></code>&rsquo;
;&lsquo;<code>--unified<span class="roman" style="font-family:serif; font-weight:normal"><nowiki>[</nowiki></span>=<var>lines</var><span class="roman" style="font-family:serif; font-weight:normal"><nowiki>]</nowiki></span></code>&rsquo;
: Use the unified output format, showing <var>lines</var> (an integer) lines of context, or three if <var>lines</var> is not given. For proper operation, <code>patch</code> typically needs at least two lines of context.

;&lsquo;<code>-w</code>&rsquo;
: Ignore white space when comparing lines.

;&lsquo;<code>-W <var>columns</var></code>&rsquo;
;&lsquo;<code>--width=<var>columns</var></code>&rsquo;
: Use an output width of <var>columns</var> in side by side format.

;&lsquo;<code>-y</code>&rsquo;
: Use the side by side output format.

 [[#Line group formats|&bull; Line group formats]]::          Line group formats
 [[#Line formats|&bull; Line formats]]::                Line formats


----

<div id="Line-group-formats"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#diff options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#diff options| Up ]]|</td>
<td valign="middle" align="left">|[[#Line formats| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Line-group-formats-1"></div>
===== Line group formats =====

Line group formats let you specify formats suitable for many
applications that allow if-then-else input, including programming
languages and text formatting languages.  A line group format specifies
the output format for a contiguous group of similar lines.

For example, the following command compares the TeX file &lsquo;<tt>myfile</tt>&rsquo;
with the original version from the repository,
and outputs a merged file in which old regions are
surrounded by &lsquo;<code>\begin<nowiki>{</nowiki>em<nowiki>}</nowiki></code>&rsquo;-&lsquo;<code>\end<nowiki>{</nowiki>em<nowiki>}</nowiki></code>&rsquo; lines, and new
regions are surrounded by &lsquo;<code>\begin<nowiki>{</nowiki>bf<nowiki>}</nowiki></code>&rsquo;-&lsquo;<code>\end<nowiki>{</nowiki>bf<nowiki>}</nowiki></code>&rsquo; lines.

<div class="example" style="margin-left: 3.2em">
 cvs diff \
    --old-group-format='\begin<nowiki>{</nowiki>em<nowiki>}</nowiki>
 %&lt;\end<nowiki>{</nowiki>em<nowiki>}</nowiki>
 ' \
    --new-group-format='\begin<nowiki>{</nowiki>bf<nowiki>}</nowiki>
 %&gt;\end<nowiki>{</nowiki>bf<nowiki>}</nowiki>
 ' \
    myfile
</div>

The following command is equivalent to the above example, but it is a
little more verbose, because it spells out the default line group formats.

<div class="example" style="margin-left: 3.2em">
 cvs diff \
    --old-group-format='\begin<nowiki>{</nowiki>em<nowiki>}</nowiki>
 %&lt;\end<nowiki>{</nowiki>em<nowiki>}</nowiki>
 ' \
    --new-group-format='\begin<nowiki>{</nowiki>bf<nowiki>}</nowiki>
 %&gt;\end<nowiki>{</nowiki>bf<nowiki>}</nowiki>
 ' \
    --unchanged-group-format='%=' \
    --changed-group-format='\begin<nowiki>{</nowiki>em<nowiki>}</nowiki>
 %&lt;\end<nowiki>{</nowiki>em<nowiki>}</nowiki>
 \begin<nowiki>{</nowiki>bf<nowiki>}</nowiki>
 %&gt;\end<nowiki>{</nowiki>bf<nowiki>}</nowiki>
 ' \
    myfile
</div>

Here is a more advanced example, which outputs a diff listing with
headers containing line numbers in a &ldquo;plain English&rdquo; style.

<div class="example" style="margin-left: 3.2em">
 cvs diff \
    --unchanged-group-format=<nowiki>''</nowiki> \
    --old-group-format='-------- %dn line%(n=1?:s) deleted at %df:
 %&lt;' \
    --new-group-format='-------- %dN line%(N=1?:s) added after %de:
 %&gt;' \
    --changed-group-format='-------- %dn line%(n=1?:s) changed at %df:
 %&lt;-------- to:
 %&gt;' \
    myfile
</div>

To specify a line group format, use one of the options
listed below.  You can specify up to four line group formats, one for
each kind of line group.  You should quote <var>format</var>, because it
typically contains shell metacharacters.

;&lsquo;<code>--old-group-format=<var>format</var></code>&rsquo;
: These line groups are hunks containing only lines from the first file. The default old group format is the same as the changed group format if it is specified; otherwise it is a format that outputs the line group as-is.

;&lsquo;<code>--new-group-format=<var>format</var></code>&rsquo;
: These line groups are hunks containing only lines from the second file.  The default new group format is same as the changed group format if it is specified; otherwise it is a format that outputs the line group as-is.

;&lsquo;<code>--changed-group-format=<var>format</var></code>&rsquo;
: These line groups are hunks containing lines from both files.  The default changed group format is the concatenation of the old and new group formats.

;&lsquo;<code>--unchanged-group-format=<var>format</var></code>&rsquo;
: These line groups contain lines common to both files.  The default unchanged group format is a format that outputs the line group as-is.

In a line group format, ordinary characters represent themselves;
conversion specifications start with &lsquo;<code>%</code>&rsquo; and have one of the
following forms.

;&lsquo;<code>%&lt;</code>&rsquo;
: stands for the lines from the first file, including the trailing newline. Each line is formatted according to the old line format (see section [[#Line formats|Line formats]]).

;&lsquo;<code>%&gt;</code>&rsquo;
: stands for the lines from the second file, including the trailing newline. Each line is formatted according to the new line format.

;&lsquo;<code>%=</code>&rsquo;
: stands for the lines common to both files, including the trailing newline. Each line is formatted according to the unchanged line format.

;&lsquo;<code>%%</code>&rsquo;
: stands for &lsquo;<code>%</code>&rsquo;.

;&lsquo;<code>%c'<var>C</var>'</code>&rsquo;
: where <var>C</var> is a single character, stands for <var>C</var>. <var>C</var> may not be a backslash or an apostrophe. For example, &lsquo;<code>%c':'</code>&rsquo; stands for a colon, even inside the then-part of an if-then-else format, which a colon would normally terminate.

;&lsquo;<code>%c'\<var>O</var>'</code>&rsquo;
: where <var>O</var> is a string of 1, 2, or 3 octal digits, stands for the character with octal code <var>O</var>. For example, &lsquo;<code>%c'\0'</code>&rsquo; stands for a null character.

;&lsquo;<code><var>F</var><var>n</var></code>&rsquo;
: where <var>F</var> is a <code>printf</code> conversion specification and <var>n</var> is one of the following letters, stands for <var>n</var>&rsquo;s value formatted with <var>F</var>.

:;&lsquo;<code>e</code>&rsquo;
:: The line number of the line just before the group in the old file.

:;&lsquo;<code>f</code>&rsquo;
:: The line number of the first line in the group in the old file; equals <var>e</var> + 1.

:;&lsquo;<code>l</code>&rsquo;
:: The line number of the last line in the group in the old file.

:;&lsquo;<code>m</code>&rsquo;
:: The line number of the line just after the group in the old file; equals <var>l</var> + 1.

:;&lsquo;<code>n</code>&rsquo;
:: The number of lines in the group in the old file; equals <var>l</var> - <var>f</var> + 1.

:;&lsquo;<code>E, F, L, M, N</code>&rsquo;
:: Likewise, for lines in the new file.


: The <code>printf</code> conversion specification can be &lsquo;<code>%d</code>&rsquo;, &lsquo;<code>%o</code>&rsquo;, &lsquo;<code>%x</code>&rsquo;, or &lsquo;<code>%X</code>&rsquo;, specifying decimal, octal, lower case hexadecimal, or upper case hexadecimal output respectively.  After the &lsquo;<code>%</code>&rsquo; the following options can appear in sequence: a &lsquo;<code>-</code>&rsquo; specifying left-justification; an integer specifying the minimum field width; and a period followed by an optional integer specifying the minimum number of digits. For example, &lsquo;<code>%5dN</code>&rsquo; prints the number of new lines in the group in a field of width 5 characters, using the <code>printf</code> format <code>&quot;%5d&quot;</code>.

;&lsquo;<code>(<var>A</var>=<var>B</var>?<var>T</var>:<var>E</var>)</code>&rsquo;
: If <var>A</var> equals <var>B</var> then <var>T</var> else <var>E</var>. <var>A</var> and <var>B</var> are each either a decimal constant or a single letter interpreted as above. This format spec is equivalent to <var>T</var> if <var>A</var>&rsquo;s value equals <var>B</var>&rsquo;s; otherwise it is equivalent to <var>E</var>.

: For example, &lsquo;<code>%(N=0?no:%dN) line%(N=1?:s)</code>&rsquo; is equivalent to &lsquo;<code>no lines</code>&rsquo; if <var>N</var> (the number of lines in the group in the new file) is 0, to &lsquo;<code>1 line</code>&rsquo; if <var>N</var> is 1, and to &lsquo;<code>%dN lines</code>&rsquo; otherwise.


----

<div id="Line-formats"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Line group formats| &lt; ]]|</td>
<td valign="middle" align="left">|[[#diff options| Up ]]|</td>
<td valign="middle" align="left">|[[#diff examples| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Line-formats-1"></div>
===== Line formats =====

Line formats control how each line taken from an input file is
output as part of a line group in if-then-else format.

For example, the following command outputs text with a one-column
change indicator to the left of the text.  The first column of output
is &lsquo;<code>-</code>&rsquo; for deleted lines, &lsquo;<code>|</code>&rsquo; for added lines, and a space
for unchanged lines.  The formats contain newline characters where
newlines are desired on output.

<div class="example" style="margin-left: 3.2em">
 cvs diff \
    --old-line-format='-%l
 ' \
    --new-line-format='|%l
 ' \
    --unchanged-line-format=' %l
 ' \
    myfile
</div>

To specify a line format, use one of the following options.  You should
quote <var>format</var>, since it often contains shell metacharacters.

;&lsquo;<code>--old-line-format=<var>format</var></code>&rsquo;
: formats lines just from the first file.

;&lsquo;<code>--new-line-format=<var>format</var></code>&rsquo;
: formats lines just from the second file.

;&lsquo;<code>--unchanged-line-format=<var>format</var></code>&rsquo;
: formats lines common to both files.

;&lsquo;<code>--line-format=<var>format</var></code>&rsquo;
: formats all lines; in effect, it sets all three above options simultaneously.

In a line format, ordinary characters represent themselves;
conversion specifications start with &lsquo;<code>%</code>&rsquo; and have one of the
following forms.

;&lsquo;<code>%l</code>&rsquo;
: stands for the contents of the line, not counting its trailing newline (if any).  This format ignores whether the line is incomplete.

;&lsquo;<code>%L</code>&rsquo;
: stands for the contents of the line, including its trailing newline (if any).  If a line is incomplete, this format preserves its incompleteness.

;&lsquo;<code>%%</code>&rsquo;
: stands for &lsquo;<code>%</code>&rsquo;.

;&lsquo;<code>%c'<var>C</var>'</code>&rsquo;
: where <var>C</var> is a single character, stands for <var>C</var>. <var>C</var> may not be a backslash or an apostrophe. For example, &lsquo;<code>%c':'</code>&rsquo; stands for a colon.

;&lsquo;<code>%c'\<var>O</var>'</code>&rsquo;
: where <var>O</var> is a string of 1, 2, or 3 octal digits, stands for the character with octal code <var>O</var>. For example, &lsquo;<code>%c'\0'</code>&rsquo; stands for a null character.

;&lsquo;<code><var>F</var>n</code>&rsquo;
: where <var>F</var> is a <code>printf</code> conversion specification, stands for the line number formatted with <var>F</var>. For example, &lsquo;<code>%.5dn</code>&rsquo; prints the line number using the <code>printf</code> format <code>&quot;%.5d&quot;</code>.  See section [[#Line group formats|Line group formats]], for more about printf conversion specifications.


The default line format is &lsquo;<code>%l</code>&rsquo; followed by a newline character.

If the input contains tab characters and it is important that they line
up on output, you should ensure that &lsquo;<code>%l</code>&rsquo; or &lsquo;<code>%L</code>&rsquo; in a line
format is just after a tab stop (e.g. by preceding &lsquo;<code>%l</code>&rsquo; or
&lsquo;<code>%L</code>&rsquo; with a tab character), or you should use the &lsquo;<code>-t</code>&rsquo; or
&lsquo;<code>--expand-tabs</code>&rsquo; option.

Taken together, the line and line group formats let you specify many
different formats.  For example, the following command uses a format
similar to <code>diff</code>&rsquo;s normal format.  You can tailor this command
to get fine control over <code>diff</code>&rsquo;s output.

<div class="example" style="margin-left: 3.2em">
 cvs diff \
    --old-line-format='&lt; %l
 ' \
    --new-line-format='&gt; %l
 ' \
    --old-group-format='%df%(f=l?:,%dl)d%dE
 %&lt;' \
    --new-group-format='%dea%dF%(F=L?:,%dL)
 %&gt;' \
    --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
 %&lt;---
 %&gt;' \
    --unchanged-group-format=<nowiki>''</nowiki> \
    myfile
</div>


----

<div id="diff-examples"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Line formats| &lt; ]]|</td>
<td valign="middle" align="left">|[[#diff&mdash;Show differences between revisions| Up ]]|</td>
<td valign="middle" align="left">|[[#export&mdash;Export sources from CVS, similar to checkout| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="diff-examples-1"></div>
==== diff examples ====

The following line produces a Unidiff (&lsquo;<code>-u</code>&rsquo; flag)
between revision 1.14 and 1.19 of
&lsquo;<tt>backend.c</tt>&rsquo;.  Due to the &lsquo;<code>-kk</code>&rsquo; flag no
keywords are substituted, so differences that only depend
on keyword substitution are ignored.

<div class="example" style="margin-left: 3.2em">
 $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
</div>

Suppose the experimental branch EXPR1 was based on a
set of files tagged RELEASE_1_0.  To see what has
happened on that branch, the following can be used:

<div class="example" style="margin-left: 3.2em">
 $ cvs diff -r RELEASE_1_0 -r EXPR1
</div>

A command like this can be used to produce a context
diff between two releases:

<div class="example" style="margin-left: 3.2em">
 $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 &gt; diffs
</div>

If you are maintaining ChangeLogs, a command like the following
just before you commit your changes may help you write
the ChangeLog entry.  All local modifications that have
not yet been committed will be printed.

<div class="example" style="margin-left: 3.2em">
 $ cvs diff -u | less
</div>


----

<div id="export"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#diff examples| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#export options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="export_002d_002d_002dExport-sources-from-CVS_002c-similar-to-checkout"></div>
=== export&mdash;Export sources from CVS, similar to checkout ===
<div id="index-export-_0028subcommand_0029"></div>


* Synopsis: export <nowiki>[</nowiki>-flNnR<nowiki>]</nowiki> <nowiki>[</nowiki>-r rev|-D date<nowiki>]</nowiki> <nowiki>[</nowiki>-k subst<nowiki>]</nowiki> <nowiki>[</nowiki>-d dir<nowiki>]</nowiki> module&hellip;

* Requires: repository.

* Changes: current directory.

This command is a variant of <code>checkout</code>; use it
when you want a copy of the source for module without
the <small>CVS</small> administrative directories.  For example, you
might use <code>export</code> to prepare source for shipment
off-site.  This command requires that you specify a
date or tag (with &lsquo;<code>-D</code>&rsquo; or &lsquo;<code>-r</code>&rsquo;), so that you
can count on reproducing the source you ship to others
(and thus it always prunes empty directories).

One often would like to use &lsquo;<code>-kv</code>&rsquo; with <code>cvs
export</code>.  This causes any keywords to be
expanded such that an import done at some other site
will not lose the keyword revision information.  But be
aware that doesn&rsquo;t handle an export containing binary
files correctly.  Also be aware that after having used
&lsquo;<code>-kv</code>&rsquo;, one can no longer use the <code>ident</code>
command (which is part of the <small>RCS</small> suite&mdash;see
ident(1)) which looks for keyword strings.  If
you want to be able to use <code>ident</code> you must not
use &lsquo;<code>-kv</code>&rsquo;.

 [[#export options|&bull; export options]]::              export options


----

<div id="export-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#export&mdash;Export sources from CVS, similar to checkout| &lt; ]]|</td>
<td valign="middle" align="left">|[[#export&mdash;Export sources from CVS, similar to checkout| Up ]]|</td>
<td valign="middle" align="left">|[[#history&mdash;Show status of files and users| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="export-options-1"></div>
==== export options ====

These standard options are supported by <code>export</code>
(see section [[#Common command options|Common command options]], for a complete description of
them):

;<code>-D <var>date</var></code>
: Use the most recent revision no later than <var>date</var>.

;<code>-f</code>
: If no matching revision is found, retrieve the most recent revision (instead of ignoring the file).

;<code>-l</code>
: Local; run only in current working directory.

;<code>-n</code>
: Do not run any checkout program.

;<code>-R</code>
: Export directories recursively.  This is on by default.

;<code>-r <var>tag</var></code>
: Use revision <var>tag</var>.

In addition, these options (that are common to
<code>checkout</code> and <code>export</code>) are also supported:

;<code>-d <var>dir</var></code>
: Create a directory called <var>dir</var> for the working files, instead of using the module name. See section [[#checkout options|checkout options]], for complete details on how <small>CVS</small> handles this flag.

;<code>-k <var>subst</var></code>
: Set keyword expansion mode (see section [[#Substitution modes|Substitution modes]]).

;<code>-N</code>
: Only useful together with &lsquo;<code>-d <var>dir</var></code>&rsquo;. See section [[#checkout options|checkout options]], for complete details on how <small>CVS</small> handles this flag.



----

<div id="history"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#export options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#history options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="history_002d_002d_002dShow-status-of-files-and-users"></div>
=== history&mdash;Show status of files and users ===
<div id="index-history-_0028subcommand_0029"></div>


* Synopsis:     history <nowiki>[</nowiki>-report<nowiki>]</nowiki> <nowiki>[</nowiki>-flags<nowiki>]</nowiki> <nowiki>[</nowiki>-options args<nowiki>]</nowiki> <nowiki>[</nowiki>files&hellip;<nowiki>]</nowiki>

* Requires: the file &lsquo;<tt>$CVSROOT/CVSROOT/history</tt>&rsquo;

* Changes: nothing.

<small>CVS</small> can keep a history file that tracks each use of the
<code>checkout</code>, <code>commit</code>, <code>rtag</code>,
<code>update</code>, and <code>release</code> commands.  You can
use <code>history</code> to display this information in
various formats.

Logging must be enabled by creating the file
&lsquo;<tt>$CVSROOT/CVSROOT/history</tt>&rsquo;.

'''Note: <code>history</code> uses &lsquo;<code>-f</code>&rsquo;, &lsquo;<code>-l</code>&rsquo;,
&lsquo;<code>-n</code>&rsquo;, and &lsquo;<code>-p</code>&rsquo; in ways that conflict with the
normal use inside <small>CVS</small> (see section [[#Common command options|Common command options]]).'''

 [[#history options|&bull; history options]]::             history options


----

<div id="history-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#history&mdash;Show status of files and users| &lt; ]]|</td>
<td valign="middle" align="left">|[[#history&mdash;Show status of files and users| Up ]]|</td>
<td valign="middle" align="left">|[[#import&mdash;Import sources into CVS, using vendor branches| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="history-options-1"></div>
==== history options ====

Several options (shown above as &lsquo;<code>-report</code>&rsquo;)  control  what
kind of report is generated:

;<code>-c</code>
: Report on each time commit was used (i.e., each time the repository was modified).

;<code>-e</code>
: Everything (all record types).  Equivalent to specifying &lsquo;<code>-x</code>&rsquo; with all record types.  Of course, &lsquo;<code>-e</code>&rsquo; will also include record types which are added in a future version of <small>CVS</small>; if you are writing a script which can only handle certain record types, you&rsquo;ll want to specify &lsquo;<code>-x</code>&rsquo;.

;<code>-m <var>module</var></code>
: Report on a particular module.  (You can meaningfully use &lsquo;<code>-m</code>&rsquo; more than once on the command line.)

;<code>-o</code>
: Report on checked-out modules.  This is the default report type.

;<code>-T</code>
: Report on all tags.

;<code>-x <var>type</var></code>
: Extract a particular set of record types <var>type</var> from the <small>CVS</small> history.  The types are indicated by single letters, which you may specify in combination.

: Certain commands have a single record type:

:;<code>F</code>
:: release
:;<code>O</code>
:: checkout
:;<code>E</code>
:: export
:;<code>T</code>
:: rtag

: One of four record types may result from an update:

:;<code>C</code>
:: A merge was necessary but collisions were detected (requiring manual merging).
:;<code>G</code>
:: A merge was necessary and it succeeded.
:;<code>U</code>
:: A working file was copied from the repository.
:;<code>W</code>
:: The working copy of a file was deleted during update (because it was gone from the repository).

: One of three record types results from commit:

:;<code>A</code>
:: A file was added for the first time.
:;<code>M</code>
:: A file was modified.
:;<code>R</code>
:: A file was removed.

The options shown as &lsquo;<code>-flags</code>&rsquo; constrain or expand
the report without requiring option arguments:

;<code>-a</code>
: Show data for all users (the default is to show data only for the user executing <code>history</code>).

;<code>-l</code>
: Show last modification only.

;<code>-w</code>
: Show only the records for modifications done from the same working directory where <code>history</code> is executing.

The options shown as &lsquo;<code>-options <var>args</var></code>&rsquo; constrain the report
based on an argument:

;<code>-b <var>str</var></code>
: Show data back to a record containing  the  string <var>str</var>  in  either the module name, the file name, or the repository path.

;<code>-D <var>date</var></code>
: Show data since <var>date</var>.  This is slightly different from the normal use of &lsquo;<code>-D <var>date</var></code>&rsquo;, which selects the newest revision older than <var>date</var>.

;<code>-f <var>file</var></code>
: Show data for a particular file (you can specify several &lsquo;<code>-f</code>&rsquo; options on the same command line). This is equivalent to specifying the file on the command line.

;<code>-n <var>module</var></code>
: Show data for a particular module (you can specify several &lsquo;<code>-n</code>&rsquo; options on the same command line).

;<code>-p <var>repository</var></code>
: Show data for a particular source repository  (you can specify several &lsquo;<code>-p</code>&rsquo; options on the same command line).

;<code>-r <var>rev</var></code>
: Show records referring to revisions since the revision or tag named <var>rev</var> appears in individual <small>RCS</small> files.  Each <small>RCS</small> file is searched for the revision or tag.

;<code>-t <var>tag</var></code>
: Show records since tag <var>tag</var> was last added to the history file.  This differs from the &lsquo;<code>-r</code>&rsquo; flag above in that it reads only the history file, not the <small>RCS</small> files, and is much faster.

;<code>-u <var>name</var></code>
: Show records for user <var>name</var>.

;<code>-z <var>timezone</var></code>
: Show times in the selected records using the specified time zone instead of UTC.



----

<div id="import"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#history options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#import options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="import_002d_002d_002dImport-sources-into-CVS_002c-using-vendor-branches"></div>
=== import&mdash;Import sources into CVS, using vendor branches ===
<div id="index-import-_0028subcommand_0029"></div>



* Synopsis: import <nowiki>[</nowiki>-options<nowiki>]</nowiki> repository vendortag releasetag&hellip;

* Requires: Repository, source distribution directory.

* Changes: repository.

Use <code>import</code> to incorporate an entire source
distribution from an outside source (e.g., a source
vendor) into your source repository directory.  You can
use this command both for initial creation of a
repository, and for wholesale updates to the module
from the outside source.  See section [[#Tracking third-party sources|Tracking third-party sources]], for
a discussion on this subject.

The <var>repository</var> argument gives a directory name
(or a path to a directory) under the <small>CVS</small> root directory
for repositories; if the directory did not exist,
import creates it.

When you use import for updates to source that has been
modified in your source repository (since a prior
import), it will notify you of any files that conflict
in the two branches of development; use &lsquo;<code>checkout
-j</code>&rsquo; to reconcile the differences, as import instructs
you to do.

If <small>CVS</small> decides a file should be ignored
(see section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]]), it does not import it and prints
&lsquo;<code>I </code>&rsquo; followed by the filename (see section [[#import output|import output]], for a
complete description of the output).

If the file &lsquo;<tt>$CVSROOT/CVSROOT/cvswrappers</tt>&rsquo; exists,
any file whose names match the specifications in that
file will be treated as packages and the appropriate
filtering will be performed on the file/directory
before being imported.  See section [[#The cvswrappers file|The cvswrappers file]].

The outside source is saved in a first-level
branch, by default 1.1.1.  Updates are leaves of this
branch; for example, files from the first imported
collection of source will be revision 1.1.1.1, then
files from the first imported update will be revision
1.1.1.2, and so on.

At least three arguments are required.
<var>repository</var> is needed to identify the collection
of source.  <var>vendortag</var> is a tag for the entire
branch (e.g., for 1.1.1).  You must also specify at
least one <var>releasetag</var> to identify the files at
the leaves created each time you execute <code>import</code>.

Note that <code>import</code> does ''not'' change the
directory in which you invoke it.  In particular, it
does not set up that directory as a <small>CVS</small> working
directory; if you want to work with the sources import
them first and then check them out into a different
directory (see section [[#Getting the source|Getting the source]]).

 [[#import options|&bull; import options]]::              import options
 [[#import output|&bull; import output]]::               import output
 [[#import examples|&bull; import examples]]::             import examples


----

<div id="import-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#import&mdash;Import sources into CVS, using vendor branches| &lt; ]]|</td>
<td valign="middle" align="left">|[[#import&mdash;Import sources into CVS, using vendor branches| Up ]]|</td>
<td valign="middle" align="left">|[[#import output| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="import-options-1"></div>
==== import options ====

This standard option is supported by <code>import</code>
(see section [[#Common command options|Common command options]], for a complete description):

;<code>-m <var>message</var></code>
: Use <var>message</var> as log information, instead of invoking an editor.

There are the following additional special options.

;<code>-b <var>branch</var></code>
: See [[#Multiple vendor branches|Multiple vendor branches]].

;<code>-k <var>subst</var></code>
: Indicate the keyword expansion mode desired.  This setting will apply to all files created during the import, but not to any files that previously existed in the repository.  See [[#Substitution modes|Substitution modes]], for a list of valid &lsquo;<code>-k</code>&rsquo; settings.

;<code>-I <var>name</var></code>
: Specify file names that should be ignored during import.  You can use this option repeatedly.  To avoid ignoring any files at all (even those ignored by default), specify &lsquo;-I !&rsquo;.

: <var>name</var> can be a file name pattern of the same type that you can specify in the &lsquo;<tt>.cvsignore</tt>&rsquo; file. See section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]].

;<code>-W <var>spec</var></code>
: Specify file names that should be filtered during import.  You can use this option repeatedly.

: <var>spec</var> can be a file name pattern of the same type that you can specify in the &lsquo;<tt>.cvswrappers</tt>&rsquo; file. See section [[#The cvswrappers file|The cvswrappers file]].


----

<div id="import-output"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#import options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#import&mdash;Import sources into CVS, using vendor branches| Up ]]|</td>
<td valign="middle" align="left">|[[#import examples| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="import-output-1"></div>
==== import output ====

<code>import</code> keeps you informed of its progress by printing a line
for each file, preceded by one character indicating the status of the file:

;<code>U <var>file</var></code>
: The file already exists in the repository and has not been locally modified; a new revision has been created (if necessary).

;<code>N <var>file</var></code>
: The file is a new file which has been added to the repository.

;<code>C <var>file</var></code>
: The file already exists in the repository but has been locally modified; you will have to merge the changes.

;<code>I <var>file</var></code>
: The file is being ignored (see section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]]).

<div id="index-Symbolic-link_002c-importing"></div>
<div id="index-Link_002c-symbolic_002c-importing"></div>
;<code>L <var>file</var></code>
: The file is a symbolic link; <code>cvs import</code> ignores symbolic links. People periodically suggest that this behavior should be changed, but if there is a consensus on what it should be changed to, it is not apparent. (Various options in the &lsquo;<tt>modules</tt>&rsquo; file can be used to recreate symbolic links on checkout, update, etc.; see section [[#The modules file|The modules file]].)


----

<div id="import-examples"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#import output| &lt; ]]|</td>
<td valign="middle" align="left">|[[#import&mdash;Import sources into CVS, using vendor branches| Up ]]|</td>
<td valign="middle" align="left">|[[#log&mdash;Print out log information for files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="import-examples-1"></div>
==== import examples ====

See [[#Tracking third-party sources|Tracking third-party sources]], and [[#Creating a directory tree from a number of files|Creating a directory tree from a number of files]].


----

<div id="log"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#import examples| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#log options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="log_002d_002d_002dPrint-out-log-information-for-files"></div>
=== log&mdash;Print out log information for files ===
<div id="index-log-_0028subcommand_0029"></div>


* Synopsis: log <nowiki>[</nowiki>options<nowiki>]</nowiki> <nowiki>[</nowiki>files&hellip;<nowiki>]</nowiki>

* Requires: repository, working directory.

* Changes: nothing.

Display log information for files.  <code>log</code> used to
call the <small>RCS</small> utility <code>rlog</code>.  Although this
is no longer true in the current sources, this history
determines the format of the output and the options,
which are not quite in the style of the other <small>CVS</small>
commands.

<div id="index-Timezone_002c-in-output"></div>
<div id="index-Zone_002c-time_002c-in-output"></div>
The output includes the location of the <small>RCS</small> file,
the <em>head</em> revision (the latest revision on the
trunk), all symbolic names (tags) and some other
things.  For each revision, the revision number, the
author, the number of lines added/deleted and the log
message are printed.  All times are displayed in
Coordinated Universal Time (UTC).  (Other parts of
<small>CVS</small> print times in the local timezone).

'''Note: <code>log</code> uses &lsquo;<code>-R</code>&rsquo; in a way that conflicts
with the normal use inside <small>CVS</small> (see section [[#Common command options|Common command options]]).'''

 [[#log options|&bull; log options]]::                 log options
 [[#log examples|&bull; log examples]]::                log examples


----

<div id="log-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#log&mdash;Print out log information for files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#log&mdash;Print out log information for files| Up ]]|</td>
<td valign="middle" align="left">|[[#log examples| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="log-options-1"></div>
==== log options ====

By default, <code>log</code> prints all information that is
available.  All other options restrict the output.

;<code>-b</code>
: Print information about the revisions on the default branch, normally the highest branch on the trunk.

;<code>-d <var>dates</var></code>
: Print information about revisions with a checkin date/time in the range given by the semicolon-separated list of dates.  The date formats accepted are those accepted by the &lsquo;<code>-D</code>&rsquo; option to many other <small>CVS</small> commands (see section [[#Common command options|Common command options]]). Dates can be combined into ranges as follows:

:;<code><var>d1</var>&lt;<var>d2</var></code>
:;<code><var>d2</var>&gt;<var>d1</var></code>
:: Select the revisions that were deposited between <var>d1</var> and <var>d2</var>.

:;<code>&lt;<var>d</var></code>
:;<code><var>d</var>&gt;</code>
:: Select all revisions dated <var>d</var> or earlier.

:;<code><var>d</var>&lt;</code>
:;<code>&gt;<var>d</var></code>
:: Select all revisions dated <var>d</var> or later.

:;<code><var>d</var></code>
:: Select the single, latest revision dated <var>d</var> or earlier.

: The &lsquo;<code>&gt;</code>&rsquo; or &lsquo;<code>&lt;</code>&rsquo; characters may be followed by &lsquo;<code>=</code>&rsquo; to indicate an inclusive range rather than an exclusive one.

: Note that the separator is a semicolon (;).

;<code>-h</code>
: Print only the name of the <small>RCS</small> file, name of the file in the working directory, head, default branch, access list, locks, symbolic names, and suffix.

;<code>-l</code>
: Local; run only in current working directory.  (Default is to run recursively).

;<code>-N</code>
: Do not print the list of tags for this file.  This option can be very useful when your site uses a lot of tags, so rather than &quot;more&quot;&rsquo;ing over 3 pages of tag information, the log information is presented without tags at all.

;<code>-R</code>
: Print only the name of the <small>RCS</small> file.

;<code>-r<var>revisions</var></code>
: Print information about revisions given in the comma-separated list <var>revisions</var> of revisions and ranges.  The following table explains the available range formats:

:;<code><var>rev1</var>:<var>rev2</var></code>
:: Revisions <var>rev1</var> to <var>rev2</var> (which must be on the same branch).

:;<code><var>rev1</var>::<var>rev2</var></code>
:: The same, but excluding <var>rev1</var>.

:;<code>:<var>rev</var></code>
:;<code>::<var>rev</var></code>
:: Revisions from the beginning of the branch up to and including <var>rev</var>.

:;<code><var>rev</var>:</code>
:: Revisions starting with <var>rev</var> to the end of the branch containing <var>rev</var>.

:;<code><var>rev</var>::</code>
:: Revisions starting just after <var>rev</var> to the end of the branch containing <var>rev</var>.

:;<code><var>branch</var></code>
:: An argument that is a branch means all revisions on that branch.

:;<code><var>branch1</var>:<var>branch2</var></code>
:;<code><var>branch1</var>::<var>branch2</var></code>
:: A range of branches means all revisions on the branches in that range.

:;<code><var>branch</var>.</code>
:: The latest revision in <var>branch</var>.

: A bare &lsquo;<code>-r</code>&rsquo; with no revisions means the latest revision on the default branch, normally the trunk. There can be no space between the &lsquo;<code>-r</code>&rsquo; option and its argument.

;<code>-S</code>
: Suppress the header if no revisions are selected.

;<code>-s <var>states</var></code>
: Print information about revisions whose state attributes match one of the states given in the comma-separated list <var>states</var>.

;<code>-t</code>
: Print the same as &lsquo;<code>-h</code>&rsquo;, plus the descriptive text.

;<code>-w<var>logins</var></code>
: Print information about revisions checked in by users with login names appearing in the comma-separated list <var>logins</var>.  If <var>logins</var> is omitted, the user&rsquo;s login is assumed.  There can be no space between the &lsquo;<code>-w</code>&rsquo; option and its argument.

<code>log</code> prints the intersection of the revisions
selected with the options &lsquo;<code>-d</code>&rsquo;, &lsquo;<code>-s</code>&rsquo;, and
&lsquo;<code>-w</code>&rsquo;, intersected with the union of the revisions
selected by &lsquo;<code>-b</code>&rsquo; and &lsquo;<code>-r</code>&rsquo;.


----

<div id="log-examples"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#log options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#log&mdash;Print out log information for files| Up ]]|</td>
<td valign="middle" align="left">|[[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="log-examples-1"></div>
==== log examples ====

Contributed examples are gratefully accepted.


----

<div id="rdiff"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#log examples| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#rdiff options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="rdiff_002d_002d_002d_0027patch_0027-format-diffs-between-releases"></div>
=== rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases ===
<div id="index-rdiff-_0028subcommand_0029"></div>


* rdiff <nowiki>[</nowiki>-flags<nowiki>]</nowiki> <nowiki>[</nowiki>-V vn<nowiki>]</nowiki> <nowiki>[</nowiki>-r t|-D d <nowiki>[</nowiki>-r t2|-D d2<nowiki>]]</nowiki> modules&hellip;

* Requires: repository.

* Changes: nothing.

* Synonym: patch

Builds a Larry Wall format patch(1) file between two
releases, that can be fed directly into the <code>patch</code>
program to bring an old release up-to-date with the new
release.  (This is one of the few <small>CVS</small> commands that
operates directly from the repository, and doesn&rsquo;t
require a prior checkout.) The diff output is sent to
the standard output device.

You can specify (using the standard &lsquo;<code>-r</code>&rsquo; and
&lsquo;<code>-D</code>&rsquo; options) any combination of one or two
revisions or dates.  If only one revision or date is
specified, the patch file reflects differences between
that revision or date and the current head revisions in
the <small>RCS</small> file.

Note that if the software release affected is contained
in more than one directory, then it may be necessary to
specify the &lsquo;<code>-p</code>&rsquo; option to the <code>patch</code> command when
patching the old sources, so that <code>patch</code> is able to find
the files that are located in other directories.

 [[#rdiff options|&bull; rdiff options]]::               rdiff options
 [[#rdiff examples|&bull; rdiff examples]]::              rdiff examples


----

<div id="rdiff-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases| &lt; ]]|</td>
<td valign="middle" align="left">|[[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases| Up ]]|</td>
<td valign="middle" align="left">|[[#rdiff examples| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="rdiff-options-1"></div>
==== rdiff options ====

These standard options are supported by <code>rdiff</code>
(see section [[#Common command options|Common command options]], for a complete description of
them):

;<code>-D <var>date</var></code>
: Use the most recent revision no later than <var>date</var>.

;<code>-f</code>
: If no matching revision is found, retrieve the most recent revision (instead of ignoring the file).

;<code>-l</code>
: Local; don&rsquo;t descend subdirectories.

;<code>-R</code>
: Examine directories recursively.  This option is on by default.

;<code>-r <var>tag</var></code>
: Use revision <var>tag</var>.

In addition to the above, these options are available:

;<code>-c</code>
: Use the context diff format.  This is the default format.

;<code>-s</code>
: 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.

;<code>-t</code>
: 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.

;<code>-u</code>
: Use the unidiff format for the context diffs. Remember that old versions of the <code>patch</code> program can&rsquo;t handle the unidiff format, so if you plan to post this patch to the net you should probably not use &lsquo;<code>-u</code>&rsquo;.

;<code>-V <var>vn</var></code>
: Expand keywords according to the rules current in <small>RCS</small> version <var>vn</var> (the expansion format changed with <small>RCS</small> version 5).  Note that this option is no longer accepted.  <small>CVS</small> will always expand keywords the way that <small>RCS</small> version 5 does.


----

<div id="rdiff-examples"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#rdiff options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases| Up ]]|</td>
<td valign="middle" align="left">|[[#release&mdash;Indicate that a Module is no longer in use| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="rdiff-examples-1"></div>
==== rdiff examples ====

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

<div class="example" style="margin-left: 3.2em">
 $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \
 $$ Mail -s 'The patches you asked for' foo@example.net
</div>

Suppose you have made release 1.3, and forked a branch
called &lsquo;<code>R_1_3fix</code>&rsquo; for bugfixes.  &lsquo;<code>R_1_3_1</code>&rsquo;
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:

<div class="example" style="margin-left: 3.2em">
 $ 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
</div>


----

<div id="release"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#rdiff examples| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#release options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="release_002d_002d_002dIndicate-that-a-Module-is-no-longer-in-use"></div>
=== release&mdash;Indicate that a Module is no longer in use ===
<div id="index-release-_0028subcommand_0029"></div>


* release <nowiki>[</nowiki>-d<nowiki>]</nowiki> directories&hellip;

* Requires: Working directory.

* Changes: Working directory, history log.

This command is meant to safely cancel the effect of
&lsquo;<code>cvs checkout</code>&rsquo;.  Since <small>CVS</small> doesn&rsquo;t lock files, it
isn&rsquo;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 <small>CVS</small> history
file (see section [[#The history file|The history file]]) that you&rsquo;ve abandoned your
checkout.

Use &lsquo;<code>cvs release</code>&rsquo; to avoid these problems.  This
command checks that no uncommitted changes are
present; that you are executing it from immediately
above a <small>CVS</small> 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, &lsquo;<code>cvs release</code>&rsquo;
leaves a record of its execution (attesting to your
intentionally abandoning your checkout) in the <small>CVS</small>
history log.

 [[#release options|&bull; release options]]::             release options
 [[#release output|&bull; release output]]::              release output
 [[#release examples|&bull; release examples]]::            release examples


----

<div id="release-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#release&mdash;Indicate that a Module is no longer in use| &lt; ]]|</td>
<td valign="middle" align="left">|[[#release&mdash;Indicate that a Module is no longer in use| Up ]]|</td>
<td valign="middle" align="left">|[[#release output| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="release-options-1"></div>
==== release options ====

The <code>release</code> command supports one command option:

;<code>-d</code>
: 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 <code>release</code> command deletes all directories and files recursively.  This has the very serious side-effect that any directory that you have created inside your checked-out sources, and not added to the repository (using the <code>add</code> command; see section [[#Adding files to a directory|Adding files to a directory]]) will be silently deleted&mdash;even if it is non-empty!'''


----

<div id="release-output"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#release options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#release&mdash;Indicate that a Module is no longer in use| Up ]]|</td>
<td valign="middle" align="left">|[[#release examples| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="release-output-1"></div>
==== release output ====

Before <code>release</code> releases your sources it will
print a one-line message for any file that is not
up-to-date.

;<code>U <var>file</var></code>
;<code>P <var>file</var></code>
: There exists a newer revision of this file in the repository, and you have not modified your local copy of the file (&lsquo;<code>U</code>&rsquo; and &lsquo;<code>P</code>&rsquo; mean the same thing).

;<code>A <var>file</var></code>
: 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.

;<code>R <var>file</var></code>
: 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 section [[#commit&mdash;Check files into the repository|commit&mdash;Check files into the repository]].

;<code>M <var>file</var></code>
: The file is modified in your working directory.  There might also be a newer revision inside the repository.

;<code>? <var>file</var></code>
: <var>file</var> is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for <small>CVS</small> to ignore (see the description of the &lsquo;<code>-I</code>&rsquo; option, and see section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]]).  If you remove your working sources, this file will be lost.


----

<div id="release-examples"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#release output| &lt; ]]|</td>
<td valign="middle" align="left">|[[#release&mdash;Indicate that a Module is no longer in use| Up ]]|</td>
<td valign="middle" align="left">|[[#update&mdash;Bring work tree in sync with repository| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="release-examples-1"></div>
==== release examples ====

Release the &lsquo;<tt>tc</tt>&rsquo; directory, and delete your local working copy
of the files.

<div class="example" style="margin-left: 3.2em">
 $ cd ..         # <span class="roman" style="font-family:serif; font-weight:normal">You must stand immediately above the</span>
                 # <span class="roman" style="font-family:serif; font-weight:normal">sources when you issue &lsquo;<code>cvs release</code>&rsquo;.</span>
 $ cvs release -d tc
 You have <nowiki>[</nowiki>0<nowiki>]</nowiki> altered files in this repository.
 Are you sure you want to release (and delete) directory `tc': y
 $
</div>


----

<div id="update"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#release examples| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Guide to CVS commands| Up ]]|</td>
<td valign="middle" align="left">|[[#update options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="update_002d_002d_002dBring-work-tree-in-sync-with-repository"></div>
=== update&mdash;Bring work tree in sync with repository ===
<div id="index-update-_0028subcommand_0029"></div>


* update <nowiki>[</nowiki>-ACdflPpR<nowiki>]</nowiki> <nowiki>[</nowiki>-I name<nowiki>]</nowiki> <nowiki>[</nowiki>-j rev <nowiki>[</nowiki>-j rev<nowiki>]]</nowiki> <nowiki>[</nowiki>-k kflag<nowiki>]</nowiki> <nowiki>[</nowiki>-r tag|-D date<nowiki>]</nowiki> <nowiki>[</nowiki>-W spec<nowiki>]</nowiki> files&hellip;

* Requires: repository, working directory.

* Changes: working directory.

After you&rsquo;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 <code>update</code> command from
within your working directory to reconcile your work
with any revisions applied to the source repository
since your last checkout or update.  Without the <code>-C</code>
option, <code>update</code> will also merge any differences
between the local copy of files and their base revisions
into any destination revisions specified with <code>-r</code>,
<code>-D</code>, or <code>-A</code>.

 [[#update options|&bull; update options]]::              update options
 [[#update output|&bull; update output]]::               update output


----

<div id="update-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#update&mdash;Bring work tree in sync with repository| &lt; ]]|</td>
<td valign="middle" align="left">|[[#update&mdash;Bring work tree in sync with repository| Up ]]|</td>
<td valign="middle" align="left">|[[#update output| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="update-options-1"></div>
==== update options ====

These standard options are available with <code>update</code>
(see section [[#Common command options|Common command options]], for a complete description of
them):

;<code>-D date</code>
: Use the most recent revision no later than <var>date</var>. This option is sticky, and implies &lsquo;<code>-P</code>&rsquo;. See [[#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

;<code>-f</code>
: Only useful with the &lsquo;<code>-D <var>date</var></code>&rsquo; or &lsquo;<code>-r <var>tag</var></code>&rsquo; flags.  If no matching revision is found, retrieve the most recent revision (instead of ignoring the file).

;<code>-k <var>kflag</var></code>
: Process keywords according to <var>kflag</var>.  See [[#Keyword substitution|Keyword substitution]]. This option is sticky; future updates of this file in this working directory will use the same <var>kflag</var>.  The <code>status</code> command can be viewed to see the sticky options.  See [[#Quick reference to CVS commands|Quick reference to CVS commands]], for more information on the <code>status</code> command.

;<code>-l</code>
: Local; run only in current working directory.  See section [[#Recursive behavior|Recursive behavior]].

;<code>-P</code>
: Prune empty directories.  See [[#Moving and renaming directories|Moving and renaming directories]].

;<code>-p</code>
: Pipe files to the standard output.

;<code>-R</code>
: Update directories recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

;<code>-r rev</code>
: Retrieve revision/tag <var>rev</var>.  This option is sticky, and implies &lsquo;<code>-P</code>&rsquo;. See [[#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

These special options are also available with
<code>update</code>.

;<code>-A</code>
: Reset any sticky tags, dates, or &lsquo;<code>-k</code>&rsquo; options. See [[#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

;<code>-C</code>
: Overwrite locally modified files with clean copies from the repository (the modified file is saved in &lsquo;<tt>.#<var>file</var>.<var>revision</var></tt>&rsquo;, however).

;<code>-d</code>
: Create any directories that exist in the repository if they&rsquo;re missing from the working directory.  Normally, <code>update</code> 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 &lsquo;<code>-d</code>&rsquo; will create those directories, which may not be what you want.

;<code>-I <var>name</var></code>
: Ignore files whose names match <var>name</var> (in your working directory) during the update.  You can specify &lsquo;<code>-I</code>&rsquo; more than once on the command line to specify several files to ignore.  Use &lsquo;<code>-I !</code>&rsquo; to avoid ignoring any files at all.  See section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]], for other ways to make <small>CVS</small> ignore some files.

;<code>-W<var>spec</var></code>
: Specify file names that should be filtered during update.  You can use this option repeatedly.

: <var>spec</var> can be a file name pattern of the same type that you can specify in the &lsquo;<tt>.cvswrappers</tt>&rsquo; file. See section [[#The cvswrappers file|The cvswrappers file]].

;<code>-j<var>revision</var></code>
: With two &lsquo;<code>-j</code>&rsquo; options, merge changes from the revision specified with the first &lsquo;<code>-j</code>&rsquo; option to the revision specified with the second &lsquo;<code>j</code>&rsquo; option, into the working directory.

: With one &lsquo;<code>-j</code>&rsquo; option, merge changes from the ancestor revision to the revision specified with the &lsquo;<code>-j</code>&rsquo; 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 &lsquo;<code>-j</code>&rsquo; option.

: Note that using a single &lsquo;<code>-j <var>tagname</var></code>&rsquo; option rather than &lsquo;<code>-j <var>branchname</var></code>&rsquo; to merge changes from a branch will often not remove files which were removed on the branch. See section [[#Merging can add or remove files|Merging can add or remove files]], for more.

: In addition, each &lsquo;<code>-j</code>&rsquo; 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: &lsquo;<code>-j<var>Symbolic_Tag</var>:<var>Date_Specifier</var></code>&rsquo;.

: See section [[#Branching and merging|Branching and merging]].



----

<div id="update-output"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#update options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#update&mdash;Bring work tree in sync with repository| Up ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="update-output-1"></div>
==== update output ====

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

;<code>U <var>file</var></code>
: 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 source, and for files that you haven&rsquo;t changed but are not the most recent versions available in the repository.

;<code>P <var>file</var></code>
: Like &lsquo;<code>U</code>&rsquo;, but the <small>CVS</small> server sends a patch instead of an entire file.  This accomplishes the same thing as &lsquo;<code>U</code>&rsquo; using less bandwidth.

;<code>A <var>file</var></code>
: The file has been added to your private copy of the sources, and will be added to the source repository when you run <code>commit</code> on the file.  This is a reminder to you that the file needs to be committed.

;<code>R <var>file</var></code>
: The file has been removed from your private copy of the sources, and will be removed from the source repository when you run <code>commit</code> on the file.  This is a reminder to you that the file needs to be committed.

;<code>M <var>file</var></code>
: The file is modified in  your  working  directory.

: &lsquo;<code>M</code>&rsquo; can indicate one of two states for a file you&rsquo;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.

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

;<code>C <var>file</var></code>
<div id="index-_002e_0023-files"></div>
<div id="index-_005f_005f-files-_0028VMS_0029"></div>
: A conflict was detected while trying to merge your changes to <var>file</var> with changes from the source repository.  <var>file</var> (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 &lsquo;<tt>.#<var>file</var>.<var>revision</var></tt>&rsquo; where <var>revision</var> is the revision that your modified file started from.  Resolve the conflict as described in [[#Conflicts example|Conflicts example]]. (Note that some systems automatically purge files that begin with &lsquo;<tt>.#</tt>&rsquo; 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 <small>VMS</small>, the file name starts with &lsquo;<tt>__</tt>&rsquo; rather than &lsquo;<tt>.#</tt>&rsquo;.

;<code>? <var>file</var></code>
: <var>file</var> is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for <small>CVS</small> to ignore (see the description of the &lsquo;<code>-I</code>&rsquo; option, and see section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]]).


----

<div id="Invoking-CVS"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Guide to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#update output| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Quick-reference-to-CVS-commands"></div>
== Quick reference to CVS commands ==
<div id="index-Command-reference"></div>
<div id="index-Reference_002c-commands"></div>
<div id="index-Invoking-CVS"></div>

This appendix describes how to invoke <small>CVS</small>, with
references to where each command or feature is
described in detail.  For other references run the
<code>cvs --help</code> command, or see [[#Index|Index]].

A <small>CVS</small> command looks like:

<div class="example" style="margin-left: 3.2em">
 cvs <nowiki>[</nowiki> <var>global_options</var> <nowiki>]</nowiki> <var>command</var> <nowiki>[</nowiki> <var>command_options</var> <nowiki>]</nowiki> <nowiki>[</nowiki> <var>command_args</var> <nowiki>]</nowiki>
</div>

Global options:

;<code>--allow-root=<var>rootdir</var></code>
: Specify legal <small>CVSROOT</small> directory (server only) (not in <small>CVS</small> 1.9 and older).  See [[#Setting up the server for password authentication|Setting up the server for password authentication]].

;<code>-a</code>
: Authenticate all communication (client only) (not in <small>CVS</small> 1.9 and older).  See [[#Global options|Global options]].

;<code>-b</code>
: Specify RCS location (<small>CVS</small> 1.9 and older).  See [[#Global options|Global options]].

;<code>-d <var>root</var></code>
: Specify the <small>CVSROOT</small>.  See [[#The Repository|The Repository]].

;<code>-e <var>editor</var></code>
: Edit messages with <var>editor</var>.  See [[#Committing your changes|Committing your changes]].

;<code>-f</code>
: Do not read the &lsquo;<tt>~/.cvsrc</tt>&rsquo; file.  See [[#Global options|Global options]].

;<code>-H</code>
;<code>--help</code>
: Print a help message.  See [[#Global options|Global options]].

;<code>-l</code>
: Do not log in &lsquo;<tt>$CVSROOT/CVSROOT/history</tt>&rsquo; file.  See [[#Global options|Global options]].

;<code>-n</code>
: Do not change any files.  See [[#Global options|Global options]].

;<code>-Q</code>
: Be really quiet.  See [[#Global options|Global options]].

;<code>-q</code>
: Be somewhat quiet.  See [[#Global options|Global options]].

;<code>-r</code>
: Make new working files read-only.  See [[#Global options|Global options]].

;<code>-s <var>variable</var>=<var>value</var></code>
: Set a user variable.  See [[#Expansions in administrative files|Expansions in administrative files]].

;<code>-T <var>tempdir</var></code>
: Put temporary files in <var>tempdir</var>.  See [[#Global options|Global options]].

;<code>-t</code>
: Trace <small>CVS</small> execution.  See [[#Global options|Global options]].

;<code>-v</code>
;<code>--version</code>
: Display version and copyright information for <small>CVS</small>.

;<code>-w</code>
: Make new working files read-write.  See [[#Global options|Global options]].

;<code>-x</code>
: Encrypt all communication (client only). See [[#Global options|Global options]].

;<code>-z <var>gzip-level</var></code>
<div id="index-Compression-1"></div>
<div id="index-Gzip-1"></div>
: Set the compression level (client only). See [[#Global options|Global options]].

Keyword expansion modes (see section [[#Substitution modes|Substitution modes]]):

<div class="example" style="margin-left: 3.2em">
 -kkv  $<i></i>Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp $
 -kkvl $<i></i>Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
 -kk   $<i></i>Id$
 -kv   file1,v 1.1 1993/12/09 03:21:13 joe Exp
 -ko   <i>no expansion</i>
 -kb   <i>no expansion, file is binary</i>
</div>

Keywords (see section [[#Keyword List|Keyword List]]):

<div class="example" style="margin-left: 3.2em">
 $<i></i>Author: joe $
 $<i></i>Date: 1993/12/09 03:21:13 $
 $<i></i>CVSHeader: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
 $<i></i>Header: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
 $<i></i>Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
 $<i></i>Locker: harry $
 $<i></i>Name: snapshot_1_14 $
 $<i></i>RCSfile: file1,v $
 $<i></i>Revision: 1.1 $
 $<i></i>Source: /home/files/file1,v $
 $<i></i>State: Exp $
 $<i></i>Log: file1,v $
 Revision 1.1  1993/12/09 03:30:17  joe
 Initial revision
 
</div>

Commands, command options, and command arguments:

;<code>add <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Add a new file/directory.  See [[#Adding files to a directory|Adding files to a directory]].

:;<code>-k <var>kflag</var></code>
:: Set keyword expansion.

:;<code>-m <var>msg</var></code>
:: Set file description.

;<code>admin <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Administration of history files in the repository.  See [[#admin&mdash;Administration|admin&mdash;Administration]].

:;<code>-b<nowiki>[</nowiki><var>rev</var><nowiki>]</nowiki></code>
:: Set default branch.  See [[#Reverting to the latest vendor release|Reverting to the latest vendor release]].

:;<code>-c<var>string</var></code>
:: Set comment leader.

:;<code>-k<var>subst</var></code>
:: Set keyword substitution.  See [[#Keyword substitution|Keyword substitution]].

:;<code>-l<nowiki>[</nowiki><var>rev</var><nowiki>]</nowiki></code>
:: Lock revision <var>rev</var>, or latest revision.

:;<code>-m<var>rev</var>:<var>msg</var></code>
:: Replace the log message of revision <var>rev</var> with <var>msg</var>.

:;<code>-o<var>range</var></code>
:: Delete revisions from the repository.  See [[#admin options|admin options]].

:;<code>-q</code>
:: Run quietly; do not print diagnostics.

:;<code>-s<var>state</var><nowiki>[</nowiki>:<var>rev</var><nowiki>]</nowiki></code>
:: Set the state.

:;<code>-t</code>
:: Set file description from standard input.

:;<code>-t<var>file</var></code>
:: Set file description from <var>file</var>.

:;<code>-t-<var>string</var></code>
:: Set file description to <var>string</var>.

:;<code>-u<nowiki>[</nowiki><var>rev</var><nowiki>]</nowiki></code>
:: Unlock revision <var>rev</var>, or latest revision.

;<code>annotate <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Show last revision where each line was modified.  See [[#Annotate command|Annotate command]].

:;<code>-D <var>date</var></code>
:: Annotate the most recent revision no later than <var>date</var>.  See [[#Common command options|Common command options]].

:;<code>-F</code>
:: Force annotation of binary files.  (Without this option, binary files are skipped with a message.)

:;<code>-f</code>
:: Use head revision if tag/date not found.  See [[#Common command options|Common command options]].

:;<code>-l</code>
:: Local; run only in current working directory.  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>tag</var></code>
:: Annotate revision <var>tag</var>.  See [[#Common command options|Common command options]].

;<code>checkout <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>modules</var>&hellip;</code>
: Get a copy of the sources.  See [[#checkout&mdash;Check out sources for editing|checkout&mdash;Check out sources for editing]].

:;<code>-A</code>
:: Reset any sticky tags/date/options.  See [[#Sticky tags|Sticky tags]] and [[#Keyword substitution|Keyword substitution]].

:;<code>-c</code>
:: Output the module database.  See [[#checkout options|checkout options]].

:;<code>-D <var>date</var></code>
:: Check out revisions as of <var>date</var> (is sticky).  See [[#Common command options|Common command options]].

:;<code>-d <var>dir</var></code>
:: Check out into <var>dir</var>.  See [[#checkout options|checkout options]].

:;<code>-f</code>
:: Use head revision if tag/date not found.  See [[#Common command options|Common command options]].

:;<code>-j <var>rev</var></code>
:: Merge in changes.  See [[#checkout options|checkout options]].

:;<code>-k <var>kflag</var></code>
:: Use <var>kflag</var> keyword expansion.  See [[#Substitution modes|Substitution modes]].

:;<code>-l</code>
:: Local; run only in current working directory.  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-N</code>
:: Don&rsquo;t &ldquo;shorten&rdquo; module paths if -d specified.  See [[#checkout options|checkout options]].

:;<code>-n</code>
:: Do not run module program (if any).  See [[#checkout options|checkout options]].

:;<code>-P</code>
:: Prune empty directories.  See [[#Moving and renaming directories|Moving and renaming directories]].

:;<code>-p</code>
:: Check out files to standard output (avoids stickiness).  See [[#checkout options|checkout options]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>tag</var></code>
:: Checkout revision <var>tag</var> (is sticky).  See [[#Common command options|Common command options]].

:;<code>-s</code>
:: Like -c, but include module status.  See [[#checkout options|checkout options]].

;<code>commit <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Check changes into the repository.  See [[#commit&mdash;Check files into the repository|commit&mdash;Check files into the repository]].

:;<code>-F <var>file</var></code>
:: Read log message from <var>file</var>.  See [[#commit options|commit options]].

:;<code>-f</code>
:: Force the file to be committed; disables recursion. See [[#commit options|commit options]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-m <var>msg</var></code>
:: Use <var>msg</var> as log message.  See [[#commit options|commit options]].

:;<code>-n</code>
:: Do not run module program (if any).  See [[#commit options|commit options]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>rev</var></code>
:: Commit to <var>rev</var>.  See [[#commit options|commit options]].

;<code>diff <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Show differences between revisions.  See [[#diff&mdash;Show differences between revisions|diff&mdash;Show differences between revisions]]. In addition to the options shown below, accepts a wide variety of options to control output style, for example &lsquo;<code>-c</code>&rsquo; for context diffs.

:;<code>-D <var>date1</var></code>
:: Diff revision for date against working file.  See [[#diff options|diff options]].

:;<code>-D <var>date2</var></code>
:: Diff <var>rev1</var>/<var>date1</var> against <var>date2</var>.  See [[#diff options|diff options]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-N</code>
:: Include diffs for added and removed files.  See [[#diff options|diff options]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>rev1</var></code>
:: Diff revision for <var>rev1</var> against working file.  See [[#diff options|diff options]].

:;<code>-r <var>rev2</var></code>
:: Diff <var>rev1</var>/<var>date1</var> against <var>rev2</var>.  See [[#diff options|diff options]].

;<code>edit <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Get ready to edit a watched file.  See [[#How to edit a file which is being watched|How to edit a file which is being watched]].

:;<code>-a <var>actions</var></code>
:: Specify actions for temporary watch, where <var>actions</var> is <code>edit</code>, <code>unedit</code>, <code>commit</code>, <code>all</code>, or <code>none</code>.  See [[#How to edit a file which is being watched|How to edit a file which is being watched]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

;<code>editors <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: See who is editing a watched file.  See [[#Information about who is watching and editing|Information about who is watching and editing]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

;<code>export <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>modules</var>&hellip;</code>
: Export files from <small>CVS</small>.  See [[#export&mdash;Export sources from CVS, similar to checkout|export&mdash;Export sources from CVS, similar to checkout]].

:;<code>-D <var>date</var></code>
:: Check out revisions as of <var>date</var>.  See [[#Common command options|Common command options]].

:;<code>-d <var>dir</var></code>
:: Check out into <var>dir</var>.  See [[#export options|export options]].

:;<code>-f</code>
:: Use head revision if tag/date not found.  See [[#Common command options|Common command options]].

:;<code>-k <var>kflag</var></code>
:: Use <var>kflag</var> keyword expansion.  See [[#Substitution modes|Substitution modes]].

:;<code>-l</code>
:: Local; run only in current working directory.  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-N</code>
:: Don&rsquo;t &ldquo;shorten&rdquo; module paths if -d specified.  See [[#export options|export options]].

:;<code>-n</code>
:: Do not run module program (if any).  See [[#export options|export options]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>tag</var></code>
:: Checkout revision <var>tag</var>.  See [[#Common command options|Common command options]].

;<code>history <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Show repository access history.  See [[#history&mdash;Show status of files and users|history&mdash;Show status of files and users]].

:;<code>-a</code>
:: All users (default is self).  See [[#history options|history options]].

:;<code>-b <var>str</var></code>
:: Back to record with <var>str</var> in module/file/repos field.  See [[#history options|history options]].

:;<code>-c</code>
:: Report on committed (modified) files.  See [[#history options|history options]].

:;<code>-D <var>date</var></code>
:: Since <var>date</var>.  See [[#history options|history options]].

:;<code>-e</code>
:: Report on all record types.  See [[#history options|history options]].

:;<code>-l</code>
:: Last modified (committed or modified report).  See [[#history options|history options]].

:;<code>-m <var>module</var></code>
:: Report on <var>module</var> (repeatable).  See [[#history options|history options]].

:;<code>-n <var>module</var></code>
:: In <var>module</var>.  See [[#history options|history options]].

:;<code>-o</code>
:: Report on checked out modules.  See [[#history options|history options]].

:;<code>-p <var>repository</var></code>
:: In <var>repository</var>.  See [[#history options|history options]].

:;<code>-r <var>rev</var></code>
:: Since revision <var>rev</var>.  See [[#history options|history options]].

:;<code>-T</code>
:: Produce report on all TAGs.  See [[#history options|history options]].

:;<code>-t <var>tag</var></code>
:: Since tag record placed in history file (by anyone). See [[#history options|history options]].

:;<code>-u <var>user</var></code>
:: For user <var>user</var> (repeatable).  See [[#history options|history options]].

:;<code>-w</code>
:: Working directory must match.  See [[#history options|history options]].

:;<code>-x <var>types</var></code>
:: Report on <var>types</var>, one or more of <code>TOEFWUCGMAR</code>.  See [[#history options|history options]].

:;<code>-z <var>zone</var></code>
:: Output for time zone <var>zone</var>.  See [[#history options|history options]].

;<code>import <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>repository</var> <var>vendor-tag</var> <var>release-tags</var>&hellip;</code>
: Import files into <small>CVS</small>, using vendor branches.  See [[#import&mdash;Import sources into CVS, using vendor branches|import&mdash;Import sources into CVS, using vendor branches]].

:;<code>-b <var>bra</var></code>
:: Import to vendor branch <var>bra</var>.  See [[#Multiple vendor branches|Multiple vendor branches]].

:;<code>-d</code>
:: Use the file&rsquo;s modification time as the time of import.  See [[#import options|import options]].

:;<code>-k <var>kflag</var></code>
:: Set default keyword substitution mode.  See [[#import options|import options]].

:;<code>-m <var>msg</var></code>
:: Use <var>msg</var> for log message.  See [[#import options|import options]].

:;<code>-I <var>ign</var></code>
:: More files to ignore (! to reset).  See [[#import options|import options]].

:;<code>-W <var>spec</var></code>
:: More wrappers.  See [[#import options|import options]].

;<code>init</code>
: Create a <small>CVS</small> repository if it doesn&rsquo;t exist.  See [[#Creating a repository|Creating a repository]].

;<code>kserver</code>
: Kerberos authenticated server. See [[#Direct connection with kerberos|Direct connection with kerberos]].

;<code>log <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Print out history information for files.  See [[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]].

:;<code>-b</code>
:: Only list revisions on the default branch.  See [[#log options|log options]].

:;<code>-d <var>dates</var></code>
:: Specify dates (<var>d1</var>&lt;<var>d2</var> for range, <var>d</var> for latest before).  See [[#log options|log options]].

:;<code>-h</code>
:: Only print header.  See [[#log options|log options]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-N</code>
:: Do not list tags.  See [[#log options|log options]].

:;<code>-R</code>
:: Only print name of RCS file.  See [[#log options|log options]].

:;<code>-r<var>revs</var></code>
:: Only list revisions <var>revs</var>.  See [[#log options|log options]].

:;<code>-s <var>states</var></code>
:: Only list revisions with specified states.  See [[#log options|log options]].

:;<code>-t</code>
:: Only print header and descriptive text.  See [[#log options|log options]].

:;<code>-w<var>logins</var></code>
:: Only list revisions checked in by specified logins.  See [[#log options|log options]].

;<code>login</code>
: Prompt for password for authenticating server.  See [[#Using the client with password authentication|Using the client with password authentication]].

;<code>logout</code>
: Remove stored password for authenticating server.  See [[#Using the client with password authentication|Using the client with password authentication]].

;<code>pserver</code>
: Password authenticated server. See [[#Setting up the server for password authentication|Setting up the server for password authentication]].

;<code>rannotate <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>modules</var>&hellip;<nowiki>]</nowiki></code>
: Show last revision where each line was modified.  See [[#Annotate command|Annotate command]].

:;<code>-D <var>date</var></code>
:: Annotate the most recent revision no later than <var>date</var>.  See [[#Common command options|Common command options]].

:;<code>-F</code>
:: Force annotation of binary files.  (Without this option, binary files are skipped with a message.)

:;<code>-f</code>
:: Use head revision if tag/date not found.  See [[#Common command options|Common command options]].

:;<code>-l</code>
:: Local; run only in current working directory.  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>tag</var></code>
:: Annotate revision <var>tag</var>.  See [[#Common command options|Common command options]].

;<code>rdiff <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>modules</var>&hellip;</code>
: Show differences between releases.  See [[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases|rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases]].

:;<code>-c</code>
:: Context diff output format (default).  See [[#rdiff options|rdiff options]].

:;<code>-D <var>date</var></code>
:: Select revisions based on <var>date</var>.  See [[#Common command options|Common command options]].

:;<code>-f</code>
:: Use head revision if tag/date not found.  See [[#Common command options|Common command options]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>rev</var></code>
:: Select revisions based on <var>rev</var>.  See [[#Common command options|Common command options]].

:;<code>-s</code>
:: Short patch - one liner per file.  See [[#rdiff options|rdiff options]].

:;<code>-t</code>
:: Top two diffs - last change made to the file.  See [[#diff options|diff options]].

:;<code>-u</code>
:: Unidiff output format.  See [[#rdiff options|rdiff options]].

:;<code>-V <var>vers</var></code>
:: Use RCS Version <var>vers</var> for keyword expansion (obsolete).  See [[#rdiff options|rdiff options]].

;<code>release <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>directory</var></code>
: Indicate that a directory is no longer in use.  See [[#release&mdash;Indicate that a Module is no longer in use|release&mdash;Indicate that a Module is no longer in use]].

:;<code>-d</code>
:: Delete the given directory.  See [[#release options|release options]].

;<code>remove <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Remove an entry from the repository.  See [[#Removing files|Removing files]].

:;<code>-f</code>
:: Delete the file before removing it.  See [[#Removing files|Removing files]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

;<code>rlog <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Print out history information for modules.  See [[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]].

:;<code>-b</code>
:: Only list revisions on the default branch.  See [[#log options|log options]].

:;<code>-d <var>dates</var></code>
:: Specify dates (<var>d1</var>&lt;<var>d2</var> for range, <var>d</var> for latest before).  See [[#log options|log options]].

:;<code>-h</code>
:: Only print header.  See [[#log options|log options]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-N</code>
:: Do not list tags.  See [[#log options|log options]].

:;<code>-R</code>
:: Only print name of RCS file.  See [[#log options|log options]].

:;<code>-r<var>revs</var></code>
:: Only list revisions <var>revs</var>.  See [[#log options|log options]].

:;<code>-s <var>states</var></code>
:: Only list revisions with specified states.  See [[#log options|log options]].

:;<code>-t</code>
:: Only print header and descriptive text.  See [[#log options|log options]].

:;<code>-w<var>logins</var></code>
:: Only list revisions checked in by specified logins.  See [[#log options|log options]].

;<code>rtag <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>tag</var> <var>modules</var>&hellip;</code>
: Add a symbolic tag to a module. See [[#Revisions|Revisions]] and [[#Branching and merging|Branching and merging]].

:;<code>-a</code>
:: Clear tag from removed files that would not otherwise be tagged.  See [[#Tagging and adding and removing files|Tagging and adding and removing files]].

:;<code>-b</code>
:: Create a branch named <var>tag</var>.  See [[#Branching and merging|Branching and merging]].

:;<code>-B</code>
:: Used in conjunction with -F or -d, enables movement and deletion of branch tags.  Use with extreme caution. 

:;<code>-D <var>date</var></code>
:: Tag revisions as of <var>date</var>.  See [[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]].

:;<code>-d</code>
:: Delete <var>tag</var>.  See [[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]].

:;<code>-F</code>
:: Move <var>tag</var> if it already exists.  See [[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]].

:;<code>-f</code>
:: Force a head revision match if tag/date not found. See [[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-n</code>
:: No execution of tag program.  See [[#Common command options|Common command options]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>rev</var></code>
:: Tag existing tag <var>rev</var>.  See [[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]].

;<code>server</code>
: Rsh server.  See [[#Connecting with rsh|Connecting with rsh]].

;<code>status <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>files</var>&hellip;</code>
: Display status information in a working directory.  See [[#File status|File status]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-v</code>
:: Include tag information for file.  See [[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]].

;<code>tag <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <var>tag</var> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Add a symbolic tag to checked out version of files. See [[#Revisions|Revisions]] and [[#Branching and merging|Branching and merging]].

:;<code>-b</code>
:: Create a branch named <var>tag</var>.  See [[#Branching and merging|Branching and merging]].

:;<code>-c</code>
:: Check that working files are unmodified.  See [[#Specifying what to tag from the working directory|Specifying what to tag from the working directory]].

:;<code>-D <var>date</var></code>
:: Tag revisions as of <var>date</var>.  See [[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]].

:;<code>-d</code>
:: Delete <var>tag</var>.  See [[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]].

:;<code>-F</code>
:: Move <var>tag</var> if it already exists.  See [[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]].

:;<code>-f</code>
:: Force a head revision match if tag/date not found. See [[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>rev</var></code>
:: Tag existing tag <var>rev</var>.  See [[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]].

;<code>unedit <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Undo an edit command.  See [[#How to edit a file which is being watched|How to edit a file which is being watched]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

;<code>update <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: Bring work tree in sync with repository.  See [[#update&mdash;Bring work tree in sync with repository|update&mdash;Bring work tree in sync with repository]].

:;<code>-A</code>
:: Reset any sticky tags/date/options.  See [[#Sticky tags|Sticky tags]] and [[#Keyword substitution|Keyword substitution]].

:;<code>-C</code>
:: Overwrite locally modified files with clean copies from the repository (the modified file is saved in &lsquo;<tt>.#<var>file</var>.<var>revision</var></tt>&rsquo;, however).

:;<code>-D <var>date</var></code>
:: Check out revisions as of <var>date</var> (is sticky).  See [[#Common command options|Common command options]].

:;<code>-d</code>
:: Create directories.  See [[#update options|update options]].

:;<code>-f</code>
:: Use head revision if tag/date not found.  See [[#Common command options|Common command options]].

:;<code>-I <var>ign</var></code>
:: More files to ignore (! to reset).  See [[#import options|import options]].

:;<code>-j <var>rev</var></code>
:: Merge in changes.  See [[#update options|update options]].

:;<code>-k <var>kflag</var></code>
:: Use <var>kflag</var> keyword expansion.  See [[#Substitution modes|Substitution modes]].

:;<code>-l</code>
:: Local; run only in current working directory.  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-P</code>
:: Prune empty directories.  See [[#Moving and renaming directories|Moving and renaming directories]].

:;<code>-p</code>
:: Check out files to standard output (avoids stickiness).  See [[#update options|update options]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

:;<code>-r <var>tag</var></code>
:: Checkout revision <var>tag</var> (is sticky).  See [[#Common command options|Common command options]].

:;<code>-W <var>spec</var></code>
:: More wrappers.  See [[#import options|import options]].

;<code>version</code>
<div id="index-version-_0028subcommand_0029"></div>

: Display the version of <small>CVS</small> being used.  If the repository is remote, display both the client and server versions.

;<code>watch <nowiki>[</nowiki>on|off|add|remove<nowiki>]</nowiki> <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>

: on/off: turn on/off read-only checkouts of files.  See [[#Telling CVS to watch certain files|Telling CVS to watch certain files]].

: add/remove: add or remove notification on actions.  See [[#Telling CVS to notify you|Telling CVS to notify you]].

:;<code>-a <var>actions</var></code>
:: Specify actions for temporary watch, where <var>actions</var> is <code>edit</code>, <code>unedit</code>, <code>commit</code>, <code>all</code>, or <code>none</code>.  See [[#How to edit a file which is being watched|How to edit a file which is being watched]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].

;<code>watchers <nowiki>[</nowiki><var>options</var><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var>&hellip;<nowiki>]</nowiki></code>
: See who is watching a file.  See [[#Information about who is watching and editing|Information about who is watching and editing]].

:;<code>-l</code>
:: Local; run only in current working directory.  See [[#Recursive behavior|Recursive behavior]].

:;<code>-R</code>
:: Operate recursively (default).  See section [[#Recursive behavior|Recursive behavior]].



----

<div id="Administrative-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Quick reference to CVS commands| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Quick reference to CVS commands| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#The modules file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Reference-manual-for-Administrative-files"></div>
== Reference manual for Administrative files ==
<div id="index-Administrative-files-_0028reference_0029"></div>
<div id="index-Files_002c-reference-manual"></div>
<div id="index-Reference-manual-_0028files_0029"></div>
<div id="index-CVSROOT-_0028file_0029"></div>

Inside the repository, in the directory
&lsquo;<tt>$CVSROOT/CVSROOT</tt>&rsquo;, there are a number of
supportive files for <small>CVS</small>.  You can use <small>CVS</small> 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 [[#The administrative files|The administrative files]].

The most important of these files is the &lsquo;<tt>modules</tt>&rsquo;
file, which defines the modules inside the repository.

 [[#The modules file|&bull; modules]]::                     Defining modules
 [[#The cvswrappers file|&bull; Wrappers]]::                    Specify binary-ness based on file name
 [[#The commit support files|&bull; commit files]]::                The commit support files (commitinfo,
                                 verifymsg, editinfo, loginfo)
 [[#Rcsinfo|&bull; rcsinfo]]::                     Templates for the log messages
 [[#Ignoring files via cvsignore|&bull; cvsignore]]::                   Ignoring files via cvsignore
 [[#The checkoutlist file|&bull; checkoutlist]]::                Adding your own administrative files
 [[#The history file|&bull; history file]]::                History information
 [[#Expansions in administrative files|&bull; Variables]]::                   Various variables are expanded
 [[#The CVSROOT/config configuration file|&bull; config]]::                      Miscellaneous CVS configuration


----

<div id="modules"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#Alias modules| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-modules-file"></div>
=== The modules file ===
<div id="index-Modules-_0028admin-file_0029"></div>
<div id="index-Defining-modules-_0028reference-manual_0029"></div>

The &lsquo;<tt>modules</tt>&rsquo; file records your definitions of
names for collections of source code.  <small>CVS</small> will
use these definitions if you use <small>CVS</small> to update the
modules file (use normal commands like <code>add</code>,
<code>commit</code>, etc).

The &lsquo;<tt>modules</tt>&rsquo; file may contain blank lines and
comments (lines beginning with &lsquo;<code>#</code>&rsquo;) as well as
module definitions.  Long lines can be continued on the
next line by specifying a backslash (&lsquo;<code>\</code>&rsquo;) 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 &lsquo;<tt>first-dir</tt>&rsquo;, which
contains two files, &lsquo;<tt>file1</tt>&rsquo; and &lsquo;<tt>file2</tt>&rsquo;, and a
directory &lsquo;<tt>sdir</tt>&rsquo;.  &lsquo;<tt>first-dir/sdir</tt>&rsquo; contains
a file &lsquo;<tt>sfile</tt>&rsquo;.


 [[#Alias modules|&bull; Alias modules]]::             The simplest kind of module
 [[#Regular modules|&bull; Regular modules]]::
 [[#Ampersand modules|&bull; Ampersand modules]]::
 [[#Excluding directories|&bull; Excluding directories]]::     Excluding directories from a module
 [[#Module options|&bull; Module options]]::            Regular and ampersand modules can take options
 [[#How the modules file &ldquo;program options&rdquo; programs are run|&bull; Module program options]]::    How the modules ``program options<nowiki>''</nowiki> programs
                               are run. 


----

<div id="Alias-modules"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The modules file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The modules file| Up ]]|</td>
<td valign="middle" align="left">|[[#Regular modules| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Alias-modules-1"></div>
==== Alias modules ====
<div id="index-Alias-modules"></div>
<div id="index-_002da_002c-in-modules-file"></div>

Alias modules are the simplest kind of module:

;<code><var>mname</var> -a <var>aliases</var>&hellip;</code>
: This represents the simplest way of defining a module <var>mname</var>.  The &lsquo;<code>-a</code>&rsquo; flags the definition as a simple alias: <small>CVS</small> will treat any use of <var>mname</var> (as a command argument) as if the list of names <var>aliases</var> had been specified instead. <var>aliases</var> may contain either other module names or paths.  When you use paths in aliases, <code>checkout</code> creates all intermediate directories in the working directory, just as if the path had been specified explicitly in the <small>CVS</small> arguments.

For example, if the modules file contains:

<div class="example" style="margin-left: 3.2em">
 amodule -a first-dir
</div>

then the following two commands are equivalent:

<div class="example" style="margin-left: 3.2em">
 $ cvs co amodule
 $ cvs co first-dir
</div>

and they each would provide output such as:

<div class="example" style="margin-left: 3.2em">
 cvs checkout: Updating first-dir
 U first-dir/file1
 U first-dir/file2
 cvs checkout: Updating first-dir/sdir
 U first-dir/sdir/sfile
</div>


----

<div id="Regular-modules"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Alias modules| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The modules file| Up ]]|</td>
<td valign="middle" align="left">|[[#Ampersand modules| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Regular-modules-1"></div>
==== Regular modules ====
<div id="index-Regular-modules"></div>

;<code><var>mname</var> <nowiki>[</nowiki> options <nowiki>]</nowiki> <var>dir</var> <nowiki>[</nowiki> <var>files</var>&hellip; <nowiki>]</nowiki></code>
: In the simplest case, this form of module definition reduces to &lsquo;<code><var>mname</var> <var>dir</var></code>&rsquo;.  This defines all the files in directory <var>dir</var> as module mname. <var>dir</var> is a relative path (from <code>$CVSROOT</code>) to a directory of source in the source repository.  In this case, on checkout, a single directory called <var>mname</var> is created as a working directory; no intermediate directory levels are used by default, even if <var>dir</var> was a path involving several directory levels.

For example, if a module is defined by:

<div class="example" style="margin-left: 3.2em">
 regmodule first-dir
</div>

then regmodule will contain the files from first-dir:

<div class="example" style="margin-left: 3.2em">
 $ cvs co regmodule
 cvs checkout: Updating regmodule
 U regmodule/file1
 U regmodule/file2
 cvs checkout: Updating regmodule/sdir
 U regmodule/sdir/sfile
 $
</div>

By explicitly specifying files in the module definition
after <var>dir</var>, you can select particular files from
directory <var>dir</var>.  Here is
an example:

<div class="example" style="margin-left: 3.2em">
 regfiles first-dir/sdir sfile
</div>

With this definition, getting the regfiles module
will create a single working directory
&lsquo;<tt>regfiles</tt>&rsquo; containing the file listed, which
comes from a directory deeper
in the <small>CVS</small> source repository:

<div class="example" style="margin-left: 3.2em">
 $ cvs co regfiles
 U regfiles/sfile
 $
</div>


----

<div id="Ampersand-modules"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Regular modules| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The modules file| Up ]]|</td>
<td valign="middle" align="left">|[[#Excluding directories| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Ampersand-modules-1"></div>
==== Ampersand modules ====
<div id="index-Ampersand-modules"></div>
<div id="index-_0026_002c-in-modules-file"></div>

A module definition can refer to other modules by
including &lsquo;<code>&amp;<var>module</var></code>&rsquo; in its definition.
<div class="example" style="margin-left: 3.2em">
 <var>mname</var> <nowiki>[</nowiki> options <nowiki>]</nowiki> <var>&amp;module</var>&hellip;
</div>

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

<div class="example" style="margin-left: 3.2em">
 ampermod &amp;first-dir
</div>

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

<div class="example" style="margin-left: 3.2em">
 $ cvs co ampermod
</div>

will create the following files:

<div class="example" style="margin-left: 3.2em">
 ampermod/first-dir/file1
 ampermod/first-dir/file2
 ampermod/first-dir/sdir/sfile
</div>

There is one quirk/bug: the messages that <small>CVS</small>
prints omit the &lsquo;<tt>ampermod</tt>&rsquo;, and thus do not
correctly display the location to which it is checking
out the files:

<div class="example" style="margin-left: 3.2em">
 $ 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
 $
</div>

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



----

<div id="Excluding-directories"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Ampersand modules| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The modules file| Up ]]|</td>
<td valign="middle" align="left">|[[#Module options| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Excluding-directories-1"></div>
==== Excluding directories ====
<div id="index-Excluding-directories_002c-in-modules-file"></div>
<div id="index-_0021_002c-in-modules-file"></div>

An alias module may exclude particular directories from
other modules by using an exclamation mark (&lsquo;<code>!</code>&rsquo;)
before the name of each directory to be excluded.

For example, if the modules file contains:

<div class="example" style="margin-left: 3.2em">
 exmodule -a !first-dir/sdir first-dir
</div>

then checking out the module &lsquo;<code>exmodule</code>&rsquo; will check
out everything in &lsquo;<code>first-dir</code>&rsquo; except any files in
the subdirectory &lsquo;<code>first-dir/sdir</code>&rsquo;.


----

<div id="Module-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Excluding directories| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The modules file| Up ]]|</td>
<td valign="middle" align="left">|[[#How the modules file &ldquo;program options&rdquo; programs are run| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Module-options-1"></div>
==== Module options ====
<div id="index-Options_002c-in-modules-file"></div>

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

<div id="index-_002dd_002c-in-modules-file"></div>
;<code>-d <var>name</var></code>
: Name the working directory something other than the module name.

<div id="index-Export-program"></div>
<div id="index-_002de_002c-in-modules-file"></div>
;<code>-e <var>prog</var></code>
: Specify a program <var>prog</var> to run whenever files in a module are exported.  <var>prog</var> runs with a single argument, the module name.

<div id="index-Checkout-program"></div>
<div id="index-_002do_002c-in-modules-file"></div>
;<code>-o <var>prog</var></code>
: Specify a program <var>prog</var> to run whenever files in a module are checked out.  <var>prog</var> runs with a single argument, the module name.  See [[#How the modules file &ldquo;program options&rdquo; programs are run|How the modules file &ldquo;program options&rdquo; programs are run]] for information on how <var>prog</var> is called.

<div id="index-Status-of-a-module"></div>
<div id="index-Module-status"></div>
<div id="index-_002ds_002c-in-modules-file"></div>
;<code>-s <var>status</var></code>
: Assign a status to the module.  When the module file is printed with &lsquo;<code>cvs checkout -s</code>&rsquo; 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.

<div id="index-Tag-program"></div>
<div id="index-_002dt_002c-in-modules-file"></div>
;<code>-t <var>prog</var></code>
: Specify a program <var>prog</var> to run whenever files in a module are tagged with <code>rtag</code>.  <var>prog</var> runs with two arguments: the module name and the symbolic tag specified to <code>rtag</code>.  It is not run when <code>tag</code> is executed.  Generally you will find that taginfo is a better solution (see section [[#User-defined logging|User-defined logging]]).

You should also see see section [[#How the modules file &ldquo;program options&rdquo; programs are run|How the modules file &ldquo;program options&rdquo; programs are run]] about how the
&ldquo;program options&rdquo; programs are run.



----

<div id="Module-program-options"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Module options| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The modules file| Up ]]|</td>
<td valign="middle" align="left">|[[#The cvswrappers file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="How-the-modules-file-_0060_0060program-options_0027_0027-programs-are-run"></div>
==== How the modules file &ldquo;program options&rdquo; programs are run ====
<div id="index-Modules-file-program-options"></div>
<div id="index-_002dt_002c-in-modules-file-1"></div>
<div id="index-_002do_002c-in-modules-file-1"></div>
<div id="index-_002de_002c-in-modules-file-1"></div>

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

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

If using &ldquo;local access&rdquo; (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.



----

<div id="Wrappers"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#How the modules file &ldquo;program options&rdquo; programs are run| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#The commit support files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-cvswrappers-file"></div>
=== The cvswrappers file ===
<div id="index-cvswrappers-_0028admin-file_0029"></div>
<div id="index-CVSWRAPPERS_002c-environment-variable"></div>
<div id="index-Wrappers"></div>


Wrappers refers to a <small>CVS</small> feature which lets you
control certain settings based on the name of the file
which is being operated on.  The settings are &lsquo;<code>-k</code>&rsquo;
for binary files, and &lsquo;<code>-m</code>&rsquo; for nonmergeable text
files.

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

'''WARNING: do not use <code>COPY</code> with
<small>CVS</small> 1.9 or earlier - such versions of <small>CVS</small> will
copy one version of your file over the other, wiping
out the previous contents.'''
The &lsquo;<code>-m</code>&rsquo; wrapper option only affects behavior when
merging is done on update; it does not affect how files
are stored.  See [[#Handling binary files|Handling binary files]], for more on
binary files.

The basic format of the file &lsquo;<tt>cvswrappers</tt>&rsquo; is:

<div class="example" style="margin-left: 3.2em">
 wildcard     <nowiki>[</nowiki>option value<nowiki>][</nowiki>option value<nowiki>]</nowiki>...
 
 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.
</div>


For example, the following command imports a
directory, treating files whose name ends in
&lsquo;<code>.exe</code>&rsquo; as binary:

<div class="example" style="margin-left: 3.2em">
 cvs import -I ! -W &quot;*.exe -k 'b'&quot; first-dir vendortag reltag
</div>



----

<div id="commit-files"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The cvswrappers file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#The common syntax| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-commit-support-files"></div>
=== The commit support files ===
<div id="index-Committing_002c-administrative-support-files"></div>

The &lsquo;<code>-i</code>&rsquo; flag in the &lsquo;<tt>modules</tt>&rsquo; file can be
used to run a certain program whenever files are
committed (see section [[#The modules file|The modules file]]).  The files described in
this section provide other, more flexible, ways to run
programs whenever something is committed.

There are three kind of programs that can be run on
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.

;&lsquo;<tt>commitinfo</tt>&rsquo;
: 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.

;&lsquo;<tt>verifymsg</tt>&rsquo;
: 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 &lsquo;<tt>rcsinfo</tt>&rsquo; file, which can hold a log message template (see section [[#Rcsinfo|Rcsinfo]]).

;&lsquo;<tt>editinfo</tt>&rsquo;
: 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 &lsquo;<tt>rcsinfo</tt>&rsquo; file, which can hold a log message template (see section [[#Rcsinfo|Rcsinfo]]).  (obsolete)

;&lsquo;<tt>loginfo</tt>&rsquo;
: 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&hellip;  Your imagination is the limit!

 [[#The common syntax|&bull; syntax]]::                      The common syntax
 [[#Commitinfo|&bull; commitinfo]]::                  Pre-commit checking
 [[#Verifying log messages|&bull; verifymsg]]::                   How are log messages evaluated?
 [[#Editinfo|&bull; editinfo]]::                    Specifying how log messages are created
                                 (obsolete)
 [[#Loginfo|&bull; loginfo]]::                     Where should log messages be sent?


----

<div id="syntax"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The commit support files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The commit support files| Up ]]|</td>
<td valign="middle" align="left">|[[#Commitinfo| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-common-syntax"></div>
==== The common syntax ====
<div id="index-Info-files-_0028syntax_0029"></div>
<div id="index-Syntax-of-info-files"></div>
<div id="index-Common-syntax-of-info-files"></div>


The administrative files such as &lsquo;<tt>commitinfo</tt>&rsquo;,
&lsquo;<tt>loginfo</tt>&rsquo;, &lsquo;<tt>rcsinfo</tt>&rsquo;, &lsquo;<tt>verifymsg</tt>&rsquo;, etc.,
all have a common format.  The purpose of the files are
described later on.  The common syntax is described
here.

<div id="index-Regular-expression-syntax"></div>
Each line contains the following:

* A regular expression.  This is a basic regular expression in the syntax used by GNU emacs.


* A whitespace separator&mdash;one or more spaces and/or tabs.


* A file name or command-line template.

Blank lines are ignored.  Lines that start with the
character &lsquo;<code>#</code>&rsquo; 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.



----

<div id="commitinfo"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The common syntax| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The commit support files| Up ]]|</td>
<td valign="middle" align="left">|[[#Verifying log messages| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Commitinfo"></div>
==== Commitinfo ====
<div id="index-commitinfo"></div>
<div id="index-Commits_002c-precommit-verification-of"></div>
<div id="index-Precommit-checking"></div>

The &lsquo;<tt>commitinfo</tt>&rsquo; file defines programs to execute
whenever &lsquo;<code>cvs commit</code>&rsquo; 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&rsquo;s standards for coding practice.

As mentioned earlier, each line in the
&lsquo;<tt>commitinfo</tt>&rsquo; 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).

<div id="index-Exit-status_002c-of-commitinfo"></div>
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.

<div id="index-DEFAULT-in-commitinfo"></div>
If the repository name does not match any of the
regular expressions in this file, the &lsquo;<code>DEFAULT</code>&rsquo;
line is used, if it is specified.

<div id="index-ALL-in-commitinfo"></div>
All occurrences of the name &lsquo;<code>ALL</code>&rsquo; appearing as a
regular expression are used in addition to the first
matching regular expression or the name &lsquo;<code>DEFAULT</code>&rsquo;.

<div id="index-commitinfo_002c-working-directory"></div>
<div id="index-commitinfo_002c-command-environment"></div>
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 section [[#Remote repositories|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 section [[#The attic|The 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.



----

<div id="verifymsg"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Commitinfo| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The commit support files| Up ]]|</td>
<td valign="middle" align="left">|[[#Editinfo| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Verifying-log-messages"></div>
==== Verifying log messages ====
<div id="index-verifymsg-_0028admin-file_0029"></div>
<div id="index-Log-message_002c-verifying"></div>

Once you have entered a log message, you can evaluate
that message to check for specific content, such as
a bug ID.  Use the &lsquo;<tt>verifymsg</tt>&rsquo; 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 &lsquo;<tt>verifymsg</tt>&rsquo; file is often most useful together
with the &lsquo;<tt>rcsinfo</tt>&rsquo; file, which can be used to
specify a log message template.

Each line in the &lsquo;<tt>verifymsg</tt>&rsquo; 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 &lsquo;<code>ALL</code>&rsquo;
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.

<div id="index-DEFAULT-in-verifymsg"></div>
If the repository name does not match any of the
regular expressions in this file, the &lsquo;<code>DEFAULT</code>&rsquo;
line is used, if it is specified.

<div id="index-Exit-status_002c-of-verifymsg"></div>
If the verification script exits with a non-zero exit status,
the commit is aborted.

<div id="index-verifymsg_002c-changing-the-log-message"></div>
In the default configuration, CVS allows the
verification script to change the log message. This is
controlled via the RereadLogAfterVerify CVSROOT/config
option.

When &lsquo;<code>RereadLogAfterVerify=always</code>&rsquo; or
&lsquo;<code>RereadLogAfterVerify=stat</code>&rsquo;, 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 section [[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]], for more on CVSROOT/config options.

It is NOT a good idea for a &lsquo;<tt>verifymsg</tt>&rsquo; script to
interact directly with the user in the various
client/server methods. For the <code>pserver</code> method,
there is no protocol support for communicating between
&lsquo;<tt>verifymsg</tt>&rsquo; and the client on the remote end. For the
<code>ext</code> and <code>server</code> 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|Remote repositories]], for more
information on client/server setups.  In addition, at the time
the &lsquo;<tt>verifymsg</tt>&rsquo; 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 &lsquo;<tt>verifymsg</tt>&rsquo;.

An example of an update might be to change all
occurrences of &rsquo;BugId:&rsquo; to be &rsquo;DefectId:&rsquo; (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 &rsquo;BugID: none&rsquo; from the log message after
validation of that value as being allowed is made.

The following is a little silly example of a
&lsquo;<tt>verifymsg</tt>&rsquo; file, together with the corresponding
&lsquo;<tt>rcsinfo</tt>&rsquo; 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
&lsquo;<tt>/usr/cvssupport/tc.template</tt>&rsquo;.

<div class="example" style="margin-left: 3.2em">
 BugId:
</div>

The script &lsquo;<tt>/usr/cvssupport/bugid.verify</tt>&rsquo; is used to
evaluate the log message.

<div class="example" style="margin-left: 3.2em">
 #!/bin/sh
 #
 #       bugid.verify filename
 #
 #  Verify that the log message contains a valid bugid
 #  on the first line.
 #
 if head -1 &lt; $1 | grep '^BugId:<nowiki>[</nowiki> <nowiki>]</nowiki>*<nowiki>[</nowiki>0-9<nowiki>][</nowiki>0-9<nowiki>]</nowiki>*$' &gt; /dev/null; then
     exit 0
 elif head -1 &lt; $1 | grep '^BugId:<nowiki>[</nowiki> <nowiki>]</nowiki>*none$' &gt; /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:<nowiki>[</nowiki> <nowiki>]</nowiki>*none$' &gt; $1.rewrite
     mv $1.rewrite $1
     exit 0
 else
     echo &quot;No BugId found.&quot;
     exit 1
 fi
</div>

The &lsquo;<tt>verifymsg</tt>&rsquo; file contains this line:

<div class="example" style="margin-left: 3.2em">
 ^tc     /usr/cvssupport/bugid.verify
</div>

The &lsquo;<tt>rcsinfo</tt>&rsquo; file contains this line:

<div class="example" style="margin-left: 3.2em">
 ^tc     /usr/cvssupport/tc.template
</div>

The &lsquo;<tt>config</tt>&rsquo; file contains this line:

<div class="example" style="margin-left: 3.2em">
 RereadLogAfterVerify=always
</div>




----

<div id="editinfo"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Verifying log messages| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The commit support files| Up ]]|</td>
<td valign="middle" align="left">|[[#Editinfo example| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Editinfo"></div>
==== Editinfo ====
<div id="index-editinfo-_0028admin-file_0029"></div>
<div id="index-Editor_002c-specifying-per-module"></div>
<div id="index-Per_002dmodule-editor"></div>
<div id="index-Log-messages_002c-editing"></div>

'''Note: The &lsquo;<tt>editinfo</tt>&rsquo; feature has been
rendered obsolete.  To set a default editor for log
messages use the <code>CVSEDITOR</code>, <code>EDITOR</code> environment variables
(see section [[#All environment variables which affect CVS|All environment variables which affect CVS]]) or the &lsquo;<code>-e</code>&rsquo; global
option (see section [[#Global options|Global options]]).  See [[#Verifying log messages|Verifying log messages]],
for information on the use of the &lsquo;<tt>verifymsg</tt>&rsquo;
feature for evaluating log messages.'''

If you want to make sure that all log messages look the
same way, you can use the &lsquo;<tt>editinfo</tt>&rsquo; 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 &lsquo;<tt>editinfo</tt>&rsquo;
file, the editor specified in the environment variable
<code>$CVSEDITOR</code> is used instead.  If that variable is
not set, then the environment variable <code>$EDITOR</code>
is used instead.  If that variable is not
set a default will be used.  See [[#Committing your changes|Committing your changes]].

The &lsquo;<tt>editinfo</tt>&rsquo; file is often most useful together
with the &lsquo;<tt>rcsinfo</tt>&rsquo; file, which can be used to
specify a log message template.

Each line in the &lsquo;<tt>editinfo</tt>&rsquo; 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 &lsquo;<code>ALL</code>&rsquo;
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.

<div id="index-DEFAULT-in-editinfo"></div>
If the repository name does not match any of the
regular expressions in this file, the &lsquo;<code>DEFAULT</code>&rsquo;
line is used, if it is specified.

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

Note: when <small>CVS</small> is accessing a remote repository,
or when the &lsquo;<code>-m</code>&rsquo; or &lsquo;<code>-F</code>&rsquo; options to <code>cvs
commit</code> are used, &lsquo;<tt>editinfo</tt>&rsquo; will not be consulted.
There is no good workaround for this; use
&lsquo;<tt>verifymsg</tt>&rsquo; instead.

 [[#Editinfo example|&bull; editinfo example]]::            Editinfo example


----

<div id="editinfo-example"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Editinfo| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Editinfo| Up ]]|</td>
<td valign="middle" align="left">|[[#Loginfo| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Editinfo-example"></div>
===== Editinfo example =====

The following is a little silly example of a
&lsquo;<tt>editinfo</tt>&rsquo; file, together with the corresponding
&lsquo;<tt>rcsinfo</tt>&rsquo; 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
&lsquo;<tt>/usr/cvssupport/tc.template</tt>&rsquo;.

<div class="example" style="margin-left: 3.2em">
 BugId:
</div>

The script &lsquo;<tt>/usr/cvssupport/bugid.edit</tt>&rsquo; is used to
edit the log message.

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

The &lsquo;<tt>editinfo</tt>&rsquo; file contains this line:

<div class="example" style="margin-left: 3.2em">
 ^tc     /usr/cvssupport/bugid.edit
</div>

The &lsquo;<tt>rcsinfo</tt>&rsquo; file contains this line:

<div class="example" style="margin-left: 3.2em">
 ^tc     /usr/cvssupport/tc.template
</div>


----

<div id="loginfo"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Editinfo example| &lt; ]]|</td>
<td valign="middle" align="left">|[[#The commit support files| Up ]]|</td>
<td valign="middle" align="left">|[[#Loginfo example| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Loginfo"></div>
==== Loginfo ====
<div id="index-loginfo-_0028admin-file_0029"></div>
<div id="index-Storing-log-messages"></div>
<div id="index-Mailing-log-messages"></div>
<div id="index-Distributing-log-messages"></div>
<div id="index-Log-messages"></div>

The &lsquo;<tt>loginfo</tt>&rsquo; file is used to control where
&lsquo;<code>cvs commit</code>&rsquo; 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 <code>$CVSROOT</code>.  If a match is found, then
the remainder of the line is a filter program that
should expect log information on its standard input.

If the repository name does not match any of the
regular expressions in this file, the &lsquo;<code>DEFAULT</code>&rsquo;
line is used, if it is specified.

All occurrences of the name &lsquo;<code>ALL</code>&rsquo; appearing as a
regular expression are used in addition to the first
matching regular expression or &lsquo;<code>DEFAULT</code>&rsquo;.

The first matching regular expression is used.

See section [[#The commit support files|The commit support files]], for a description of the syntax of
the &lsquo;<tt>loginfo</tt>&rsquo; file.

The user may specify a format string as
part of the filter.  The string is composed of a
&lsquo;<code>%</code>&rsquo; followed by a space, or followed by a single
format character, or followed by a set of format
characters surrounded by &lsquo;<code><nowiki>{</nowiki></code>&rsquo; and &lsquo;<code><nowiki>}</nowiki></code>&rsquo; as
separators.  The format characters are:

;<tt>s</tt>
: file name
;<tt>V</tt>
: old version number (pre-checkin)
;<tt>v</tt>
: 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 &lsquo;<code>%</code>&rsquo;,
&lsquo;<code>%s</code>&rsquo;, &lsquo;<code>%<nowiki>{</nowiki>s<nowiki>}</nowiki></code>&rsquo;, and &lsquo;<code>%<nowiki>{</nowiki>sVv<nowiki>}</nowiki></code>&rsquo;.

The output will be a space separated string of tokens enclosed in
quotation marks (<tt>&quot;</tt>).
Any embedded dollar signs (<tt>$</tt>), backticks (<tt>&lsquo;</tt>),
backslashes (<tt>\</tt>), or quotation marks will be preceded
by a backslash (this allows the shell to correctly parse it
as a single string, regardless 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
&lsquo;<code>/u/src/master/yoyodyne/tc</code>&rsquo; is the repository, &lsquo;<code>%<nowiki>{</nowiki>sVv<nowiki>}</nowiki></code>&rsquo;
is the format string, and three files (<tt>ChangeLog</tt>,
<tt>Makefile</tt>, <tt>foo.c</tt>) were modified, the output
might be:

<div class="example" style="margin-left: 3.2em">
 &quot;yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13&quot;
</div>

As another example, &lsquo;<code>%<nowiki>{</nowiki><nowiki>}</nowiki></code>&rsquo; means that only the
name of the repository will be generated.

Note: when <small>CVS</small> is accessing a remote repository,
&lsquo;<tt>loginfo</tt>&rsquo; will be run on the ''remote''
(i.e., server) side, not the client side (see section [[#Remote repositories|Remote repositories]]).

 [[#Loginfo example|&bull; loginfo example]]::             Loginfo example
 [[#Keeping a checked out copy|&bull; Keeping a checked out copy]]::  Updating a tree on every checkin


----

<div id="loginfo-example"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Loginfo| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Loginfo| Up ]]|</td>
<td valign="middle" align="left">|[[#Keeping a checked out copy| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Loginfo-example"></div>
===== Loginfo example =====

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

<div class="example" style="margin-left: 3.2em">
 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
</div>

The shell-script &lsquo;<tt>/usr/local/bin/cvs-log</tt>&rsquo; looks
like this:

<div class="example" style="margin-left: 3.2em">
 #!/bin/sh
 (echo &quot;------------------------------------------------------&quot;;
  echo -n $2&quot;  &quot;;
  date;
  echo;
  cat) &gt;&gt; $1
</div>


----

<div id="Keeping-a-checked-out-copy"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Loginfo example| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Loginfo| Up ]]|</td>
<td valign="middle" align="left">|[[#Rcsinfo| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Keeping-a-checked-out-copy-1"></div>
===== Keeping a checked out copy =====

<div id="index-Keeping-a-checked-out-copy"></div>
<div id="index-Checked-out-copy_002c-keeping"></div>
<div id="index-Web-pages_002c-maintaining-with-CVS"></div>

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 <small>CVS</small> 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
<code>cvs update</code>.  Doing so in the naive way will
cause a problem with locks, so the <code>cvs update</code>
must be run in the background.
Here is an example for unix (this should all be on one line):

<div class="example" style="margin-left: 3.2em">
 ^cyclic-pages		(date; cat; (sleep 2; cd /u/www/local-docs;
  cvs -q update -d) &amp;) &gt;&gt; $CVSROOT/CVSROOT/updatelog 2&gt;&amp;1
</div>

This will cause checkins to repository directories
starting with <code>cyclic-pages</code> to update the checked
out tree in &lsquo;<tt>/u/www/local-docs</tt>&rsquo;.


----

<div id="rcsinfo"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Keeping a checked out copy| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#Ignoring files via cvsignore| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Rcsinfo"></div>
=== Rcsinfo ===
<div id="index-rcsinfo-_0028admin-file_0029"></div>
<div id="index-Form-for-log-message"></div>
<div id="index-Log-message-template"></div>
<div id="index-Template-for-log-message"></div>

The &lsquo;<tt>rcsinfo</tt>&rsquo; file can be used to specify a form to
edit when filling out the commit log.  The
&lsquo;<tt>rcsinfo</tt>&rsquo; file has a syntax similar to the
&lsquo;<tt>verifymsg</tt>&rsquo;, &lsquo;<tt>commitinfo</tt>&rsquo; and &lsquo;<tt>loginfo</tt>&rsquo;
files.  See section [[#The common syntax|The common 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 &lsquo;<code>DEFAULT</code>&rsquo;
line is used, if it is specified.

All occurrences of the name &lsquo;<code>ALL</code>&rsquo; appearing as a
regular expression are used in addition to the first
matching regular expression or &lsquo;<code>DEFAULT</code>&rsquo;.

The log message template will be used as a default log
message.  If you specify a log message with &lsquo;<code>cvs
commit -m <var>message</var></code>&rsquo; or &lsquo;<code>cvs commit -f
<var>file</var></code>&rsquo; that log message will override the
template.

See section [[#Verifying log messages|Verifying log messages]], for an example &lsquo;<tt>rcsinfo</tt>&rsquo;
file.

When <small>CVS</small> is accessing a remote repository,
the contents of &lsquo;<tt>rcsinfo</tt>&rsquo; at the time a directory
is first checked out will specify a template. This
template will be updated on all &lsquo;<code>cvs update</code>&rsquo;
commands. It will also be added to new directories
added with a &lsquo;<code>cvs add new-directry</code>&rsquo; command.
In versions of <small>CVS</small> prior to version 1.12, the
&lsquo;<tt>CVS/Template</tt>&rsquo; file was not updated. If the
<small>CVS</small> server is at version 1.12 or higher an older
client may be used and the &lsquo;<tt>CVS/Template</tt>&rsquo; will
be updated from the server.


----

<div id="cvsignore"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Rcsinfo| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#The checkoutlist file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Ignoring-files-via-cvsignore"></div>
=== Ignoring files via cvsignore ===
<div id="index-cvsignore-_0028admin-file_0029_002c-global"></div>
<div id="index-Global-cvsignore"></div>
<div id="index-Ignoring-files"></div>

There are certain file names that frequently occur
inside your working copy, but that you don&rsquo;t want to
put under <small>CVS</small> control.  Examples are all the object
files that you get while you compile your sources.
Normally, when you run &lsquo;<code>cvs update</code>&rsquo;, it prints a
line for each file it encounters that it doesn&rsquo;t know
about (see section [[#update output|update output]]).

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


* The list is initialized to include certain file name patterns: names associated with <small>CVS</small> 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:

<div id="index-Ignored-files"></div>
<div id="index-Automatically-ignored-files"></div>
<div class="example" style="margin-left: 3.2em">
     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
</div>


* The per-repository list in &lsquo;<tt>$CVSROOT/CVSROOT/cvsignore</tt>&rsquo; is appended to the list, if that file exists.


* The per-user list in &lsquo;<tt>.cvsignore</tt>&rsquo; in your home directory is appended to the list, if it exists.


* Any entries in the environment variable <code>$CVSIGNORE</code> is appended to the list.


* Any &lsquo;<code>-I</code>&rsquo; options given to <small>CVS</small> is appended.


* As <small>CVS</small> traverses through your directories, the contents of any &lsquo;<tt>.cvsignore</tt>&rsquo; will be appended to the list. The patterns found in &lsquo;<tt>.cvsignore</tt>&rsquo; 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 (&lsquo;<code>!</code>&rsquo;) clears the ignore list.
This can be used if you want to store any file which
normally is ignored by <small>CVS</small>.

Specifying &lsquo;<code>-I !</code>&rsquo; to <code>cvs import</code> 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 &lsquo;<tt>.cvsignore</tt>&rsquo; files, then
the patterns from those files will be processed even if
&lsquo;<code>-I !</code>&rsquo; is specified.  The only workaround is to
remove the &lsquo;<tt>.cvsignore</tt>&rsquo; files in order to do the
import.  Because this is awkward, in the future
&lsquo;<code>-I !</code>&rsquo; might be modified to override
&lsquo;<tt>.cvsignore</tt>&rsquo; 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 &lsquo;<tt>foo?bar</tt>&rsquo; to match a file
named &lsquo;<tt>foo bar</tt>&rsquo; (it also matches &lsquo;<tt>fooxbar</tt>&rsquo;
and the like).  Also note that there is currently no
way to specify comments.


----

<div id="checkoutlist"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Ignoring files via cvsignore| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#The history file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-checkoutlist-file"></div>
=== The checkoutlist file ===
<div id="index-checkoutlist"></div>

It may be helpful to use <small>CVS</small> to maintain your own
files in the &lsquo;<tt>CVSROOT</tt>&rsquo; directory.  For example,
suppose that you have a script &lsquo;<tt>logcommit.pl</tt>&rsquo;
which you run by including the following line in the
&lsquo;<tt>commitinfo</tt>&rsquo; administrative file:

<div class="example" style="margin-left: 3.2em">
 ALL   $CVSROOT/CVSROOT/logcommit.pl
</div>

To maintain &lsquo;<tt>logcommit.pl</tt>&rsquo; with <small>CVS</small> you would
add the following line to the &lsquo;<tt>checkoutlist</tt>&rsquo;
administrative file:

<div class="example" style="margin-left: 3.2em">
 logcommit.pl
</div>

The format of &lsquo;<tt>checkoutlist</tt>&rsquo; is one line for each
file that you want to maintain using <small>CVS</small>, giving
the name of the file.

After setting up &lsquo;<tt>checkoutlist</tt>&rsquo; in this fashion,
the files listed there will function just like
<small>CVS</small>&rsquo;s built-in administrative files.  For example,
when checking in one of the files you should get a
message such as:

<div class="example" style="margin-left: 3.2em">
 cvs commit: Rebuilding administrative file database
</div>

and the checked out copy in the &lsquo;<tt>CVSROOT</tt>&rsquo;
directory should be updated.

Note that listing &lsquo;<tt>passwd</tt>&rsquo; (see section [[#Setting up the server for password authentication|Setting up the server for password authentication]]) in &lsquo;<tt>checkoutlist</tt>&rsquo; is not
recommended for security reasons.

For information about keeping a checkout out copy in a
more general context than the one provided by
&lsquo;<tt>checkoutlist</tt>&rsquo;, see [[#Keeping a checked out copy|Keeping a checked out copy]].


----

<div id="history-file"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The checkoutlist file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#Expansions in administrative files| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-history-file"></div>
=== The history file ===
<div id="index-History-file"></div>
<div id="index-Log-information_002c-saving"></div>

The file &lsquo;<tt>$CVSROOT/CVSROOT/history</tt>&rsquo; is used
to log information for the <code>history</code> command
(see section [[#history&mdash;Show status of files and users|history&mdash;Show status of files and users]]).  This file must be created to turn
on logging.  This is done automatically if the
<code>cvs init</code> command is used to set up the
repository (see section [[#Creating a repository|Creating a repository]]).

The file format of the &lsquo;<tt>history</tt>&rsquo; file is
documented only in comments in the <small>CVS</small> source
code, but generally programs should use the <code>cvs
history</code> command to access it anyway, in case the
format changes with future releases of <small>CVS</small>.


----

<div id="Variables"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The history file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#The CVSROOT/config configuration file| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Expansions-in-administrative-files"></div>
=== Expansions in administrative files ===
<div id="index-Internal-variables"></div>
<div id="index-Variables"></div>

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

To find the home directory of the user running <small>CVS</small>
(from the <code>HOME</code> environment variable), use
&lsquo;<code>~</code>&rsquo; followed by &lsquo;<code>/</code>&rsquo; or the end of the line.
Likewise for the home directory of <var>user</var>, use
&lsquo;<code>~<var>user</var></code>&rsquo;.  These variables are expanded on
the server machine, and don&rsquo;t get any reasonable
expansion if pserver (see section [[#Direct connection with password authentication|Direct connection with password authentication]])
is in use; therefore user variables (see below) may be
a better choice to customize behavior based on the user
running <small>CVS</small>.

One may want to know about various pieces of
information internal to <small>CVS</small>.  A <small>CVS</small> internal
variable has the syntax <code>$<nowiki>{</nowiki><var>variable</var><nowiki>}</nowiki></code>,
where <var>variable</var> starts with a letter and consists
of alphanumeric characters and &lsquo;<code>_</code>&rsquo;.  If the
character following <var>variable</var> is a
non-alphanumeric character other than &lsquo;<code>_</code>&rsquo;, the
&lsquo;<code><nowiki>{</nowiki></code>&rsquo; and &lsquo;<code><nowiki>}</nowiki></code>&rsquo; can be omitted.  The <small>CVS</small>
internal variables are:

;<code>CVSROOT</code>
<div id="index-CVSROOT_002c-internal-variable"></div>
: This is the absolute path to the current <small>CVS</small> root directory. See section [[#The Repository|The 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.

;<code>RCSBIN</code>
<div id="index-RCSBIN_002c-internal-variable"></div>
: In <small>CVS</small> 1.9.18 and older, this specified the directory where <small>CVS</small> was looking for <small>RCS</small> programs.  Because <small>CVS</small> no longer runs <small>RCS</small> programs, specifying this internal variable is now an error.

;<code>CVSEDITOR</code>
<div id="index-CVSEDITOR_002c-internal-variable"></div>
;<code>EDITOR</code>
<div id="index-EDITOR_002c-internal-variable"></div>
;<code>VISUAL</code>
<div id="index-VISUAL_002c-internal-variable"></div>
: These all expand to the same value, which is the editor that <small>CVS</small> is using.  See section [[#Global options|Global options]], for how to specify this.

;<code>USER</code>
<div id="index-USER_002c-internal-variable"></div>
: Username of the user running <small>CVS</small> (on the <small>CVS</small> 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 section [[#Setting up the server for password authentication|Setting up the server for password authentication]]). 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 <small>CVS</small> can specify,
use a user variable.
<div id="index-User-variables"></div>
To expand a user variable, the
administrative file contains
<code>$<nowiki>{</nowiki>=<var>variable</var><nowiki>}</nowiki></code>.  To set a user variable,
specify the global option &lsquo;<code>-s</code>&rsquo; to <small>CVS</small>, with
argument <code><var>variable</var>=<var>value</var></code>.  It may be
particularly useful to specify this option via
&lsquo;<tt>.cvsrc</tt>&rsquo; (see section [[#Default options and the ~/.cvsrc file|Default options and the ~/.cvsrc file]]).

For example, if you want the administrative file to
refer to a test directory you might create a user
variable <code>TESTDIR</code>.  Then if <small>CVS</small> is invoked
as

<div class="example" style="margin-left: 3.2em">
 cvs -s TESTDIR=/work/local/tests
</div>

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

All other strings containing &lsquo;<code>$</code>&rsquo; are reserved;
there is no way to quote a &lsquo;<code>$</code>&rsquo; character so that
&lsquo;<code>$</code>&rsquo; represents itself.

Environment variables passed to administrative files are:

<div id="index-environment-variables_002c-passed-to-administrative-files"></div>

;<code>CVS_USER</code>
<div id="index-CVS_005fUSER_002c-environment-variable"></div>
: The <small>CVS</small>-specific username provided by the user, if it can be provided (currently just for the pserver access method), and to the empty string otherwise.  (<code>CVS_USER</code> and <code>USER</code> may differ when &lsquo;<tt>$CVSROOT/CVSROOT/passwd</tt>&rsquo; is used to map <small>CVS</small> usernames to system usernames.)

;<code>LOGNAME</code>
<div id="index-LOGNAME_002c-environment-variable"></div>
: The username of the system user.

;<code>USER</code>
<div id="index-USER_002c-environment-variable"></div>
: Same as <code>LOGNAME</code>. Do not confuse this with the internal variable of the same name.


----

<div id="config"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Expansions in administrative files| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Reference manual for Administrative files| Up ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="The-CVSROOT_002fconfig-configuration-file"></div>
=== The CVSROOT/config configuration file ===

<div id="index-config_002c-in-CVSROOT"></div>
<div id="index-CVSROOT_002fconfig"></div>

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

Currently defined keywords are:

<div id="index-RCSBIN_002c-in-CVSROOT_002fconfig"></div>
;<code>RCSBIN=<var>bindir</var></code>
: For <small>CVS</small> 1.9.12 through 1.9.18, this setting told <small>CVS</small> to look for <small>RCS</small> programs in the <var>bindir</var> directory.  Current versions of <small>CVS</small> do not run <small>RCS</small> programs; for compatibility this setting is accepted, but it does nothing.

<div id="index-SystemAuth_002c-in-CVSROOT_002fconfig"></div>
;<code>SystemAuth=<var>value</var></code>
: If <var>value</var> is &lsquo;<code>yes</code>&rsquo;, then pserver should check for users in the system&rsquo;s user database if not found in &lsquo;<tt>CVSROOT/passwd</tt>&rsquo;.  If it is &lsquo;<code>no</code>&rsquo;, then all pserver users must exist in &lsquo;<tt>CVSROOT/passwd</tt>&rsquo;. The default is &lsquo;<code>yes</code>&rsquo;.  For more on pserver, see [[#Direct connection with password authentication|Direct connection with password authentication]].


<div id="index-TopLevelAdmin_002c-in-CVSROOT_002fconfig"></div>
;<code>TopLevelAdmin=<var>value</var></code>
: Modify the &lsquo;<code>checkout</code>&rsquo; command to create a &lsquo;<code>CVS</code>&rsquo; directory at the top level of the new working directory, in addition to &lsquo;<code>CVS</code>&rsquo; directories created within checked-out directories. The default value is &lsquo;<code>no</code>&rsquo;.

: 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 &lsquo;<tt>CVS</tt>&rsquo; directory created there will mean you don&rsquo;t have to specify <code>CVSROOT</code> for each command.  It also provides a place for the &lsquo;<tt>CVS/Template</tt>&rsquo; file (see section [[#How data is stored in the working directory|How data is stored in the working directory]]).

<div id="index-LockDir_002c-in-CVSROOT_002fconfig"></div>
;<code>LockDir=<var>directory</var></code>
: Put <small>CVS</small> lock files in <var>directory</var> 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 <var>directory</var>, 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 <var>directory</var>, but <small>CVS</small> will create subdirectories of <var>directory</var> as it needs them.  For information on <small>CVS</small> locks, see [[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]].

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

<div id="index-LogHistory_002c-in-CVSROOT_002fconfig"></div>
;<code>LogHistory=<var>value</var></code>
: Control what is logged to the &lsquo;<tt>CVSROOT/history</tt>&rsquo; file (see section [[#history&mdash;Show status of files and users|history&mdash;Show status of files and users]]). Default of &lsquo;<code>TOEFWUCGMAR</code>&rsquo; (or simply &lsquo;<code>all</code>&rsquo;) will log all transactions.  Any subset of the default is legal.  (For example, to only log transactions that modify the &lsquo;<tt>*,v</tt>&rsquo; files, use &lsquo;<code>LogHistory=TMAR</code>&rsquo;.)

<div id="index-RereadLogAfterVerify_002c-in-CVSROOT_002fconfig"></div>
<div id="index-verifymsg_002c-changing-the-log-message-1"></div>
;<code>RereadLogAfterVerify=<var>value</var></code>
: Modify the &lsquo;<code>commit</code>&rsquo; command such that CVS will reread the log message after running the program specified by &lsquo;<tt>verifymsg</tt>&rsquo;. <var>value</var> may be one of &lsquo;<code>yes</code>&rsquo; or &lsquo;<code>always</code>&rsquo;, indicating that the log message should always be reread; &lsquo;<code>no</code>&rsquo; or &lsquo;<code>never</code>&rsquo;, indicating that it should never be reread; or <var>value</var> may be &lsquo;<code>stat</code>&rsquo;, indicating that the file should be checked with the filesystem &lsquo;<code>stat()</code>&rsquo; function to see if it has changed (see warning below) before rereading.  The default value is &lsquo;<code>always</code>&rsquo;.

: '''Note: the &lsquo;stat&rsquo; 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 section [[#Verifying log messages|Verifying log messages]], for more information on how verifymsg may be used.

<div id="index-UserAdminOptions_002c-in-CVSROOT_002fconfig-1"></div>
;<code>UserAdminOptions=<var>value</var></code>
: Control what options will be allowed with the <code>cvs admin</code> command (see section [[#admin&mdash;Administration|admin&mdash;Administration]]) for users not in the <code>cvsadmin</code> group. The <var>value</var> string is a list of single character options which should be allowed.  If a user who is not a member of the <code>cvsadmin</code> group tries to execute any <code>cvs admin</code> option which is not listed they will will receive an error message reporting that the option is restricted.

: If no <code>cvsadmin</code> group exists on the server, <small>CVS</small> will ignore the <code>UserAdminOptions</code> keyword (see section [[#admin&mdash;Administration|admin&mdash;Administration]]).

: When not specified, <code>UserAdminOptions</code> defaults to &lsquo;<code>k</code>&rsquo;.  In other words, it defaults to allowing users outside of the <code>cvsadmin</code> group to use the <code>cvs admin</code> command only to change the default keyword expansion mode for files.

: As an example, to restrict users not in the <code>cvsadmin</code> group to using <code>cvs admin</code> to change the default keyword substitution mode, lock revisions, unlock revisions, and replace the log message, use &lsquo;<code>UserAdminOptions=klum</code>&rsquo;.


----

<div id="Environment-variables"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Reference manual for Administrative files| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#The CVSROOT/config configuration file| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Compatibility between CVS Versions| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Compatibility between CVS Versions| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="All-environment-variables-which-affect-CVS"></div>
== All environment variables which affect CVS ==
<div id="index-Environment-variables"></div>
<div id="index-Reference-manual-for-variables"></div>

This is a complete list of all environment variables
that affect <small>CVS</small>.

<div id="index-CVSIGNORE_002c-environment-variable"></div>
;<code>$CVSIGNORE</code>
: A whitespace-separated list of file name patterns that <small>CVS</small> should ignore. See section [[#Ignoring files via cvsignore|Ignoring files via cvsignore]].

<div id="index-CVSWRAPPERS_002c-environment-variable-1"></div>
;<code>$CVSWRAPPERS</code>
: A whitespace-separated list of file name patterns that <small>CVS</small> should treat as wrappers. See section [[#The cvswrappers file|The cvswrappers file]].

<div id="index-CVSREAD_002c-environment-variable"></div>
<div id="index-Read_002donly-files_002c-and-CVSREAD"></div>
;<code>$CVSREAD</code>
: If this is set, <code>checkout</code> and <code>update</code> 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.

<div id="index-CVSREADONLYFS_002c-environment-variable"></div>
;<code>$CVSREADONLYFS</code>
: Turns on read-only repository mode. This allows one to check out from a read-only repository, such as within an anoncvs server, or from a CDROM repository.

: It has the same effect as if the &lsquo;<code>-R</code>&rsquo; command-line option is used. This can also allow the use of read-only NFS repositories.

;<code>$CVSUMASK</code>
: Controls permissions of files in the repository.  See [[#File permissions|File permissions]].

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

;<code>$CVSEDITOR</code>
<div id="index-CVSEDITOR_002c-environment-variable-1"></div>
;<code>$EDITOR</code>
<div id="index-EDITOR_002c-environment-variable-1"></div>
;<code>$VISUAL</code>
<div id="index-VISUAL_002c-environment-variable-1"></div>
: Specifies the program to use for recording log messages during commit.  <code>$CVSEDITOR</code> overrides <code>$EDITOR</code>, which overrides <code>$VISUAL</code>. See [[#Committing your changes|Committing your changes]] for more or [[#Global options|Global options]] for alternative ways of specifying a log editor.

<div id="index-PATH_002c-environment-variable"></div>
;<code>$PATH</code>
: If <code>$RCSBIN</code> is not set, and no path is compiled into <small>CVS</small>, it will use <code>$PATH</code> to try to find all programs it uses.

<div id="index-HOME_002c-environment-variable"></div>
;<code>$HOME</code>
<div id="index-HOMEPATH_002c-environment-variable"></div>
;<code>$HOMEPATH</code>
<div id="index-HOMEDRIVE_002c-environment-variable"></div>
;<code>$HOMEDRIVE</code>
: Used to locate the directory where the &lsquo;<tt>.cvsrc</tt>&rsquo; file, and other such files, are searched.  On Unix, <small>CVS</small> just checks for <code>HOME</code>.  On Windows NT, the system will set <code>HOMEDRIVE</code>, for example to &lsquo;<code>d:</code>&rsquo; and <code>HOMEPATH</code>, for example to &lsquo;<tt>\joe</tt>&rsquo;.  On Windows 95, you&rsquo;ll probably need to set <code>HOMEDRIVE</code> and <code>HOMEPATH</code> yourself.

<div id="index-CVS_005fRSH_002c-environment-variable"></div>
;<code>$CVS_RSH</code>
: Specifies the external program which <small>CVS</small> connects with, when <code>:ext:</code> access method is specified. see section [[#Connecting with rsh|Connecting with rsh]].

;<code>$CVS_SERVER</code>
: Used in client-server mode when accessing a remote repository using <small>RSH</small>.  It specifies the name of the program to start on the server side (and any necessary arguments) when accessing a remote repository using the <code>:ext:</code>, <code>:fork:</code>, or <code>:server:</code> access methods. The default value for <code>:ext:</code> and <code>:server:</code> is <code>cvs</code>; the default value for <code>:fork:</code> is the name used to run the client. see section [[#Connecting with rsh|Connecting with rsh]]

;<code>$CVS_PASSFILE</code>
: Used in client-server mode when accessing the <code>cvs login server</code>.  Default value is &lsquo;<tt>$HOME/.cvspass</tt>&rsquo;. see section [[#Using the client with password authentication|Using the client with password authentication]]

;<code>$CVS_CLIENT_PORT</code>
: Used in client-server mode to set the port to use when accessing the server via Kerberos, GSSAPI, or <small>CVS</small>&rsquo;s password authentication protocol if the port is not specified in the CVSROOT. see section [[#Remote repositories|Remote repositories]]

<div id="index-CVS_005fRCMD_005fPORT_002c-environment-variable"></div>
;<code>$CVS_RCMD_PORT</code>
: Used in client-server mode.  If set, specifies the port number to be used when accessing the <small>RCMD</small> demon on the server side. (Currently not used for Unix clients).

<div id="index-CVS_005fCLIENT_005fLOG_002c-environment-variable"></div>
;<code>$CVS_CLIENT_LOG</code>
: Used for debugging only in client-server mode.  If set, everything sent to the server is logged into &lsquo;<tt><code>$CVS_CLIENT_LOG</code>.in</tt>&rsquo; and everything sent from the server is logged into &lsquo;<tt><code>$CVS_CLIENT_LOG</code>.out</tt>&rsquo;.

<div id="index-CVS_005fSERVER_005fSLEEP_002c-environment-variable"></div>
;<code>$CVS_SERVER_SLEEP</code>
: 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.

<div id="index-CVS_005fIGNORE_005fREMOTE_005fROOT_002c-environment-variable"></div>
;<code>$CVS_IGNORE_REMOTE_ROOT</code>
: For <small>CVS</small> 1.10 and older, setting this variable prevents <small>CVS</small> from overwriting the &lsquo;<tt>CVS/Root</tt>&rsquo; file when the &lsquo;<code>-d</code>&rsquo; global option is specified. Later versions of <small>CVS</small> do not rewrite &lsquo;<tt>CVS/Root</tt>&rsquo;, so <code>CVS_IGNORE_REMOTE_ROOT</code> has no effect.

<div id="index-CVS_005fLOCAL_005fBRANCH_005fNUM_002c-environment-variable"></div>
;<code>$CVS_LOCAL_BRANCH_NUM</code>
: Setting this variable allows some control over the branch number that is assigned. This is specifically to support the local commit feature of CVSup. If one sets <code>CVS_LOCAL_BRANCH_NUM</code> to (say) 1000 then branches the local repository, the revision numbers will look like 1.66.1000.xx. There is almost a dead-set certainty that there will be no conflicts with version numbers.

<div id="index-COMSPEC_002c-environment-variable"></div>
;<code>$COMSPEC</code>
: Used under OS/2 only.  It specifies the name of the command interpreter and defaults to <small>CMD.EXE</small>.

<div id="index-TMPDIR_002c-environment-variable"></div>
;<code>$TMPDIR</code>
<div id="index-TMP_002c-environment-variable"></div>
;<code>$TMP</code>
<div id="index-TEMP_002c-environment-variable"></div>
;<code>$TEMP</code>
<div id="index-Temporary-files_002c-location-of"></div>
: Directory in which temporary files are located. The <small>CVS</small> server uses <code>TMPDIR</code>.  See section [[#Global options|Global options]], for a description of how to specify this. Some parts of <small>CVS</small> will always use &lsquo;<tt>/tmp</tt>&rsquo; (via the <code>tmpnam</code> function provided by the system).

: On Windows NT, <code>TMP</code> is used (via the <code>_tempnam</code> function provided by the system).

: The <code>patch</code> program which is used by the <small>CVS</small> client uses <code>TMPDIR</code>, and if it is not set, uses &lsquo;<tt>/tmp</tt>&rsquo; (at least with GNU patch 2.1).  Note that if your server and client are both running <small>CVS</small> 1.9.10 or later, <small>CVS</small> will not invoke an external <code>patch</code> program.

<div id="index-CVS_005fPID_002c-environment-variable"></div>
;<code>$CVS_PID</code>
: This is the process identification (aka pid) number of the <small>CVS</small> process. It is often useful in the programs and/or scripts specified by the &lsquo;<tt>commitinfo</tt>&rsquo;, &lsquo;<tt>verifymsg</tt>&rsquo;, &lsquo;<tt>loginfo</tt>&rsquo; files.


----

<div id="Compatibility"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#All environment variables which affect CVS| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#All environment variables which affect CVS| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Troubleshooting| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Troubleshooting| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Compatibility-between-CVS-Versions"></div>
== Compatibility between CVS Versions ==

<div id="index-CVS_002c-versions-of"></div>
<div id="index-Versions_002c-of-CVS"></div>
<div id="index-Compatibility_002c-between-CVS-versions"></div>
The repository format is compatible going back to
<small>CVS</small> 1.3.  But see [[#Using watches with old versions of CVS|Using watches with old versions of CVS]], if
you have copies of <small>CVS</small> 1.6 or older and you want
to use the optional developer communication features.

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

The remote protocol is interoperable going back to <small>CVS</small> 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 bugfixes, however.



----

<div id="Troubleshooting"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Compatibility between CVS Versions| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Compatibility between CVS Versions| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Partial list of error messages| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Credits| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Troubleshooting-1"></div>
== Troubleshooting ==

If you are having trouble with <small>CVS</small>, 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.

 [[#Partial list of error messages|&bull; Error messages]]::              Partial list of CVS errors
 [[#Trouble making a connection to a CVS server|&bull; Connection]]::                  Trouble making a connection to a CVS server
 [[#Other common problems|&bull; Other problems]]::              Problems not readily listed by error message



----

<div id="Error-messages"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Troubleshooting| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Troubleshooting| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Troubleshooting| Up ]]|</td>
<td valign="middle" align="left">|[[#Trouble making a connection to a CVS server| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Credits| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Partial-list-of-error-messages"></div>
=== Partial list of error messages ===

Here is a partial list of error messages that you may
see from <small>CVS</small>.  It is not a complete list&mdash;<small>CVS</small>
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 &lsquo;<code>cvs update: </code>&rsquo; is not considered in
ordering them.

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

;<code><var>file</var>:<var>line</var>: Assertion '<var>text</var>' failed</code>
: The exact format of this message may vary depending on your system.  It indicates a bug in <small>CVS</small>, which can be handled as described in [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]].

;<code>cvs <var>command</var>: authorization failed: server <var>host</var> rejected access</code>
: 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 <code>CVSROOT</code> specified is allowed by &lsquo;<code>--allow-root</code>&rsquo; in &lsquo;<tt>inetd.conf</tt>&rsquo;.  See [[#Direct connection with password authentication|Direct connection with password authentication]].

;<code>cvs <var>command</var>: conflict: removed <var>file</var> was modified by second party</code>
: This message indicates that you removed a file, and someone else modified it.  To resolve the conflict, first run &lsquo;<code>cvs add <var>file</var></code>&rsquo;.  If desired, look at the other party&rsquo;s modification to decide whether you still want to remove it.  If you don&rsquo;t want to remove it, stop here.  If you do want to remove it, proceed with &lsquo;<code>cvs remove <var>file</var></code>&rsquo; and commit your removal.

;<code>cannot change permissions on temporary directory</code>
<div class="example" style="margin-left: 3.2em">
 Operation not permitted
</div>
: 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&rsquo;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, &lsquo;<code>Operation not permitted</code>&rsquo; would be likely to read &lsquo;<code>Not owner</code>&rsquo; or whatever the system in question uses for the unix <code>EPERM</code> error.  If you have any information to add, please let us know as described in [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]].  If you experience this error while using <small>CVS</small>, retrying the operation which produced it should work fine.

;<code>cvs <nowiki>[</nowiki>server aborted<nowiki>]</nowiki>: Cannot check out files into the repository itself</code>
: The obvious cause for this message (especially for non-client/server <small>CVS</small>) is that the <small>CVS</small> root is, for example, &lsquo;<tt>/usr/local/cvsroot</tt>&rsquo; and you try to check out files when you are in a subdirectory, such as &lsquo;<tt>/usr/local/cvsroot/test</tt>&rsquo;.  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 &lsquo;<tt>/var/tmp</tt>&rsquo;; see <code>TMPDIR</code> in [[#All environment variables which affect CVS|All environment variables which affect CVS]], for how to set the temporary directory.

;<code>cannot commit files as 'root'</code>
: See &lsquo;<code>'root' is not allowed to commit files</code>&rsquo;.

;<code>cannot open CVS/Entries for reading: No such file or directory</code>
: This generally indicates a <small>CVS</small> internal error, and can be handled as with other <small>CVS</small> bugs (see section [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]).  Usually there is a workaround&mdash;the exact nature of which would depend on the situation but which hopefully could be figured out.

;<code>cvs <nowiki>[</nowiki>init aborted<nowiki>]</nowiki>: cannot open CVS/Root: No such file or directory</code>
: 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 <small>CVS</small>, but it is documented here for the benefit of <small>CVS</small> 1.9 and older.

;<code>cvs server: cannot open /root/.cvsignore: Permission denied</code>
;<code>cvs <nowiki>[</nowiki>server aborted<nowiki>]</nowiki>: can't chdir(/root): Permission denied</code>
: See [[#Trouble making a connection to a CVS server|Trouble making a connection to a CVS server]].

;<code>cvs <nowiki>[</nowiki>checkout aborted<nowiki>]</nowiki>: cannot rename file <var>file</var> to CVS/,,<var>file</var>: Invalid argument</code>
: This message has been reported as intermittently happening with <small>CVS</small> 1.9 on Solaris 2.5.  The cause is unknown; if you know more about what causes it, let us know as described in [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]].

;<code>cvs <nowiki>[</nowiki><var>command</var> aborted<nowiki>]</nowiki>: cannot start server via rcmd</code>
: This, unfortunately, is a rather nonspecific error message which <small>CVS</small> 1.9 will print if you are running the <small>CVS</small> client and it is having trouble connecting to the server.  Current versions of <small>CVS</small> should print a much more specific error message.  If you get this message when you didn&rsquo;t mean to run the client at all, you probably forgot to specify <code>:local:</code>, as described in [[#The Repository|The Repository]].

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

;<code>cvs checkout: could not check out <var>file</var></code>
: With <small>CVS</small> 1.9, this can mean that the <code>co</code> program (part of <small>RCS</small>) 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 <small>CVS</small>, which does not run <code>co</code>, if this message occurs without another error message, it is definitely a <small>CVS</small> bug (see section [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]).

;<code>cvs <nowiki>[</nowiki>login aborted<nowiki>]</nowiki>: could not find out home directory</code>
: This means that you need to set the environment variables that <small>CVS</small> uses to locate your home directory. See the discussion of <code>HOME</code>, <code>HOMEDRIVE</code>, and <code>HOMEPATH</code> in [[#All environment variables which affect CVS|All environment variables which affect CVS]].

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

;<code>cvs <nowiki>[</nowiki>update aborted<nowiki>]</nowiki>: could not patch <var>file</var>: No such file or directory</code>
: This means that there was a problem finding the <code>patch</code> program.  Make sure that it is in your <code>PATH</code>.  Note that despite appearances the message is ''not'' referring to whether it can find <var>file</var>. If both the client and the server are running a current version of <small>CVS</small>, 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 <small>CVS</small> 1.9, then you need <code>patch</code>.

;<code>cvs update: could not patch <var>file</var>; will refetch</code>
: 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 <small>CVS</small> does.

;<code>dying gasps from <var>server</var> unexpected</code>
: There is a known bug in the server for <small>CVS</small> 1.9.18 and older which can cause this.  For me, this was reproducible if I used the &lsquo;<code>-t</code>&rsquo; global option.  It was fixed by Andy Piper&rsquo;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 [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]].

;<code>end of file from server (consult above messages if any)</code>
: The most common cause for this message is if you are using an external <code>rsh</code> program and it exited with an error.  In this case the <code>rsh</code> program should have printed a message, which will appear before the above message.  For more information on setting up a <small>CVS</small> client and server, see [[#Remote repositories|Remote repositories]].

;<code>cvs <nowiki>[</nowiki>update aborted<nowiki>]</nowiki>: EOF in key in RCS file <var>file</var>,v</code>
;<code>cvs <nowiki>[</nowiki>checkout aborted<nowiki>]</nowiki>: EOF while looking for end of string in RCS file <var>file</var>,v</code>
: This means that there is a syntax error in the given <small>RCS</small> file.  Note that this might be true even if <small>RCS</small> can read the file OK; <small>CVS</small> does more error checking of errors in the RCS file.  That is why you may see this message when upgrading from <small>CVS</small> 1.9 to <small>CVS</small> 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 <small>CVS</small> seems to corrupting the file, by all means report it, (see section [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]). There are quite a few variations of this error message, depending on exactly where in the <small>RCS</small> file <small>CVS</small> finds the syntax error.

<div id="index-mkmodules"></div>
;<code>cvs commit: Executing 'mkmodules'</code>
: This means that your repository is set up for a version of <small>CVS</small> prior to <small>CVS</small> 1.8.  When using <small>CVS</small> 1.8 or later, the above message will be preceded by

<div class="example" style="margin-left: 3.2em">
 cvs commit: Rebuilding administrative file database
</div>

: 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 <small>CVS</small> 1.7 or earlier in use, remove <code>-i mkmodules</code> every place it appears in your <code>modules</code> file.  For more information on the <code>modules</code> file, see [[#The modules file|The modules file]].

;<code>missing author</code>
: Typically this can happen if you created an RCS file with your username set to empty.  <small>CVS</small> 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.

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

;<code>*PANIC* administration files missing</code>
: This typically means that there is a directory named <small>CVS</small> but it does not contain the administrative files which <small>CVS</small> puts in a CVS directory.  If the problem is that you created a CVS directory via some mechanism other than <small>CVS</small>, then the answer is simple, use a name other than <small>CVS</small>.  If not, it indicates a <small>CVS</small> bug (see section [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]).

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

;<code>cvs <nowiki>[</nowiki>server aborted<nowiki>]</nowiki>: received broken pipe signal</code>
: This message seems to be caused by a hard-to-track-down bug in <small>CVS</small> or the systems it runs on (we don&rsquo;t know&mdash;we haven&rsquo;t tracked it down yet!).  It seems to happen only after a <small>CVS</small> command has completed, and you should be able to just ignore the message. However, if you have discovered information concerning its cause, please let us know as described in [[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]].

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

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

;<code>cvs <nowiki>[</nowiki>update aborted<nowiki>]</nowiki>: unexpected EOF reading <var>file</var>,v</code>
: See &lsquo;<code>EOF in key in RCS file</code>&rsquo;.

;<code>cvs <nowiki>[</nowiki>login aborted<nowiki>]</nowiki>: unrecognized auth response from <var>server</var></code>
: This message typically means that the server is not set up properly.  For example, if &lsquo;<tt>inetd.conf</tt>&rsquo; points to a nonexistent cvs executable.  To debug it further, find the log file which inetd writes (&lsquo;<tt>/var/log/messages</tt>&rsquo; or whatever inetd uses on your system).  For details, see [[#Trouble making a connection to a CVS server|Trouble making a connection to a CVS server]], and [[#Setting up the server for password authentication|Setting up the server for password authentication]].

;<code>cvs commit: Up-to-date check failed for `<var>file</var>'</code>
: This means that someone else has committed a change to that file since the last time that you did a <code>cvs update</code>.  So before proceeding with your <code>cvs commit</code> you need to <code>cvs update</code>.  <small>CVS</small> 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 &lsquo;<code>M <var>file</var></code>&rsquo; and you are ready to <code>cvs commit</code>.  If it detects conflicts it will print a message saying so, will report &lsquo;<code>C <var>file</var></code>&rsquo;, and you need to manually resolve the conflict.  For more details on this process see [[#Conflicts example|Conflicts example]].

;<code>Usage:	diff3 <nowiki>[</nowiki>-exEX3 <nowiki>[</nowiki>-i | -m<nowiki>]</nowiki> <nowiki>[</nowiki>-L label1 -L label3<nowiki>]]</nowiki> file1 file2 file3</code>
<div class="example" style="margin-left: 3.2em">
 Only one of <nowiki>[</nowiki>exEX3<nowiki>]</nowiki> allowed
</div>
: This indicates a problem with the installation of <code>diff3</code> and <code>rcsmerge</code>.  Specifically <code>rcsmerge</code> 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 <small>CVS</small>, which does not rely on external <code>rcsmerge</code> or <code>diff3</code> programs.

;<code>warning: unrecognized response `<var>text</var>' from cvs server</code>
: If <var>text</var> contains a valid response (such as &lsquo;<code>ok</code>&rsquo;) 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 &lsquo;<code>:ext:</code>&rsquo; 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 &lsquo;<code>:server:</code>&rsquo; instead of &lsquo;<code>:ext:</code>&rsquo;.  If <var>text</var> is something else, this may signify a problem with your <small>CVS</small> server. Double-check your installation against the instructions for setting up the <small>CVS</small> server.

;<code>cvs commit: <nowiki>[</nowiki><var>time</var><nowiki>]</nowiki> waiting for <var>user</var>'s lock in <var>directory</var></code>
: This is a normal message, not an error.  See [[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]], for more details.

;<code>cvs commit: warning: editor session failed</code>
<div id="index-Exit-status_002c-of-editor"></div>
: This means that the editor which <small>CVS</small> 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 <code>CVSEDITOR</code> environment variable to a small script such as:

<div class="example" style="margin-left: 3.2em">
 #!/bin/sh
 vi $*
 exit 0
</div>



----

<div id="Connection"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Troubleshooting| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Partial list of error messages| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Troubleshooting| Up ]]|</td>
<td valign="middle" align="left">|[[#Other common problems| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Credits| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Trouble-making-a-connection-to-a-CVS-server"></div>
=== Trouble making a connection to a CVS server ===

This section concerns what to do if you are having
trouble making a connection to a <small>CVS</small> server.  If
you are running the <small>CVS</small> command line client
running on Windows, first upgrade the client to
<small>CVS</small> 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,
<small>CVS</small> 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.

<div id="index-_003aext_003a_002c-troubleshooting"></div>
;<code>:ext:</code>
: Try running the rsh program from the command line.  For example: &quot;rsh servername cvs -v&quot; should print <small>CVS</small> version information.  If this doesn&rsquo;t work, you need to fix it before you can worry about <small>CVS</small> problems.

<div id="index-_003aserver_003a_002c-troubleshooting"></div>
;<code>:server:</code>
: You don&rsquo;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<nowiki> :</nowiki>ext:.

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

: One good debugging tool is to &quot;telnet servername 2401&quot;.  After connecting, send any text (for example &quot;foo&quot; followed by return).  If <small>CVS</small> is working correctly, it will respond with

<div class="example" style="margin-left: 3.2em">
 cvs <nowiki>[</nowiki>pserver aborted<nowiki>]</nowiki>: bad auth protocol start: foo
</div>

: If instead you get:

<div class="example" style="margin-left: 3.2em">
 Usage: cvs <nowiki>[</nowiki>cvs-options<nowiki>]</nowiki> command <nowiki>[</nowiki>command-options-and-arguments<nowiki>]</nowiki>
 ...
</div>

: then you&rsquo;re missing the &lsquo;<code>pserver</code>&rsquo; command at the end of the line in &lsquo;<tt>inetd.conf</tt>&rsquo;; check to make sure that the entire command is on one line and that it&rsquo;s complete.

: Likewise, if you get something like:

<div class="example" style="margin-left: 3.2em">
 Unknown command: `pserved'
 
 CVS commands are:
         add          Add a new file/directory to the repository
 ...
</div>

: then you&rsquo;ve misspelled &lsquo;<code>pserver</code>&rsquo; in some way.  If it isn&rsquo;t obvious, check for invisible control characters (particularly carriage returns) in &lsquo;<tt>inetd.conf</tt>&rsquo;.

: If it fails to work at all, then make sure inetd is working right.  Change the invocation in &lsquo;<tt>inetd.conf</tt>&rsquo; to run the echo program instead of cvs.  For example:

<div class="example" style="margin-left: 3.2em">
 2401  stream  tcp  nowait  root /bin/echo echo hello
</div>

: After making that change and instructing inetd to re-read its configuration file, &quot;telnet servername 2401&quot; should show you the text hello and then the server should close the connection.  If this doesn&rsquo;t work, you need to fix it before you can worry about <small>CVS</small> problems.

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

: Another good debugging tool is the &lsquo;<code>-d</code>&rsquo; (debugging) option to inetd.  Consult your system documentation for more information.

: If you seem to be connecting but get errors like:

<div class="example" style="margin-left: 3.2em">
 cvs server: cannot open /root/.cvsignore: Permission denied
 cvs <nowiki>[</nowiki>server aborted<nowiki>]</nowiki>: can't chdir(/root): Permission denied
</div>

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

: If you can connect successfully for a while but then can&rsquo;t, you&rsquo;ve probably hit inetd&rsquo;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.)


----

<div id="Other-problems"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Troubleshooting| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Trouble making a connection to a CVS server| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Troubleshooting| Up ]]|</td>
<td valign="middle" align="left">|[[#Credits| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Credits| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Other-common-problems"></div>
=== 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 <small>CVS</small> command, it may mean that you have your home directory set to &lsquo;<tt>C:/</tt>&rsquo;, for example (see <code>HOMEDRIVE</code> and <code>HOMEPATH</code> in [[#All environment variables which affect CVS|All environment variables which affect CVS]]).  <small>CVS</small> expects the home directory to not end in a slash, for example &lsquo;<tt>C:</tt>&rsquo; or &lsquo;<tt>C:\cvs</tt>&rsquo;.


* If you are running <small>CVS</small> 1.9.18 or older, and <code>cvs update</code> finds a conflict and tries to merge, as described in [[#Conflicts example|Conflicts example]], but doesn&rsquo;t tell you there were conflicts, then you may have an old version of <small>RCS</small>.  The easiest solution probably is to upgrade to a current version of <small>CVS</small>, which does not rely on external <small>RCS</small> programs.


----

<div id="Credits"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Troubleshooting| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Other common problems| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Dealing with bugs in CVS or this manual| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Dealing with bugs in CVS or this manual| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Credits-1"></div>
== Credits ==

<div id="index-Contributors-_0028manual_0029"></div>
<div id="index-Credits-_0028manual_0029"></div>
Roland Pesch, then of Cygnus Support &lt;<tt>roland@wrs.com</tt>&gt;
wrote the manual pages which were distributed with
<small>CVS</small> 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 <code>info-cvs</code> is sometimes
informative. I have included information from postings
made by the following persons:
David G. Grubbs &lt;<tt>dgg@think.com</tt>&gt;.

Some text has been extracted from the man pages for
<small>RCS</small>.

The <small>CVS</small> <small>FAQ</small> by David G. Grubbs has provided
useful material.  The <small>FAQ</small> 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 <small>CVS</small>, at least).

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

<div class="display" style="margin-left: 3.2em; font-family: serif">
 Roxanne Brunskill &lt;<tt>rbrunski@datap.ca</tt>&gt;,
 Kathy Dyer &lt;<tt>dyer@phoenix.ocf.llnl.gov</tt>&gt;,
 Karl Pingle &lt;<tt>pingle@acuson.com</tt>&gt;,
 Thomas A Peterson &lt;<tt>tap@src.honeywell.com</tt>&gt;,
 Inge Wallin &lt;<tt>ingwa@signum.se</tt>&gt;,
 Dirk Koschuetzki &lt;<tt>koschuet@fmi.uni-passau.de</tt>&gt;
 and Michael Brown &lt;<tt>brown@wi.extrel.com</tt>&gt;.
</div>

The list of contributors here is not comprehensive; for a more
complete list of who has contributed to this manual see
the file &lsquo;<tt>doc/ChangeLog</tt>&rsquo; in the <small>CVS</small> source
distribution.


----

<div id="BUGS"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Credits| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Credits| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">|[[#Index| &gt; ]]|</td>
<td valign="middle" align="left">|[[#Index| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Dealing-with-bugs-in-CVS-or-this-manual"></div>
== Dealing with bugs in CVS or this manual ==

<div id="index-Bugs-in-this-manual-or-CVS"></div>
Neither <small>CVS</small> nor this manual is perfect, and they
probably never will be.  If you are having trouble
using <small>CVS</small>, 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 <small>CVS</small> itself.

<div id="index-Reporting-bugs"></div>
<div id="index-Bugs_002c-reporting"></div>
<div id="index-Errors_002c-reporting"></div>

* 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:

<div id="index-Ximbiot"></div>
<div id="index-Support_002c-getting-CVS-support"></div>
<div class="example" style="margin-left: 3.2em">
 Ximbiot
 319 S. River St.
 Harrisburg, PA  17104-1657
 USA
 Email: info@ximbiot.com
 Phone: (717) 579-6168
 Fax:   (717) 234-3125
 http://ximbiot.com/
 
</div>


* If you got <small>CVS</small> through a distributor, such as an operating system vendor or a vendor of freeware <small>CD-ROM</small>s, 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 <small>CVS</small>, see the file <small>HACKING</small> in the <small>CVS</small> source distribution.  It contains much more information on the process of submitting fixes.


* There may be resources on the net which can help.  Two good places to start are:

<div class="example" style="margin-left: 3.2em">
 http://www.cvshome.org
 http://www.loria.fr/~molli/cvs-index.html
</div>

* If you are so inspired, increasing the information available on the net is likely to be appreciated.  For example, before the standard <small>CVS</small> distribution worked on Windows 95, there was a web page with some explanation and patches for running <small>CVS</small> 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 <code>bug-cvs</code>. Note that someone may or may not want to do anything with your bug report&mdash;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 <code>bug-cvs@gnu.org</code>.  Note that submissions to <code>bug-cvs</code> may be distributed under the terms of the <small>GNU</small> Public License, so if you don&rsquo;t like this, don&rsquo;t submit them.  There is usually no justification for sending mail directly to one of the <small>CVS</small> maintainers rather than to <code>bug-cvs</code>; those maintainers who want to hear about such bug reports read <code>bug-cvs</code>.  Also note that sending a bug report to other mailing lists or newsgroups is ''not'' a substitute for sending it to <code>bug-cvs</code>.  It is fine to discuss <small>CVS</small> bugs on whatever forum you prefer, but there are not necessarily any maintainers reading bug reports sent anywhere except <code>bug-cvs</code>.

<div id="index-Known-bugs-in-this-manual-or-CVS"></div>
People often ask if there is a list of known bugs or
whether a particular bug is a known one.  The file
<small>BUGS</small> in the <small>CVS</small> source distribution is one
list of known bugs, but it doesn&rsquo;t necessarily try to
be comprehensive.  Perhaps there will never be a
comprehensive, detailed list of known bugs.


----

<div id="Index"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Dealing with bugs in CVS or this manual| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#Dealing with bugs in CVS or this manual| &lt; ]]|</td>
<td valign="middle" align="left">|[[#Top| Up ]]|</td>
<td valign="middle" align="left">[ &gt; ]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
<div id="Index-1"></div>
== Index ==
<div id="index-Index"></div>

<table cellpadding="1" cellspacing="1" border="0"><tr><th valign="top">Jump to:</th>
<td>[[#Index-1_cp_symbol-1|<b>!</b>]]</td>
<td>[[#Index-1_cp_symbol-2|<b>#</b>]]</td>
<td>[[#Index-1_cp_symbol-3|<b>&amp;</b>]]</td>
<td>[[#Index-1_cp_symbol-4|<b>-</b>]]</td>
<td>[[#Index-1_cp_symbol-5|<b>.</b>]]</td>
<td>[[#Index-1_cp_symbol-6|<b>/</b>]]</td>
<td>[[#Index-1_cp_symbol-7|<b>:</b>]]</td>
<td>[[#Index-1_cp_symbol-8|<b>&lt;</b>]]</td>
<td>[[#Index-1_cp_symbol-9|<b>=</b>]]</td>
<td>[[#Index-1_cp_symbol-10|<b>&gt;</b>]]</td>
<td>[[#Index-1_cp_symbol-11|<b>_</b>]]</td>
<td>[[#Index-1_cp_letter-A|<b>A</b>]]</td>
<td>[[#Index-1_cp_letter-B|<b>B</b>]]</td>
<td>[[#Index-1_cp_letter-C|<b>C</b>]]</td>
<td>[[#Index-1_cp_letter-D|<b>D</b>]]</td>
<td>[[#Index-1_cp_letter-E|<b>E</b>]]</td>
<td>[[#Index-1_cp_letter-F|<b>F</b>]]</td>
<td>[[#Index-1_cp_letter-G|<b>G</b>]]</td>
<td>[[#Index-1_cp_letter-H|<b>H</b>]]</td>
<td>[[#Index-1_cp_letter-I|<b>I</b>]]</td>
<td>[[#Index-1_cp_letter-J|<b>J</b>]]</td>
<td>[[#Index-1_cp_letter-K|<b>K</b>]]</td>
<td>[[#Index-1_cp_letter-L|<b>L</b>]]</td>
<td>[[#Index-1_cp_letter-M|<b>M</b>]]</td>
<td>[[#Index-1_cp_letter-N|<b>N</b>]]</td>
<td>[[#Index-1_cp_letter-O|<b>O</b>]]</td>
<td>[[#Index-1_cp_letter-P|<b>P</b>]]</td>
<td>[[#Index-1_cp_letter-R|<b>R</b>]]</td>
<td>[[#Index-1_cp_letter-S|<b>S</b>]]</td>
<td>[[#Index-1_cp_letter-T|<b>T</b>]]</td>
<td>[[#Index-1_cp_letter-U|<b>U</b>]]</td>
<td>[[#Index-1_cp_letter-V|<b>V</b>]]</td>
<td>[[#Index-1_cp_letter-W|<b>W</b>]]</td>
<td>[[#Index-1_cp_letter-X|<b>X</b>]]</td>
<td>[[#Index-1_cp_letter-Z|<b>Z</b>]]</td>
</tr></table>
<table class="index-cp" border="0">
<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-1"></div>!</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_0021_002c-in-modules-file|!, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Excluding directories|Excluding directories]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-2"></div>#</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002elock_002c-removing|#cvs.lock, removing]]</td><td>&nbsp;</td><td valign="top">[[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002elock_002c-technical-details|#cvs.lock, technical details]]</td><td>&nbsp;</td><td valign="top">[[#CVS locks in the repository|CVS locks in the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002erfl_002c-and-backups|#cvs.rfl, and backups]]</td><td>&nbsp;</td><td valign="top">[[#Backing up a repository|Backing up a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002erfl_002c-removing|#cvs.rfl, removing]]</td><td>&nbsp;</td><td valign="top">[[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002erfl_002c-technical-details|#cvs.rfl, technical details]]</td><td>&nbsp;</td><td valign="top">[[#CVS locks in the repository|CVS locks in the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002etfl|#cvs.tfl]]</td><td>&nbsp;</td><td valign="top">[[#CVS locks in the repository|CVS locks in the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002ewfl_002c-removing|#cvs.wfl, removing]]</td><td>&nbsp;</td><td valign="top">[[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-_0023cvs_002ewfl_002c-technical-details|#cvs.wfl, technical details]]</td><td>&nbsp;</td><td valign="top">[[#CVS locks in the repository|CVS locks in the repository]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-3"></div>&amp;</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_0026_002c-in-modules-file|&amp;, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Ampersand modules|Ampersand modules]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-4"></div>-</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_002da_002c-in-modules-file|-a, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Alias modules|Alias modules]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002dd_002c-in-modules-file|-d, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002de_002c-in-modules-file|-e, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002de_002c-in-modules-file-1|-e, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#How the modules file &ldquo;program options&rdquo; programs are run|How the modules file &ldquo;program options&rdquo; programs are run]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002dj-_0028merging-branches_0029|-j (merging branches)]]</td><td>&nbsp;</td><td valign="top">[[#Merging an entire branch|Merging an entire branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002dj-_0028merging-branches_0029_002c-and-keyword-substitution|-j (merging branches), and keyword substitution]]</td><td>&nbsp;</td><td valign="top">[[#Merging and keywords|Merging and keywords]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002dk-_0028keyword-substitution_0029|-k (keyword substitution)]]</td><td>&nbsp;</td><td valign="top">[[#Substitution modes|Substitution modes]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002dkk_002c-to-avoid-conflicts-during-a-merge|-kk, to avoid conflicts during a merge]]</td><td>&nbsp;</td><td valign="top">[[#Merging and keywords|Merging and keywords]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002do_002c-in-modules-file|-o, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002do_002c-in-modules-file-1|-o, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#How the modules file &ldquo;program options&rdquo; programs are run|How the modules file &ldquo;program options&rdquo; programs are run]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002ds_002c-in-modules-file|-s, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002dt_002c-in-modules-file|-t, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002dt_002c-in-modules-file-1|-t, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#How the modules file &ldquo;program options&rdquo; programs are run|How the modules file &ldquo;program options&rdquo; programs are run]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-5"></div>.</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_002e_0023-files|.# files]]</td><td>&nbsp;</td><td valign="top">[[#update output|update output]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002ebashrc_002c-setting-CVSROOT-in|.bashrc, setting CVSROOT in]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS where your repository is|Telling CVS where your repository is]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002ecshrc_002c-setting-CVSROOT-in|.cshrc, setting CVSROOT in]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS where your repository is|Telling CVS where your repository is]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002ecvsrc-file|.cvsrc file]]</td><td>&nbsp;</td><td valign="top">[[#Default options and the ~/.cvsrc file|Default options and the ~/.cvsrc file]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002eprofile_002c-setting-CVSROOT-in|.profile, setting CVSROOT in]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS where your repository is|Telling CVS where your repository is]]</td></tr>
<tr><td></td><td valign="top">[[#index-_002etcshrc_002c-setting-CVSROOT-in|.tcshrc, setting CVSROOT in]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS where your repository is|Telling CVS where your repository is]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-6"></div>/</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_002fusr_002flocal_002fcvsroot_002c-as-example-repository|/usr/local/cvsroot, as example repository]]</td><td>&nbsp;</td><td valign="top">[[#The Repository|The Repository]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-7"></div>:</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_003aext_003a_002c-setting-up|:ext:, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with rsh|Connecting with rsh]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003aext_003a_002c-troubleshooting|:ext:, troubleshooting]]</td><td>&nbsp;</td><td valign="top">[[#Trouble making a connection to a CVS server|Trouble making a connection to a CVS server]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003afork_003a_002c-setting-up|:fork:, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with fork|Connecting with fork]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003agserver_003a_002c-setting-up|:gserver:, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with GSSAPI|Direct connection with GSSAPI]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003akserver_003a_002c-setting-up|:kserver:, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with kerberos|Direct connection with kerberos]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003alocal_003a_002c-setting-up|:local:, setting up]]</td><td>&nbsp;</td><td valign="top">[[#The Repository|The Repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003apserver_003a_002c-setting-up|:pserver:, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Using the client with password authentication|Using the client with password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003apserver_003a_002c-troubleshooting|:pserver:, troubleshooting]]</td><td>&nbsp;</td><td valign="top">[[#Trouble making a connection to a CVS server|Trouble making a connection to a CVS server]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003aserver_003a_002c-setting-up|:server:, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with rsh|Connecting with rsh]]</td></tr>
<tr><td></td><td valign="top">[[#index-_003aserver_003a_002c-troubleshooting|:server:, troubleshooting]]</td><td>&nbsp;</td><td valign="top">[[#Trouble making a connection to a CVS server|Trouble making a connection to a CVS server]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-8"></div>&lt;</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_003c_003c_003c_003c_003c_003c_003c|&lt;&lt;&lt;&lt;&lt;&lt;&lt;]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-9"></div>=</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_003d_003d_003d_003d_003d_003d_003d|=======]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-10"></div>&gt;</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_003e_003e_003e_003e_003e_003e_003e|&gt;&gt;&gt;&gt;&gt;&gt;&gt;]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_symbol-11"></div>_</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-_005f_005f-files-_0028VMS_0029|__ files (VMS)]]</td><td>&nbsp;</td><td valign="top">[[#update output|update output]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-A"></div>A</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Abandoning-work|Abandoning work]]</td><td>&nbsp;</td><td valign="top">[[#How to edit a file which is being watched|How to edit a file which is being watched]]</td></tr>
<tr><td></td><td valign="top">[[#index-Access-a-branch|Access a branch]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-add-_0028subcommand_0029|add (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Adding files to a directory|Adding files to a directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Adding-a-tag|Adding a tag]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Adding-files|Adding files]]</td><td>&nbsp;</td><td valign="top">[[#Adding files to a directory|Adding files to a directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Admin-_0028subcommand_0029|Admin (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#admin&mdash;Administration|admin&mdash;Administration]]</td></tr>
<tr><td></td><td valign="top">[[#index-Administrative-files-_0028intro_0029|Administrative files (intro)]]</td><td>&nbsp;</td><td valign="top">[[#The administrative files|The administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Administrative-files-_0028reference_0029|Administrative files (reference)]]</td><td>&nbsp;</td><td valign="top">[[#Reference manual for Administrative files|Reference manual for Administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Administrative-files_002c-editing-them|Administrative files, editing them]]</td><td>&nbsp;</td><td valign="top">[[#Editing administrative files|Editing administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Alias-modules|Alias modules]]</td><td>&nbsp;</td><td valign="top">[[#Alias modules|Alias modules]]</td></tr>
<tr><td></td><td valign="top">[[#index-ALL-in-commitinfo|ALL in commitinfo]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Ampersand-modules|Ampersand modules]]</td><td>&nbsp;</td><td valign="top">[[#Ampersand modules|Ampersand modules]]</td></tr>
<tr><td></td><td valign="top">[[#index-annotate-_0028subcommand_0029|annotate (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Annotate command|Annotate command]]</td></tr>
<tr><td></td><td valign="top">[[#index-Atomic-transactions_002c-lack-of|Atomic transactions, lack of]]</td><td>&nbsp;</td><td valign="top">[[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Attic|Attic]]</td><td>&nbsp;</td><td valign="top">[[#The attic|The attic]]</td></tr>
<tr><td></td><td valign="top">[[#index-Authenticated-client_002c-using|Authenticated client, using]]</td><td>&nbsp;</td><td valign="top">[[#Using the client with password authentication|Using the client with password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Authenticating-server_002c-setting-up|Authenticating server, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Authentication_002c-stream|Authentication, stream]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Author-keyword|Author keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Automatically-ignored-files|Automatically ignored files]]</td><td>&nbsp;</td><td valign="top">[[#Ignoring files via cvsignore|Ignoring files via cvsignore]]</td></tr>
<tr><td></td><td valign="top">[[#index-Avoiding-editor-invocation|Avoiding editor invocation]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-B"></div>B</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Backing-up_002c-repository|Backing up, repository]]</td><td>&nbsp;</td><td valign="top">[[#Backing up a repository|Backing up a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Base-directory_002c-in-CVS-directory|Base directory, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-BASE_002c-as-reserved-tag-name|BASE, as reserved tag name]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-BASE_002c-special-tag|BASE, special tag]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Baserev-file_002c-in-CVS-directory|Baserev file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Baserev_002etmp-file_002c-in-CVS-directory|Baserev.tmp file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Bill-of-materials|Bill of materials]]</td><td>&nbsp;</td><td valign="top">[[#How your build system interacts with CVS|How your build system interacts with CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Binary-files|Binary files]]</td><td>&nbsp;</td><td valign="top">[[#Handling binary files|Handling binary files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch-merge-example|Branch merge example]]</td><td>&nbsp;</td><td valign="top">[[#Merging an entire branch|Merging an entire branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch-number|Branch number]]</td><td>&nbsp;</td><td valign="top">[[#Revision numbers|Revision numbers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch-number-1|Branch number]]</td><td>&nbsp;</td><td valign="top">[[#Branches and revisions|Branches and revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch-tags_002c-deleting|Branch tags, deleting]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch-tags_002c-moving|Branch tags, moving]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch_002c-accessing|Branch, accessing]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch_002c-check-out|Branch, check out]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch_002c-creating-a|Branch, creating a]]</td><td>&nbsp;</td><td valign="top">[[#Creating a branch|Creating a branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch_002c-identifying|Branch, identifying]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch_002c-retrieving|Branch, retrieving]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branch_002c-vendor_002d|Branch, vendor-]]</td><td>&nbsp;</td><td valign="top">[[#Tracking third-party sources|Tracking third-party sources]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branches-motivation|Branches motivation]]</td><td>&nbsp;</td><td valign="top">[[#What branches are good for|What branches are good for]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branches_002c-copying-changes-between|Branches, copying changes between]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branches_002c-sticky|Branches, sticky]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Branching|Branching]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Bringing-a-file-up-to-date|Bringing a file up to date]]</td><td>&nbsp;</td><td valign="top">[[#Bringing a file up to date|Bringing a file up to date]]</td></tr>
<tr><td></td><td valign="top">[[#index-Bugs-in-this-manual-or-CVS|Bugs in this manual or CVS]]</td><td>&nbsp;</td><td valign="top">[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</td></tr>
<tr><td></td><td valign="top">[[#index-Bugs_002c-reporting|Bugs, reporting]]</td><td>&nbsp;</td><td valign="top">[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</td></tr>
<tr><td></td><td valign="top">[[#index-Builds|Builds]]</td><td>&nbsp;</td><td valign="top">[[#How your build system interacts with CVS|How your build system interacts with CVS]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-C"></div>C</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Changes_002c-copying-between-branches|Changes, copying between branches]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Changing-a-log-message|Changing a log message]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Check-out-a-branch|Check out a branch]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Checked-out-copy_002c-keeping|Checked out copy, keeping]]</td><td>&nbsp;</td><td valign="top">[[#Keeping a checked out copy|Keeping a checked out copy]]</td></tr>
<tr><td></td><td valign="top">[[#index-Checking-out-source|Checking out source]]</td><td>&nbsp;</td><td valign="top">[[#Getting the source|Getting the source]]</td></tr>
<tr><td></td><td valign="top">[[#index-checkout-_0028subcommand_0029|checkout (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#checkout&mdash;Check out sources for editing|checkout&mdash;Check out sources for editing]]</td></tr>
<tr><td></td><td valign="top">[[#index-Checkout-program|Checkout program]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Checkout_002c-as-term-for-getting-ready-to-edit|Checkout, as term for getting ready to edit]]</td><td>&nbsp;</td><td valign="top">[[#How to edit a file which is being watched|How to edit a file which is being watched]]</td></tr>
<tr><td></td><td valign="top">[[#index-Checkout_002c-example|Checkout, example]]</td><td>&nbsp;</td><td valign="top">[[#Getting the source|Getting the source]]</td></tr>
<tr><td></td><td valign="top">[[#index-checkoutlist|checkoutlist]]</td><td>&nbsp;</td><td valign="top">[[#The checkoutlist file|The checkoutlist file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Choosing_002c-reserved-or-unreserved-checkouts|Choosing, reserved or unreserved checkouts]]</td><td>&nbsp;</td><td valign="top">[[#Choosing between reserved or unreserved checkouts|Choosing between reserved or unreserved checkouts]]</td></tr>
<tr><td></td><td valign="top">[[#index-Cleaning-up|Cleaning up]]</td><td>&nbsp;</td><td valign="top">[[#Cleaning up|Cleaning up]]</td></tr>
<tr><td></td><td valign="top">[[#index-Client_002fServer-Operation|Client/Server Operation]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Client_002fServer-Operation_002c-port-specification|Client/Server Operation, port specification]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Client_002fServer-Operation_002c-port-specification-1|Client/Server Operation, port specification]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-co-_0028subcommand_0029|co (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#checkout&mdash;Check out sources for editing|checkout&mdash;Check out sources for editing]]</td></tr>
<tr><td></td><td valign="top">[[#index-Command-reference|Command reference]]</td><td>&nbsp;</td><td valign="top">[[#Quick reference to CVS commands|Quick reference to CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-Command-structure|Command structure]]</td><td>&nbsp;</td><td valign="top">[[#Overall structure of CVS commands|Overall structure of CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-Comment-leader|Comment leader]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-commit-_0028subcommand_0029|commit (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#commit&mdash;Check files into the repository|commit&mdash;Check files into the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-commitinfo|&lsquo;<tt>commitinfo</tt>&rsquo;]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-commitinfo_002c-command-environment|&lsquo;<tt>commitinfo</tt>&rsquo;, command environment]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-commitinfo_002c-working-directory|&lsquo;<tt>commitinfo</tt>&rsquo;, working directory]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Commits_002c-precommit-verification-of|Commits, precommit verification of]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Committing-changes-to-files|Committing changes to files]]</td><td>&nbsp;</td><td valign="top">[[#Committing your changes|Committing your changes]]</td></tr>
<tr><td></td><td valign="top">[[#index-Committing_002c-administrative-support-files|Committing, administrative support files]]</td><td>&nbsp;</td><td valign="top">[[#The commit support files|The commit support files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Committing_002c-when-to|Committing, when to]]</td><td>&nbsp;</td><td valign="top">[[#When to commit?|When to commit?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Common-options|Common options]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Common-syntax-of-info-files|Common syntax of info files]]</td><td>&nbsp;</td><td valign="top">[[#The common syntax|The common syntax]]</td></tr>
<tr><td></td><td valign="top">[[#index-Compatibility_002c-between-CVS-versions|Compatibility, between CVS versions]]</td><td>&nbsp;</td><td valign="top">[[#Compatibility between CVS Versions|Compatibility between CVS Versions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Compression|Compression]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Compression-1|Compression]]</td><td>&nbsp;</td><td valign="top">[[#Quick reference to CVS commands|Quick reference to CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-COMSPEC_002c-environment-variable|COMSPEC, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-config_002c-in-CVSROOT|config, in CVSROOT]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Configuring-keyword-expansion|Configuring keyword expansion]]</td><td>&nbsp;</td><td valign="top">[[#Configuring Keyord Expansion|Configuring Keyord Expansion]]</td></tr>
<tr><td></td><td valign="top">[[#index-Conflict-markers|Conflict markers]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Conflict-resolution|Conflict resolution]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Conflicts-_0028merge-example_0029|Conflicts (merge example)]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Contributors-_0028CVS-program_0029|Contributors (CVS program)]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Contributors-_0028manual_0029|Contributors (manual)]]</td><td>&nbsp;</td><td valign="top">[[#Credits|Credits]]</td></tr>
<tr><td></td><td valign="top">[[#index-Copying-a-repository|Copying a repository]]</td><td>&nbsp;</td><td valign="top">[[#Moving a repository|Moving a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Copying-changes|Copying changes]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Correcting-a-log-message|Correcting a log message]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Creating-a-branch|Creating a branch]]</td><td>&nbsp;</td><td valign="top">[[#Creating a branch|Creating a branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-Creating-a-project|Creating a project]]</td><td>&nbsp;</td><td valign="top">[[#Starting a project with CVS|Starting a project with CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Creating-a-repository|Creating a repository]]</td><td>&nbsp;</td><td valign="top">[[#Creating a repository|Creating a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Credits-_0028CVS-program_0029|Credits (CVS program)]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Credits-_0028manual_0029|Credits (manual)]]</td><td>&nbsp;</td><td valign="top">[[#Credits|Credits]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS-1_002e6_002c-and-watches|CVS 1.6, and watches]]</td><td>&nbsp;</td><td valign="top">[[#Using watches with old versions of CVS|Using watches with old versions of CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS-command-structure|CVS command structure]]</td><td>&nbsp;</td><td valign="top">[[#Overall structure of CVS commands|Overall structure of CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS-directory_002c-in-repository|CVS directory, in repository]]</td><td>&nbsp;</td><td valign="top">[[#The CVS directory in the repository|The CVS directory in the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS-directory_002c-in-working-directory|CVS directory, in working directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS-passwd-file|CVS passwd file]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002c-history-of|CVS, history of]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002c-introduction-to|CVS, introduction to]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002c-versions-of|CVS, versions of]]</td><td>&nbsp;</td><td valign="top">[[#Compatibility between CVS Versions|Compatibility between CVS Versions]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fBase-directory|CVS/Base directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fBaserev-file|CVS/Baserev file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fBaserev_002etmp-file|CVS/Baserev.tmp file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fEntries-file|CVS/Entries file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fEntries_002eBackup-file|CVS/Entries.Backup file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fEntries_002eLog-file|CVS/Entries.Log file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fEntries_002eStatic-file|CVS/Entries.Static file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fNotify-file|CVS/Notify file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fNotify_002etmp-file|CVS/Notify.tmp file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fRepository-file|CVS/Repository file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fRoot-file|CVS/Root file]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS where your repository is|Telling CVS where your repository is]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fTag-file|CVS/Tag file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_002fTemplate-file|CVS/Template file]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-cvsadmin|cvsadmin]]</td><td>&nbsp;</td><td valign="top">[[#admin&mdash;Administration|admin&mdash;Administration]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSEDITOR_002c-environment-variable|CVSEDITOR, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Committing your changes|Committing your changes]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSEDITOR_002c-environment-variable-1|CVSEDITOR, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSEDITOR_002c-internal-variable|CVSEDITOR, internal variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSHeader-keyword|CVSHeader keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-cvsignore-_0028admin-file_0029_002c-global|cvsignore (admin file), global]]</td><td>&nbsp;</td><td valign="top">[[#Ignoring files via cvsignore|Ignoring files via cvsignore]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSIGNORE_002c-environment-variable|CVSIGNORE, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSREAD_002c-environment-variable|CVSREAD, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSREAD_002c-overriding|CVSREAD, overriding]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSREADONLYFS_002c-environment-variable|CVSREADONLYFS, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-cvsroot|cvsroot]]</td><td>&nbsp;</td><td valign="top">[[#The Repository|The Repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT-_0028file_0029|CVSROOT (file)]]</td><td>&nbsp;</td><td valign="top">[[#Reference manual for Administrative files|Reference manual for Administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002c-environment-variable|CVSROOT, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS where your repository is|Telling CVS where your repository is]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002c-internal-variable|CVSROOT, internal variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002c-module-name|CVSROOT, module name]]</td><td>&nbsp;</td><td valign="top">[[#The administrative files|The administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002c-multiple-repositories|CVSROOT, multiple repositories]]</td><td>&nbsp;</td><td valign="top">[[#Multiple repositories|Multiple repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002c-overriding|CVSROOT, overriding]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002c-storage-of-files|CVSROOT, storage of files]]</td><td>&nbsp;</td><td valign="top">[[#How files are stored in the CVSROOT directory|How files are stored in the CVSROOT directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002fconfig|CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSROOT_002fEmptydir-directory|CVSROOT/Emptydir directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSUMASK_002c-environment-variable|CVSUMASK, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-cvswrappers-_0028admin-file_0029|cvswrappers (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#The cvswrappers file|The cvswrappers file]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSWRAPPERS_002c-environment-variable|CVSWRAPPERS, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#The cvswrappers file|The cvswrappers file]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVSWRAPPERS_002c-environment-variable-1|CVSWRAPPERS, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fCLIENT_005fLOG_002c-environment-variable|CVS_CLIENT_LOG, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fCLIENT_005fPORT|CVS_CLIENT_PORT]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with kerberos|Direct connection with kerberos]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fIGNORE_005fREMOTE_005fROOT_002c-environment-variable|CVS_IGNORE_REMOTE_ROOT, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fLOCAL_005fBRANCH_005fNUM_002c-environment-variable|CVS_LOCAL_BRANCH_NUM, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fPASSFILE_002c-environment-variable|CVS_PASSFILE, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Using the client with password authentication|Using the client with password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fPID_002c-environment-variable|CVS_PID, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fRCMD_005fPORT_002c-environment-variable|CVS_RCMD_PORT, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fRSH_002c-environment-variable|CVS_RSH, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fSERVER_002c-and-_003afork_003a|CVS_SERVER, and :fork:]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with fork|Connecting with fork]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fSERVER_002c-environment-variable|CVS_SERVER, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with rsh|Connecting with rsh]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fSERVER_005fSLEEP_002c-environment-variable|CVS_SERVER_SLEEP, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-CVS_005fUSER_002c-environment-variable|CVS_USER, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-D"></div>D</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Date-keyword|Date keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Dates|Dates]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Dead-state|Dead state]]</td><td>&nbsp;</td><td valign="top">[[#The attic|The attic]]</td></tr>
<tr><td></td><td valign="top">[[#index-Decimal-revision-number|Decimal revision number]]</td><td>&nbsp;</td><td valign="top">[[#Revision numbers|Revision numbers]]</td></tr>
<tr><td></td><td valign="top">[[#index-DEFAULT-in-commitinfo|DEFAULT in commitinfo]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-DEFAULT-in-editinfo|DEFAULT in editinfo]]</td><td>&nbsp;</td><td valign="top">[[#Editinfo|Editinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-DEFAULT-in-verifymsg|DEFAULT in &lsquo;<tt>verifymsg</tt>&rsquo;]]</td><td>&nbsp;</td><td valign="top">[[#Verifying log messages|Verifying log messages]]</td></tr>
<tr><td></td><td valign="top">[[#index-Defining-a-module|Defining a module]]</td><td>&nbsp;</td><td valign="top">[[#Defining the module|Defining the module]]</td></tr>
<tr><td></td><td valign="top">[[#index-Defining-modules-_0028intro_0029|Defining modules (intro)]]</td><td>&nbsp;</td><td valign="top">[[#The administrative files|The administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Defining-modules-_0028reference-manual_0029|Defining modules (reference manual)]]</td><td>&nbsp;</td><td valign="top">[[#The modules file|The modules file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Deleting-branch-tags|Deleting branch tags]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Deleting-files|Deleting files]]</td><td>&nbsp;</td><td valign="top">[[#Removing files|Removing files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Deleting-revisions|Deleting revisions]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Deleting-sticky-tags|Deleting sticky tags]]</td><td>&nbsp;</td><td valign="top">[[#Sticky tags|Sticky tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Deleting-tags|Deleting tags]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Descending-directories|Descending directories]]</td><td>&nbsp;</td><td valign="top">[[#Recursive behavior|Recursive behavior]]</td></tr>
<tr><td></td><td valign="top">[[#index-Device-nodes|Device nodes]]</td><td>&nbsp;</td><td valign="top">[[#Special Files|Special Files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Diff|Diff]]</td><td>&nbsp;</td><td valign="top">[[#Viewing differences|Viewing differences]]</td></tr>
<tr><td></td><td valign="top">[[#index-diff-_0028subcommand_0029|diff (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#diff&mdash;Show differences between revisions|diff&mdash;Show differences between revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Differences_002c-merging|Differences, merging]]</td><td>&nbsp;</td><td valign="top">[[#Merging differences between any two revisions|Merging differences between any two revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Directories_002c-moving|Directories, moving]]</td><td>&nbsp;</td><td valign="top">[[#Moving and renaming directories|Moving and renaming directories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Directories_002c-removing|Directories, removing]]</td><td>&nbsp;</td><td valign="top">[[#Removing directories|Removing directories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Directory_002c-descending|Directory, descending]]</td><td>&nbsp;</td><td valign="top">[[#Recursive behavior|Recursive behavior]]</td></tr>
<tr><td></td><td valign="top">[[#index-Disjoint-repositories|Disjoint repositories]]</td><td>&nbsp;</td><td valign="top">[[#Multiple repositories|Multiple repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Distributing-log-messages|Distributing log messages]]</td><td>&nbsp;</td><td valign="top">[[#Loginfo|Loginfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-driver_002ec-_0028merge-example_0029|driver.c (merge example)]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-E"></div>E</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-edit-_0028subcommand_0029|edit (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#How to edit a file which is being watched|How to edit a file which is being watched]]</td></tr>
<tr><td></td><td valign="top">[[#index-editinfo-_0028admin-file_0029|editinfo (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Editinfo|Editinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Editing-administrative-files|Editing administrative files]]</td><td>&nbsp;</td><td valign="top">[[#Editing administrative files|Editing administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Editing-the-modules-file|Editing the modules file]]</td><td>&nbsp;</td><td valign="top">[[#Defining the module|Defining the module]]</td></tr>
<tr><td></td><td valign="top">[[#index-Editor_002c-avoiding-invocation-of|Editor, avoiding invocation of]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-EDITOR_002c-environment-variable|EDITOR, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Committing your changes|Committing your changes]]</td></tr>
<tr><td></td><td valign="top">[[#index-EDITOR_002c-environment-variable-1|EDITOR, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-EDITOR_002c-internal-variable|EDITOR, internal variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-EDITOR_002c-overriding|EDITOR, overriding]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Editor_002c-specifying-per-module|Editor, specifying per module]]</td><td>&nbsp;</td><td valign="top">[[#Editinfo|Editinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-editors-_0028subcommand_0029|editors (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Information about who is watching and editing|Information about who is watching and editing]]</td></tr>
<tr><td></td><td valign="top">[[#index-emerge|emerge]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Emptydir_002c-in-CVSROOT-directory|Emptydir, in CVSROOT directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Encryption|Encryption]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Entries-file_002c-in-CVS-directory|Entries file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Entries_002eBackup-file_002c-in-CVS-directory|Entries.Backup file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Entries_002eLog-file_002c-in-CVS-directory|Entries.Log file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Entries_002eStatic-file_002c-in-CVS-directory|Entries.Static file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Environment-variables|Environment variables]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-environment-variables_002c-passed-to-administrative-files|environment variables, passed to administrative files]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Errors_002c-reporting|Errors, reporting]]</td><td>&nbsp;</td><td valign="top">[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</td></tr>
<tr><td></td><td valign="top">[[#index-Example-of-a-work_002dsession|Example of a work-session]]</td><td>&nbsp;</td><td valign="top">[[#A sample session|A sample session]]</td></tr>
<tr><td></td><td valign="top">[[#index-Example-of-merge|Example of merge]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Example_002c-branch-merge|Example, branch merge]]</td><td>&nbsp;</td><td valign="top">[[#Merging an entire branch|Merging an entire branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-Excluding-directories_002c-in-modules-file|Excluding directories, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Excluding directories|Excluding directories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Exit-status_002c-of-commitinfo|Exit status, of commitinfo]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Exit-status_002c-of-CVS|Exit status, of CVS]]</td><td>&nbsp;</td><td valign="top">[[#CVS&rsquo;s exit status|CVS&rsquo;s exit status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Exit-status_002c-of-editor|Exit status, of editor]]</td><td>&nbsp;</td><td valign="top">[[#Partial list of error messages|Partial list of error messages]]</td></tr>
<tr><td></td><td valign="top">[[#index-Exit-status_002c-of-taginfo|Exit status, of taginfo]]</td><td>&nbsp;</td><td valign="top">[[#User-defined logging|User-defined logging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Exit-status_002c-of-verifymsg|Exit status, of &lsquo;<tt>verifymsg</tt>&rsquo;]]</td><td>&nbsp;</td><td valign="top">[[#Verifying log messages|Verifying log messages]]</td></tr>
<tr><td></td><td valign="top">[[#index-export-_0028subcommand_0029|export (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#export&mdash;Export sources from CVS, similar to checkout|export&mdash;Export sources from CVS, similar to checkout]]</td></tr>
<tr><td></td><td valign="top">[[#index-Export-program|Export program]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-F"></div>F</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Fetching-source|Fetching source]]</td><td>&nbsp;</td><td valign="top">[[#Getting the source|Getting the source]]</td></tr>
<tr><td></td><td valign="top">[[#index-File-had-conflicts-on-merge|File had conflicts on merge]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-File-locking|File locking]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-File-permissions_002c-general|File permissions, general]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-File-permissions_002c-Windows_002dspecific|File permissions, Windows-specific]]</td><td>&nbsp;</td><td valign="top">[[#File Permission issues specific to Windows|File Permission issues specific to Windows]]</td></tr>
<tr><td></td><td valign="top">[[#index-File-status|File status]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Files_002c-moving|Files, moving]]</td><td>&nbsp;</td><td valign="top">[[#Moving and renaming files|Moving and renaming files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Files_002c-reference-manual|Files, reference manual]]</td><td>&nbsp;</td><td valign="top">[[#Reference manual for Administrative files|Reference manual for Administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Fixing-a-log-message|Fixing a log message]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Forcing-a-tag-match|Forcing a tag match]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-fork_002c-access-method|fork, access method]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with fork|Connecting with fork]]</td></tr>
<tr><td></td><td valign="top">[[#index-Form-for-log-message|Form for log message]]</td><td>&nbsp;</td><td valign="top">[[#Rcsinfo|Rcsinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Format-of-CVS-commands|Format of CVS commands]]</td><td>&nbsp;</td><td valign="top">[[#Overall structure of CVS commands|Overall structure of CVS commands]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-G"></div>G</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Getting-started|Getting started]]</td><td>&nbsp;</td><td valign="top">[[#A sample session|A sample session]]</td></tr>
<tr><td></td><td valign="top">[[#index-Getting-the-source|Getting the source]]</td><td>&nbsp;</td><td valign="top">[[#Getting the source|Getting the source]]</td></tr>
<tr><td></td><td valign="top">[[#index-Global-cvsignore|Global cvsignore]]</td><td>&nbsp;</td><td valign="top">[[#Ignoring files via cvsignore|Ignoring files via cvsignore]]</td></tr>
<tr><td></td><td valign="top">[[#index-Global-options|Global options]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Group|Group]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-gserver-_0028client_002fserver-connection-method_0029_002c-port-specification|gserver (client/server connection method), port specification]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-gserver-_0028client_002fserver-connection-method_0029_002c-port-specification-1|gserver (client/server connection method), port specification]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-GSSAPI|GSSAPI]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with GSSAPI|Direct connection with GSSAPI]]</td></tr>
<tr><td></td><td valign="top">[[#index-Gzip|Gzip]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Gzip-1|Gzip]]</td><td>&nbsp;</td><td valign="top">[[#Quick reference to CVS commands|Quick reference to CVS commands]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-H"></div>H</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Hard-links|Hard links]]</td><td>&nbsp;</td><td valign="top">[[#Special Files|Special Files]]</td></tr>
<tr><td></td><td valign="top">[[#index-HEAD_002c-as-reserved-tag-name|HEAD, as reserved tag name]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-HEAD_002c-special-tag|HEAD, special tag]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Header-keyword|Header keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-history-_0028subcommand_0029|history (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#history&mdash;Show status of files and users|history&mdash;Show status of files and users]]</td></tr>
<tr><td></td><td valign="top">[[#index-History-browsing|History browsing]]</td><td>&nbsp;</td><td valign="top">[[#History browsing|History browsing]]</td></tr>
<tr><td></td><td valign="top">[[#index-History-file|History file]]</td><td>&nbsp;</td><td valign="top">[[#The history file|The history file]]</td></tr>
<tr><td></td><td valign="top">[[#index-History-files|History files]]</td><td>&nbsp;</td><td valign="top">[[#Where files are stored within the repository|Where files are stored within the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-History-of-CVS|History of CVS]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-HOME_002c-environment-variable|HOME, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-HOMEDRIVE_002c-environment-variable|HOMEDRIVE, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-HOMEPATH_002c-environment-variable|HOMEPATH, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-I"></div>I</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Id-keyword|Id keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Ident-_0028shell-command_0029|Ident (shell command)]]</td><td>&nbsp;</td><td valign="top">[[#Using keywords|Using keywords]]</td></tr>
<tr><td></td><td valign="top">[[#index-Identifying-a-branch|Identifying a branch]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Identifying-files|Identifying files]]</td><td>&nbsp;</td><td valign="top">[[#Keyword substitution|Keyword substitution]]</td></tr>
<tr><td></td><td valign="top">[[#index-Ignored-files|Ignored files]]</td><td>&nbsp;</td><td valign="top">[[#Ignoring files via cvsignore|Ignoring files via cvsignore]]</td></tr>
<tr><td></td><td valign="top">[[#index-Ignoring-files|Ignoring files]]</td><td>&nbsp;</td><td valign="top">[[#Ignoring files via cvsignore|Ignoring files via cvsignore]]</td></tr>
<tr><td></td><td valign="top">[[#index-import-_0028subcommand_0029|import (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#import&mdash;Import sources into CVS, using vendor branches|import&mdash;Import sources into CVS, using vendor branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Importing-files|Importing files]]</td><td>&nbsp;</td><td valign="top">[[#Creating a directory tree from a number of files|Creating a directory tree from a number of files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Importing-files_002c-from-other-version-control-systems|Importing files, from other version control systems]]</td><td>&nbsp;</td><td valign="top">[[#Creating Files From Other Version Control Systems|Creating Files From Other Version Control Systems]]</td></tr>
<tr><td></td><td valign="top">[[#index-Importing-modules|Importing modules]]</td><td>&nbsp;</td><td valign="top">[[#Importing for the first time|Importing for the first time]]</td></tr>
<tr><td></td><td valign="top">[[#index-Index|Index]]</td><td>&nbsp;</td><td valign="top">[[#Index|Index]]</td></tr>
<tr><td></td><td valign="top">[[#index-inetd_002c-configuring-for-pserver|inetd, configuring for pserver]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Info-files-_0028syntax_0029|Info files (syntax)]]</td><td>&nbsp;</td><td valign="top">[[#The common syntax|The common syntax]]</td></tr>
<tr><td></td><td valign="top">[[#index-Informing-others|Informing others]]</td><td>&nbsp;</td><td valign="top">[[#Informing others about commits|Informing others about commits]]</td></tr>
<tr><td></td><td valign="top">[[#index-init-_0028subcommand_0029|init (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Creating a repository|Creating a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Installed-images-_0028VMS_0029|Installed images (VMS)]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Internal-variables|Internal variables]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Introduction-to-CVS|Introduction to CVS]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Invoking-CVS|Invoking CVS]]</td><td>&nbsp;</td><td valign="top">[[#Quick reference to CVS commands|Quick reference to CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-Isolation|Isolation]]</td><td>&nbsp;</td><td valign="top">[[#History browsing|History browsing]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-J"></div>J</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Join|Join]]</td><td>&nbsp;</td><td valign="top">[[#Merging an entire branch|Merging an entire branch]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-K"></div>K</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Keeping-a-checked-out-copy|Keeping a checked out copy]]</td><td>&nbsp;</td><td valign="top">[[#Keeping a checked out copy|Keeping a checked out copy]]</td></tr>
<tr><td></td><td valign="top">[[#index-Kerberos_002c-using-_003agserver_003a|Kerberos, using :gserver:]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with GSSAPI|Direct connection with GSSAPI]]</td></tr>
<tr><td></td><td valign="top">[[#index-Kerberos_002c-using-_003akserver_003a|Kerberos, using :kserver:]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with kerberos|Direct connection with kerberos]]</td></tr>
<tr><td></td><td valign="top">[[#index-Kerberos_002c-using-kerberized-rsh|Kerberos, using kerberized rsh]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with rsh|Connecting with rsh]]</td></tr>
<tr><td></td><td valign="top">[[#index-Keyword-expansion|Keyword expansion]]</td><td>&nbsp;</td><td valign="top">[[#Keyword substitution|Keyword substitution]]</td></tr>
<tr><td></td><td valign="top">[[#index-Keyword-List|Keyword List]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Keyword-substitution|Keyword substitution]]</td><td>&nbsp;</td><td valign="top">[[#Keyword substitution|Keyword substitution]]</td></tr>
<tr><td></td><td valign="top">[[#index-Keyword-substitution_002c-and-merging|Keyword substitution, and merging]]</td><td>&nbsp;</td><td valign="top">[[#Merging and keywords|Merging and keywords]]</td></tr>
<tr><td></td><td valign="top">[[#index-Keyword-substitution_002c-changing-modes|Keyword substitution, changing modes]]</td><td>&nbsp;</td><td valign="top">[[#Substitution modes|Substitution modes]]</td></tr>
<tr><td></td><td valign="top">[[#index-Kflag|Kflag]]</td><td>&nbsp;</td><td valign="top">[[#Substitution modes|Substitution modes]]</td></tr>
<tr><td></td><td valign="top">[[#index-kinit|kinit]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with kerberos|Direct connection with kerberos]]</td></tr>
<tr><td></td><td valign="top">[[#index-Known-bugs-in-this-manual-or-CVS|Known bugs in this manual or CVS]]</td><td>&nbsp;</td><td valign="top">[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</td></tr>
<tr><td></td><td valign="top">[[#index-kserver-_0028client_002fserver-connection-method_0029_002c-port-specification|kserver (client/server connection method), port specification]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-kserver-_0028client_002fserver-connection-method_0029_002c-port-specification-1|kserver (client/server connection method), port specification]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-L"></div>L</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Layout-of-repository|Layout of repository]]</td><td>&nbsp;</td><td valign="top">[[#The Repository|The Repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Left_002dhand-options|Left-hand options]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Linear-development|Linear development]]</td><td>&nbsp;</td><td valign="top">[[#Revision numbers|Revision numbers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Link_002c-symbolic_002c-importing|Link, symbolic, importing]]</td><td>&nbsp;</td><td valign="top">[[#import output|import output]]</td></tr>
<tr><td></td><td valign="top">[[#index-List_002c-mailing-list|List, mailing list]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Local-keyword|Local keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locally-Added|Locally Added]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locally-Modified|Locally Modified]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locally-Removed|Locally Removed]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-LockDir_002c-in-CVSROOT_002fconfig|LockDir, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locker-keyword|Locker keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locking-files|Locking files]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locks_002c-cvs_002c-and-backups|Locks, cvs, and backups]]</td><td>&nbsp;</td><td valign="top">[[#Backing up a repository|Backing up a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locks_002c-cvs_002c-introduction|Locks, cvs, introduction]]</td><td>&nbsp;</td><td valign="top">[[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Locks_002c-cvs_002c-technical-details|Locks, cvs, technical details]]</td><td>&nbsp;</td><td valign="top">[[#CVS locks in the repository|CVS locks in the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-log-_0028subcommand_0029|log (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-information_002c-saving|Log information, saving]]</td><td>&nbsp;</td><td valign="top">[[#The history file|The history file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-keyword|Log keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-message-entry|Log message entry]]</td><td>&nbsp;</td><td valign="top">[[#Committing your changes|Committing your changes]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-message-template|Log message template]]</td><td>&nbsp;</td><td valign="top">[[#Rcsinfo|Rcsinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-message_002c-correcting|Log message, correcting]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-message_002c-verifying|Log message, verifying]]</td><td>&nbsp;</td><td valign="top">[[#Verifying log messages|Verifying log messages]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-messages|Log messages]]</td><td>&nbsp;</td><td valign="top">[[#Loginfo|Loginfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Log-messages_002c-editing|Log messages, editing]]</td><td>&nbsp;</td><td valign="top">[[#Editinfo|Editinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-LogHistory_002c-in-CVSROOT_002fconfig|LogHistory, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Login-_0028subcommand_0029|Login (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Using the client with password authentication|Using the client with password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-loginfo-_0028admin-file_0029|loginfo (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Loginfo|Loginfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-LOGNAME_002c-environment-variable|LOGNAME, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Logout-_0028subcommand_0029|Logout (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Using the client with password authentication|Using the client with password authentication]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-M"></div>M</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Mail_002c-automatic-mail-on-commit|Mail, automatic mail on commit]]</td><td>&nbsp;</td><td valign="top">[[#Informing others about commits|Informing others about commits]]</td></tr>
<tr><td></td><td valign="top">[[#index-Mailing-list|Mailing list]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Mailing-log-messages|Mailing log messages]]</td><td>&nbsp;</td><td valign="top">[[#Loginfo|Loginfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Main-trunk-and-branches|Main trunk and branches]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-make|make]]</td><td>&nbsp;</td><td valign="top">[[#How your build system interacts with CVS|How your build system interacts with CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Many-repositories|Many repositories]]</td><td>&nbsp;</td><td valign="top">[[#Multiple repositories|Multiple repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Markers_002c-conflict|Markers, conflict]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Merge_002c-an-example|Merge, an example]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Merge_002c-branch-example|Merge, branch example]]</td><td>&nbsp;</td><td valign="top">[[#Merging an entire branch|Merging an entire branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-Merging|Merging]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Merging-a-branch|Merging a branch]]</td><td>&nbsp;</td><td valign="top">[[#Merging an entire branch|Merging an entire branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-Merging-a-file|Merging a file]]</td><td>&nbsp;</td><td valign="top">[[#Bringing a file up to date|Bringing a file up to date]]</td></tr>
<tr><td></td><td valign="top">[[#index-Merging-two-revisions|Merging two revisions]]</td><td>&nbsp;</td><td valign="top">[[#Merging differences between any two revisions|Merging differences between any two revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Merging_002c-and-keyword-substitution|Merging, and keyword substitution]]</td><td>&nbsp;</td><td valign="top">[[#Merging and keywords|Merging and keywords]]</td></tr>
<tr><td></td><td valign="top">[[#index-mkmodules|mkmodules]]</td><td>&nbsp;</td><td valign="top">[[#Partial list of error messages|Partial list of error messages]]</td></tr>
<tr><td></td><td valign="top">[[#index-Modifications_002c-copying-between-branches|Modifications, copying between branches]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Module-status|Module status]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Module_002c-defining|Module, defining]]</td><td>&nbsp;</td><td valign="top">[[#Defining the module|Defining the module]]</td></tr>
<tr><td></td><td valign="top">[[#index-Modules-_0028admin-file_0029|Modules (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#The modules file|The modules file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Modules-file|Modules file]]</td><td>&nbsp;</td><td valign="top">[[#The administrative files|The administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Modules-file-program-options|Modules file program options]]</td><td>&nbsp;</td><td valign="top">[[#How the modules file &ldquo;program options&rdquo; programs are run|How the modules file &ldquo;program options&rdquo; programs are run]]</td></tr>
<tr><td></td><td valign="top">[[#index-Modules-file_002c-changing|Modules file, changing]]</td><td>&nbsp;</td><td valign="top">[[#Defining the module|Defining the module]]</td></tr>
<tr><td></td><td valign="top">[[#index-modules_002edb|modules.db]]</td><td>&nbsp;</td><td valign="top">[[#How files are stored in the CVSROOT directory|How files are stored in the CVSROOT directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-modules_002edir|modules.dir]]</td><td>&nbsp;</td><td valign="top">[[#How files are stored in the CVSROOT directory|How files are stored in the CVSROOT directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-modules_002epag|modules.pag]]</td><td>&nbsp;</td><td valign="top">[[#How files are stored in the CVSROOT directory|How files are stored in the CVSROOT directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Motivation-for-branches|Motivation for branches]]</td><td>&nbsp;</td><td valign="top">[[#What branches are good for|What branches are good for]]</td></tr>
<tr><td></td><td valign="top">[[#index-Moving-a-repository|Moving a repository]]</td><td>&nbsp;</td><td valign="top">[[#Moving a repository|Moving a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Moving-branch-tags|Moving branch tags]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Moving-directories|Moving directories]]</td><td>&nbsp;</td><td valign="top">[[#Moving and renaming directories|Moving and renaming directories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Moving-files|Moving files]]</td><td>&nbsp;</td><td valign="top">[[#Moving and renaming files|Moving and renaming files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Moving-tags|Moving tags]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Multiple-developers|Multiple developers]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Multiple-repositories|Multiple repositories]]</td><td>&nbsp;</td><td valign="top">[[#Multiple repositories|Multiple repositories]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-N"></div>N</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Name-keyword|Name keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Name_002c-symbolic-_0028tag_0029|Name, symbolic (tag)]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Needs-Checkout|Needs Checkout]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Needs-Merge|Needs Merge]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Needs-Patch|Needs Patch]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Newsgroups|Newsgroups]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-notify-_0028admin-file_0029|notify (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS to notify you|Telling CVS to notify you]]</td></tr>
<tr><td></td><td valign="top">[[#index-Notify-file_002c-in-CVS-directory|Notify file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Notify_002etmp-file_002c-in-CVS-directory|Notify.tmp file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Number_002c-branch|Number, branch]]</td><td>&nbsp;</td><td valign="top">[[#Revision numbers|Revision numbers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Number_002c-branch-1|Number, branch]]</td><td>&nbsp;</td><td valign="top">[[#Branches and revisions|Branches and revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Number_002c-revision_002d|Number, revision-]]</td><td>&nbsp;</td><td valign="top">[[#Revision numbers|Revision numbers]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-O"></div>O</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Option-defaults|Option defaults]]</td><td>&nbsp;</td><td valign="top">[[#Default options and the ~/.cvsrc file|Default options and the ~/.cvsrc file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Options_002c-global|Options, global]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Options_002c-in-modules-file|Options, in modules file]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Outdating-revisions|Outdating revisions]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Overlap|Overlap]]</td><td>&nbsp;</td><td valign="top">[[#Bringing a file up to date|Bringing a file up to date]]</td></tr>
<tr><td></td><td valign="top">[[#index-Overriding-CVSREAD|Overriding CVSREAD]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Overriding-CVSROOT|Overriding CVSROOT]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Overriding-EDITOR|Overriding EDITOR]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Overriding-RCSBIN|Overriding RCSBIN]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Overriding-TMPDIR|Overriding TMPDIR]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Overview|Overview]]</td><td>&nbsp;</td><td valign="top">[[#Overview|Overview]]</td></tr>
<tr><td></td><td valign="top">[[#index-Ownership_002c-saving-in-CVS|Ownership, saving in CVS]]</td><td>&nbsp;</td><td valign="top">[[#Special Files|Special Files]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-P"></div>P</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Parallel-repositories|Parallel repositories]]</td><td>&nbsp;</td><td valign="top">[[#Multiple repositories|Multiple repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-passwd-_0028admin-file_0029|passwd (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Password-client_002c-using|Password client, using]]</td><td>&nbsp;</td><td valign="top">[[#Using the client with password authentication|Using the client with password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Password-server_002c-setting-up|Password server, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-PATH_002c-environment-variable|PATH, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Per_002ddirectory-sticky-tags_002fdates|Per-directory sticky tags/dates]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Per_002dmodule-editor|Per-module editor]]</td><td>&nbsp;</td><td valign="top">[[#Editinfo|Editinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Permissions_002c-general|Permissions, general]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Permissions_002c-saving-in-CVS|Permissions, saving in CVS]]</td><td>&nbsp;</td><td valign="top">[[#Special Files|Special Files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Permissions_002c-Windows_002dspecific|Permissions, Windows-specific]]</td><td>&nbsp;</td><td valign="top">[[#File Permission issues specific to Windows|File Permission issues specific to Windows]]</td></tr>
<tr><td></td><td valign="top">[[#index-Policy|Policy]]</td><td>&nbsp;</td><td valign="top">[[#When to commit?|When to commit?]]</td></tr>
<tr><td></td><td valign="top">[[#index-port_002c-specifying-for-remote-repositories|port, specifying for remote repositories]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-port_002c-specifying-for-remote-repositories-1|port, specifying for remote repositories]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Precommit-checking|Precommit checking]]</td><td>&nbsp;</td><td valign="top">[[#Commitinfo|Commitinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-pserver-_0028client_002fserver-connection-method_0029_002c-port-specification|pserver (client/server connection method), port specification]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-pserver-_0028client_002fserver-connection-method_0029_002c-port-specification-1|pserver (client/server connection method), port specification]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-pserver-_0028subcommand_0029|pserver (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-PVCS_002c-importing-files-from|PVCS, importing files from]]</td><td>&nbsp;</td><td valign="top">[[#Creating Files From Other Version Control Systems|Creating Files From Other Version Control Systems]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-R"></div>R</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-RCS-history-files|RCS history files]]</td><td>&nbsp;</td><td valign="top">[[#Where files are stored within the repository|Where files are stored within the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-RCS-revision-numbers|RCS revision numbers]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-RCS_002c-importing-files-from|RCS, importing files from]]</td><td>&nbsp;</td><td valign="top">[[#Creating Files From Other Version Control Systems|Creating Files From Other Version Control Systems]]</td></tr>
<tr><td></td><td valign="top">[[#index-RCS_002dstyle-locking|RCS-style locking]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-RCSBIN_002c-in-CVSROOT_002fconfig|RCSBIN, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-RCSBIN_002c-internal-variable|RCSBIN, internal variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-RCSBIN_002c-overriding|RCSBIN, overriding]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-RCSfile-keyword|RCSfile keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-rcsinfo-_0028admin-file_0029|rcsinfo (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Rcsinfo|Rcsinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-rdiff-_0028subcommand_0029|rdiff (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases|rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases]]</td></tr>
<tr><td></td><td valign="top">[[#index-Read_002donly-files_002c-and-_002dr|Read-only files, and -r]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Read_002donly-files_002c-and-CVSREAD|Read-only files, and CVSREAD]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Read_002donly-files_002c-and-watches|Read-only files, and watches]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS to watch certain files|Telling CVS to watch certain files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Read_002donly-files_002c-in-repository|Read-only files, in repository]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Read_002donly-mode|Read-only mode]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Read_002donly-repository-access|Read-only repository access]]</td><td>&nbsp;</td><td valign="top">[[#Read-only repository access|Read-only repository access]]</td></tr>
<tr><td></td><td valign="top">[[#index-Read_002donly-repository-mode|Read-only repository mode]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-readers-_0028admin-file_0029|readers (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Read-only repository access|Read-only repository access]]</td></tr>
<tr><td></td><td valign="top">[[#index-Recursive-_0028directory-descending_0029|Recursive (directory descending)]]</td><td>&nbsp;</td><td valign="top">[[#Recursive behavior|Recursive behavior]]</td></tr>
<tr><td></td><td valign="top">[[#index-Reference-manual-_0028files_0029|Reference manual (files)]]</td><td>&nbsp;</td><td valign="top">[[#Reference manual for Administrative files|Reference manual for Administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Reference-manual-for-variables|Reference manual for variables]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Reference_002c-commands|Reference, commands]]</td><td>&nbsp;</td><td valign="top">[[#Quick reference to CVS commands|Quick reference to CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-Regular-expression-syntax|Regular expression syntax]]</td><td>&nbsp;</td><td valign="top">[[#The common syntax|The common syntax]]</td></tr>
<tr><td></td><td valign="top">[[#index-Regular-modules|Regular modules]]</td><td>&nbsp;</td><td valign="top">[[#Regular modules|Regular modules]]</td></tr>
<tr><td></td><td valign="top">[[#index-release-_0028subcommand_0029|release (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#release&mdash;Indicate that a Module is no longer in use|release&mdash;Indicate that a Module is no longer in use]]</td></tr>
<tr><td></td><td valign="top">[[#index-Releases_002c-revisions-and-versions|Releases, revisions and versions]]</td><td>&nbsp;</td><td valign="top">[[#Versions, revisions and releases|Versions, revisions and releases]]</td></tr>
<tr><td></td><td valign="top">[[#index-Releasing-your-working-copy|Releasing your working copy]]</td><td>&nbsp;</td><td valign="top">[[#Cleaning up|Cleaning up]]</td></tr>
<tr><td></td><td valign="top">[[#index-Remote-repositories|Remote repositories]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Remote-repositories_002c-port-specification|Remote repositories, port specification]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Remote-repositories_002c-port-specification-1|Remote repositories, port specification]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Remove-_0028subcommand_0029|Remove (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Removing files|Removing files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Removing-a-change|Removing a change]]</td><td>&nbsp;</td><td valign="top">[[#Merging differences between any two revisions|Merging differences between any two revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Removing-branch-tags|Removing branch tags]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Removing-directories|Removing directories]]</td><td>&nbsp;</td><td valign="top">[[#Removing directories|Removing directories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Removing-files|Removing files]]</td><td>&nbsp;</td><td valign="top">[[#Removing files|Removing files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Removing-tags|Removing tags]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Removing-your-working-copy|Removing your working copy]]</td><td>&nbsp;</td><td valign="top">[[#Cleaning up|Cleaning up]]</td></tr>
<tr><td></td><td valign="top">[[#index-Renaming-directories|Renaming directories]]</td><td>&nbsp;</td><td valign="top">[[#Moving and renaming directories|Moving and renaming directories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Renaming-files|Renaming files]]</td><td>&nbsp;</td><td valign="top">[[#Moving and renaming files|Moving and renaming files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Renaming-tags|Renaming tags]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Replacing-a-log-message|Replacing a log message]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Reporting-bugs|Reporting bugs]]</td><td>&nbsp;</td><td valign="top">[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repositories_002c-multiple|Repositories, multiple]]</td><td>&nbsp;</td><td valign="top">[[#Multiple repositories|Multiple repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repositories_002c-remote|Repositories, remote]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repositories_002c-remote_002c-port-specification|Repositories, remote, port specification]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repositories_002c-remote_002c-port-specification-1|Repositories, remote, port specification]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repository-_0028intro_0029|Repository (intro)]]</td><td>&nbsp;</td><td valign="top">[[#The Repository|The Repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repository-file_002c-in-CVS-directory|Repository file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repository_002c-backing-up|Repository, backing up]]</td><td>&nbsp;</td><td valign="top">[[#Backing up a repository|Backing up a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repository_002c-example|Repository, example]]</td><td>&nbsp;</td><td valign="top">[[#The Repository|The Repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repository_002c-how-data-is-stored|Repository, how data is stored]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the repository|How data is stored in the repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repository_002c-moving|Repository, moving]]</td><td>&nbsp;</td><td valign="top">[[#Moving a repository|Moving a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Repository_002c-setting-up|Repository, setting up]]</td><td>&nbsp;</td><td valign="top">[[#Creating a repository|Creating a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-RereadLogAfterVerify_002c-in-CVSROOT_002fconfig|RereadLogAfterVerify, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Reserved-checkouts|Reserved checkouts]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Resetting-sticky-tags|Resetting sticky tags]]</td><td>&nbsp;</td><td valign="top">[[#Sticky tags|Sticky tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Resolving-a-conflict|Resolving a conflict]]</td><td>&nbsp;</td><td valign="top">[[#Conflicts example|Conflicts example]]</td></tr>
<tr><td></td><td valign="top">[[#index-Restoring-old-version-of-removed-file|Restoring old version of removed file]]</td><td>&nbsp;</td><td valign="top">[[#Merging differences between any two revisions|Merging differences between any two revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Resurrecting-old-version-of-dead-file|Resurrecting old version of dead file]]</td><td>&nbsp;</td><td valign="top">[[#Merging differences between any two revisions|Merging differences between any two revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Retrieve-a-branch|Retrieve a branch]]</td><td>&nbsp;</td><td valign="top">[[#Accessing branches|Accessing branches]]</td></tr>
<tr><td></td><td valign="top">[[#index-Retrieving-an-old-revision-using-tags|Retrieving an old revision using tags]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Reverting-to-repository-version|Reverting to repository version]]</td><td>&nbsp;</td><td valign="top">[[#How to edit a file which is being watched|How to edit a file which is being watched]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revision-keyword|Revision keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revision-management|Revision management]]</td><td>&nbsp;</td><td valign="top">[[#Revision management|Revision management]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revision-numbers|Revision numbers]]</td><td>&nbsp;</td><td valign="top">[[#Revision numbers|Revision numbers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revision-numbers-_0028branches_0029|Revision numbers (branches)]]</td><td>&nbsp;</td><td valign="top">[[#Branches and revisions|Branches and revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revision-tree|Revision tree]]</td><td>&nbsp;</td><td valign="top">[[#Revision numbers|Revision numbers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revision-tree_002c-making-branches|Revision tree, making branches]]</td><td>&nbsp;</td><td valign="top">[[#Branching and merging|Branching and merging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revisions_002c-merging-differences-between|Revisions, merging differences between]]</td><td>&nbsp;</td><td valign="top">[[#Merging differences between any two revisions|Merging differences between any two revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Revisions_002c-versions-and-releases|Revisions, versions and releases]]</td><td>&nbsp;</td><td valign="top">[[#Versions, revisions and releases|Versions, revisions and releases]]</td></tr>
<tr><td></td><td valign="top">[[#index-Right_002dhand-options|Right-hand options]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Root-file_002c-in-CVS-directory|Root file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS where your repository is|Telling CVS where your repository is]]</td></tr>
<tr><td></td><td valign="top">[[#index-rsh|rsh]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with rsh|Connecting with rsh]]</td></tr>
<tr><td></td><td valign="top">[[#index-rsh-replacements-_0028Kerberized_002c-SSH_002c-_0026c_0029|rsh replacements (Kerberized, SSH, &amp;c)]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with rsh|Connecting with rsh]]</td></tr>
<tr><td></td><td valign="top">[[#index-rtag-_0028subcommand_0029|rtag (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]]</td></tr>
<tr><td></td><td valign="top">[[#index-rtag-_0028subcommand_0029_002c-creating-a-branch-using|rtag (subcommand), creating a branch using]]</td><td>&nbsp;</td><td valign="top">[[#Creating a branch|Creating a branch]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-S"></div>S</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Saving-space|Saving space]]</td><td>&nbsp;</td><td valign="top">[[#admin options|admin options]]</td></tr>
<tr><td></td><td valign="top">[[#index-SCCS_002c-importing-files-from|SCCS, importing files from]]</td><td>&nbsp;</td><td valign="top">[[#Creating Files From Other Version Control Systems|Creating Files From Other Version Control Systems]]</td></tr>
<tr><td></td><td valign="top">[[#index-Security_002c-file-permissions-in-repository|Security, file permissions in repository]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Security_002c-GSSAPI|Security, GSSAPI]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with GSSAPI|Direct connection with GSSAPI]]</td></tr>
<tr><td></td><td valign="top">[[#index-Security_002c-kerberos|Security, kerberos]]</td><td>&nbsp;</td><td valign="top">[[#Direct connection with kerberos|Direct connection with kerberos]]</td></tr>
<tr><td></td><td valign="top">[[#index-Security_002c-of-pserver|Security, of pserver]]</td><td>&nbsp;</td><td valign="top">[[#Security considerations with password authentication|Security considerations with password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-Security_002c-setuid|Security, setuid]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Server_002c-CVS|Server, CVS]]</td><td>&nbsp;</td><td valign="top">[[#Remote repositories|Remote repositories]]</td></tr>
<tr><td></td><td valign="top">[[#index-Server_002c-temporary-directories|Server, temporary directories]]</td><td>&nbsp;</td><td valign="top">[[#Temporary directories for the server|Temporary directories for the server]]</td></tr>
<tr><td></td><td valign="top">[[#index-Setgid|Setgid]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Setting-up-a-repository|Setting up a repository]]</td><td>&nbsp;</td><td valign="top">[[#Creating a repository|Creating a repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Setuid|Setuid]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Source-keyword|Source keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Source_002c-getting-CVS-source|Source, getting CVS source]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Source_002c-getting-from-CVS|Source, getting from CVS]]</td><td>&nbsp;</td><td valign="top">[[#Getting the source|Getting the source]]</td></tr>
<tr><td></td><td valign="top">[[#index-Special-files|Special files]]</td><td>&nbsp;</td><td valign="top">[[#Special Files|Special Files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Specifying-dates|Specifying dates]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Spreading-information|Spreading information]]</td><td>&nbsp;</td><td valign="top">[[#Informing others about commits|Informing others about commits]]</td></tr>
<tr><td></td><td valign="top">[[#index-SSH-_0028rsh-replacement_0029|SSH (rsh replacement)]]</td><td>&nbsp;</td><td valign="top">[[#Connecting with rsh|Connecting with rsh]]</td></tr>
<tr><td></td><td valign="top">[[#index-Starting-a-project-with-CVS|Starting a project with CVS]]</td><td>&nbsp;</td><td valign="top">[[#Starting a project with CVS|Starting a project with CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-State-keyword|State keyword]]</td><td>&nbsp;</td><td valign="top">[[#Keyword List|Keyword List]]</td></tr>
<tr><td></td><td valign="top">[[#index-Status-of-a-file|Status of a file]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Status-of-a-module|Status of a module]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Sticky-date|Sticky date]]</td><td>&nbsp;</td><td valign="top">[[#Sticky tags|Sticky tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Sticky-tags|Sticky tags]]</td><td>&nbsp;</td><td valign="top">[[#Sticky tags|Sticky tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Sticky-tags_002c-resetting|Sticky tags, resetting]]</td><td>&nbsp;</td><td valign="top">[[#Sticky tags|Sticky tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Sticky-tags_002fdates_002c-per_002ddirectory|Sticky tags/dates, per-directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Storing-log-messages|Storing log messages]]</td><td>&nbsp;</td><td valign="top">[[#Loginfo|Loginfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Stream-authentication|Stream authentication]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Structure|Structure]]</td><td>&nbsp;</td><td valign="top">[[#Overall structure of CVS commands|Overall structure of CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-Subdirectories|Subdirectories]]</td><td>&nbsp;</td><td valign="top">[[#Recursive behavior|Recursive behavior]]</td></tr>
<tr><td></td><td valign="top">[[#index-Support_002c-getting-CVS-support|Support, getting CVS support]]</td><td>&nbsp;</td><td valign="top">[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</td></tr>
<tr><td></td><td valign="top">[[#index-Symbolic-link_002c-importing|Symbolic link, importing]]</td><td>&nbsp;</td><td valign="top">[[#import output|import output]]</td></tr>
<tr><td></td><td valign="top">[[#index-Symbolic-links|Symbolic links]]</td><td>&nbsp;</td><td valign="top">[[#Special Files|Special Files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Symbolic-name-_0028tag_0029|Symbolic name (tag)]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Syntax-of-info-files|Syntax of info files]]</td><td>&nbsp;</td><td valign="top">[[#The common syntax|The common syntax]]</td></tr>
<tr><td></td><td valign="top">[[#index-SystemAuth_002c-in-CVSROOT_002fconfig|SystemAuth, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-T"></div>T</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-tag-_0028subcommand_0029|tag (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Specifying what to tag from the working directory|Specifying what to tag from the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-tag-_0028subcommand_0029_002c-creating-a-branch-using|tag (subcommand), creating a branch using]]</td><td>&nbsp;</td><td valign="top">[[#Creating a branch|Creating a branch]]</td></tr>
<tr><td></td><td valign="top">[[#index-tag-_0028subcommand_0029_002c-introduction|tag (subcommand), introduction]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tag-file_002c-in-CVS-directory|Tag file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tag-program|Tag program]]</td><td>&nbsp;</td><td valign="top">[[#Module options|Module options]]</td></tr>
<tr><td></td><td valign="top">[[#index-taginfo|taginfo]]</td><td>&nbsp;</td><td valign="top">[[#User-defined logging|User-defined logging]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags|Tags]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags_002c-deleting|Tags, deleting]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags_002c-example|Tags, example]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags_002c-moving|Tags, moving]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags_002c-renaming|Tags, renaming]]</td><td>&nbsp;</td><td valign="top">[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags_002c-retrieving-old-revisions|Tags, retrieving old revisions]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags_002c-sticky|Tags, sticky]]</td><td>&nbsp;</td><td valign="top">[[#Sticky tags|Sticky tags]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tags_002c-symbolic-name|Tags, symbolic name]]</td><td>&nbsp;</td><td valign="top">[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-tc_002c-Trivial-Compiler-_0028example_0029|tc, Trivial Compiler (example)]]</td><td>&nbsp;</td><td valign="top">[[#A sample session|A sample session]]</td></tr>
<tr><td></td><td valign="top">[[#index-Team-of-developers|Team of developers]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-TEMP_002c-environment-variable|TEMP, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Template-file_002c-in-CVS-directory|Template file, in CVS directory]]</td><td>&nbsp;</td><td valign="top">[[#How data is stored in the working directory|How data is stored in the working directory]]</td></tr>
<tr><td></td><td valign="top">[[#index-Template-for-log-message|Template for log message]]</td><td>&nbsp;</td><td valign="top">[[#Rcsinfo|Rcsinfo]]</td></tr>
<tr><td></td><td valign="top">[[#index-Temporary-directories_002c-and-server|Temporary directories, and server]]</td><td>&nbsp;</td><td valign="top">[[#Temporary directories for the server|Temporary directories for the server]]</td></tr>
<tr><td></td><td valign="top">[[#index-Temporary-files_002c-location-of|Temporary files, location of]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Third_002dparty-sources|Third-party sources]]</td><td>&nbsp;</td><td valign="top">[[#Tracking third-party sources|Tracking third-party sources]]</td></tr>
<tr><td></td><td valign="top">[[#index-Time|Time]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Timezone_002c-in-input|Timezone, in input]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Timezone_002c-in-output|Timezone, in output]]</td><td>&nbsp;</td><td valign="top">[[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]]</td></tr>
<tr><td></td><td valign="top">[[#index-TMP_002c-environment-variable|TMP, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-TMPDIR_002c-environment-variable|TMPDIR, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-TMPDIR_002c-overriding|TMPDIR, overriding]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-TopLevelAdmin_002c-in-CVSROOT_002fconfig|TopLevelAdmin, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-Trace|Trace]]</td><td>&nbsp;</td><td valign="top">[[#Global options|Global options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Traceability|Traceability]]</td><td>&nbsp;</td><td valign="top">[[#History browsing|History browsing]]</td></tr>
<tr><td></td><td valign="top">[[#index-Tracking-sources|Tracking sources]]</td><td>&nbsp;</td><td valign="top">[[#Tracking third-party sources|Tracking third-party sources]]</td></tr>
<tr><td></td><td valign="top">[[#index-Transactions_002c-atomic_002c-lack-of|Transactions, atomic, lack of]]</td><td>&nbsp;</td><td valign="top">[[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-Trivial-Compiler-_0028example_0029|Trivial Compiler (example)]]</td><td>&nbsp;</td><td valign="top">[[#A sample session|A sample session]]</td></tr>
<tr><td></td><td valign="top">[[#index-Typical-repository|Typical repository]]</td><td>&nbsp;</td><td valign="top">[[#The Repository|The Repository]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-U"></div>U</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Umask_002c-for-repository-files|Umask, for repository files]]</td><td>&nbsp;</td><td valign="top">[[#File permissions|File permissions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Undoing-a-change|Undoing a change]]</td><td>&nbsp;</td><td valign="top">[[#Merging differences between any two revisions|Merging differences between any two revisions]]</td></tr>
<tr><td></td><td valign="top">[[#index-unedit-_0028subcommand_0029|unedit (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#How to edit a file which is being watched|How to edit a file which is being watched]]</td></tr>
<tr><td></td><td valign="top">[[#index-Unknown|Unknown]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Unreserved-checkouts|Unreserved checkouts]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Unresolved-Conflict|Unresolved Conflict]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Up_002dto_002ddate|Up-to-date]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-update-_0028subcommand_0029|update (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#update&mdash;Bring work tree in sync with repository|update&mdash;Bring work tree in sync with repository]]</td></tr>
<tr><td></td><td valign="top">[[#index-Update_002c-introduction|Update, introduction]]</td><td>&nbsp;</td><td valign="top">[[#Bringing a file up to date|Bringing a file up to date]]</td></tr>
<tr><td></td><td valign="top">[[#index-update_002c-to-display-file-status|update, to display file status]]</td><td>&nbsp;</td><td valign="top">[[#File status|File status]]</td></tr>
<tr><td></td><td valign="top">[[#index-Updating-a-file|Updating a file]]</td><td>&nbsp;</td><td valign="top">[[#Bringing a file up to date|Bringing a file up to date]]</td></tr>
<tr><td></td><td valign="top">[[#index-User-aliases|User aliases]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td></td><td valign="top">[[#index-User-variables|User variables]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-USER_002c-environment-variable|USER, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-USER_002c-internal-variable|USER, internal variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-UserAdminOptions_002c-in-CVSROOT_002fconfig|UserAdminOptions, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#admin&mdash;Administration|admin&mdash;Administration]]</td></tr>
<tr><td></td><td valign="top">[[#index-UserAdminOptions_002c-in-CVSROOT_002fconfig-1|UserAdminOptions, in CVSROOT/config]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-users-_0028admin-file_0029|users (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS to notify you|Telling CVS to notify you]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-V"></div>V</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Variables|Variables]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td></td><td valign="top">[[#index-Vendor|Vendor]]</td><td>&nbsp;</td><td valign="top">[[#Tracking third-party sources|Tracking third-party sources]]</td></tr>
<tr><td></td><td valign="top">[[#index-Vendor-branch|Vendor branch]]</td><td>&nbsp;</td><td valign="top">[[#Tracking third-party sources|Tracking third-party sources]]</td></tr>
<tr><td></td><td valign="top">[[#index-verifymsg-_0028admin-file_0029|&lsquo;<tt>verifymsg</tt>&rsquo; (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Verifying log messages|Verifying log messages]]</td></tr>
<tr><td></td><td valign="top">[[#index-verifymsg_002c-changing-the-log-message|&lsquo;<tt>verifymsg</tt>&rsquo;, changing the log message]]</td><td>&nbsp;</td><td valign="top">[[#Verifying log messages|Verifying log messages]]</td></tr>
<tr><td></td><td valign="top">[[#index-verifymsg_002c-changing-the-log-message-1|&lsquo;<tt>verifymsg</tt>&rsquo;, changing the log message]]</td><td>&nbsp;</td><td valign="top">[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</td></tr>
<tr><td></td><td valign="top">[[#index-version-_0028subcommand_0029|version (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Quick reference to CVS commands|Quick reference to CVS commands]]</td></tr>
<tr><td></td><td valign="top">[[#index-Versions_002c-of-CVS|Versions, of CVS]]</td><td>&nbsp;</td><td valign="top">[[#Compatibility between CVS Versions|Compatibility between CVS Versions]]</td></tr>
<tr><td></td><td valign="top">[[#index-Versions_002c-revisions-and-releases|Versions, revisions and releases]]</td><td>&nbsp;</td><td valign="top">[[#Versions, revisions and releases|Versions, revisions and releases]]</td></tr>
<tr><td></td><td valign="top">[[#index-Viewing-differences|Viewing differences]]</td><td>&nbsp;</td><td valign="top">[[#Viewing differences|Viewing differences]]</td></tr>
<tr><td></td><td valign="top">[[#index-VISUAL_002c-environment-variable|VISUAL, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#Committing your changes|Committing your changes]]</td></tr>
<tr><td></td><td valign="top">[[#index-VISUAL_002c-environment-variable-1|VISUAL, environment variable]]</td><td>&nbsp;</td><td valign="top">[[#All environment variables which affect CVS|All environment variables which affect CVS]]</td></tr>
<tr><td></td><td valign="top">[[#index-VISUAL_002c-internal-variable|VISUAL, internal variable]]</td><td>&nbsp;</td><td valign="top">[[#Expansions in administrative files|Expansions in administrative files]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-W"></div>W</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-watch-add-_0028subcommand_0029|watch add (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS to notify you|Telling CVS to notify you]]</td></tr>
<tr><td></td><td valign="top">[[#index-watch-off-_0028subcommand_0029|watch off (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS to watch certain files|Telling CVS to watch certain files]]</td></tr>
<tr><td></td><td valign="top">[[#index-watch-on-_0028subcommand_0029|watch on (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS to watch certain files|Telling CVS to watch certain files]]</td></tr>
<tr><td></td><td valign="top">[[#index-watch-remove-_0028subcommand_0029|watch remove (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Telling CVS to notify you|Telling CVS to notify you]]</td></tr>
<tr><td></td><td valign="top">[[#index-watchers-_0028subcommand_0029|watchers (subcommand)]]</td><td>&nbsp;</td><td valign="top">[[#Information about who is watching and editing|Information about who is watching and editing]]</td></tr>
<tr><td></td><td valign="top">[[#index-Watches|Watches]]</td><td>&nbsp;</td><td valign="top">[[#Mechanisms to track who is editing files|Mechanisms to track who is editing files]]</td></tr>
<tr><td></td><td valign="top">[[#index-wdiff-_0028import-example_0029|wdiff (import example)]]</td><td>&nbsp;</td><td valign="top">[[#Importing for the first time|Importing for the first time]]</td></tr>
<tr><td></td><td valign="top">[[#index-Web-pages_002c-maintaining-with-CVS|Web pages, maintaining with CVS]]</td><td>&nbsp;</td><td valign="top">[[#Keeping a checked out copy|Keeping a checked out copy]]</td></tr>
<tr><td></td><td valign="top">[[#index-What-_0028shell-command_0029|What (shell command)]]</td><td>&nbsp;</td><td valign="top">[[#Using keywords|Using keywords]]</td></tr>
<tr><td></td><td valign="top">[[#index-What-branches-are-good-for|What branches are good for]]</td><td>&nbsp;</td><td valign="top">[[#What branches are good for|What branches are good for]]</td></tr>
<tr><td></td><td valign="top">[[#index-What-is-CVS-not_003f|What is CVS not?]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS not?|What is CVS not?]]</td></tr>
<tr><td></td><td valign="top">[[#index-What-is-CVS_003f|What is CVS?]]</td><td>&nbsp;</td><td valign="top">[[#What is CVS?|What is CVS?]]</td></tr>
<tr><td></td><td valign="top">[[#index-When-to-commit|When to commit]]</td><td>&nbsp;</td><td valign="top">[[#When to commit?|When to commit?]]</td></tr>
<tr><td></td><td valign="top">[[#index-Windows_002c-and-permissions|Windows, and permissions]]</td><td>&nbsp;</td><td valign="top">[[#File Permission issues specific to Windows|File Permission issues specific to Windows]]</td></tr>
<tr><td></td><td valign="top">[[#index-Work_002dsession_002c-example-of|Work-session, example of]]</td><td>&nbsp;</td><td valign="top">[[#A sample session|A sample session]]</td></tr>
<tr><td></td><td valign="top">[[#index-Working-copy|Working copy]]</td><td>&nbsp;</td><td valign="top">[[#Multiple developers|Multiple developers]]</td></tr>
<tr><td></td><td valign="top">[[#index-Working-copy_002c-removing|Working copy, removing]]</td><td>&nbsp;</td><td valign="top">[[#Cleaning up|Cleaning up]]</td></tr>
<tr><td></td><td valign="top">[[#index-Wrappers|Wrappers]]</td><td>&nbsp;</td><td valign="top">[[#The cvswrappers file|The cvswrappers file]]</td></tr>
<tr><td></td><td valign="top">[[#index-writers-_0028admin-file_0029|writers (admin file)]]</td><td>&nbsp;</td><td valign="top">[[#Read-only repository access|Read-only repository access]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-X"></div>X</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Ximbiot|Ximbiot]]</td><td>&nbsp;</td><td valign="top">[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</td></tr>
<tr><td></td><td valign="top">[[#index-xinetd_002c-configuring-for-pserver|xinetd, configuring for pserver]]</td><td>&nbsp;</td><td valign="top">[[#Setting up the server for password authentication|Setting up the server for password authentication]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
<tr><th><div id="Index-1_cp_letter-Z"></div>Z</th><td></td><td></td></tr>
<tr><td></td><td valign="top">[[#index-Zone_002c-time_002c-in-input|Zone, time, in input]]</td><td>&nbsp;</td><td valign="top">[[#Common command options|Common command options]]</td></tr>
<tr><td></td><td valign="top">[[#index-Zone_002c-time_002c-in-output|Zone, time, in output]]</td><td>&nbsp;</td><td valign="top">[[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]]</td></tr>
<tr><td colspan="4"> 
----
</td></tr>
</table>
<table cellpadding="1" cellspacing="1" border="0"><tr><th valign="top">Jump to:</th>
<td>[[#Index-1_cp_symbol-1|<b>!</b>]]</td>
<td>[[#Index-1_cp_symbol-2|<b>#</b>]]</td>
<td>[[#Index-1_cp_symbol-3|<b>&amp;</b>]]</td>
<td>[[#Index-1_cp_symbol-4|<b>-</b>]]</td>
<td>[[#Index-1_cp_symbol-5|<b>.</b>]]</td>
<td>[[#Index-1_cp_symbol-6|<b>/</b>]]</td>
<td>[[#Index-1_cp_symbol-7|<b>:</b>]]</td>
<td>[[#Index-1_cp_symbol-8|<b>&lt;</b>]]</td>
<td>[[#Index-1_cp_symbol-9|<b>=</b>]]</td>
<td>[[#Index-1_cp_symbol-10|<b>&gt;</b>]]</td>
<td>[[#Index-1_cp_symbol-11|<b>_</b>]]</td>
<td>[[#Index-1_cp_letter-A|<b>A</b>]]</td>
<td>[[#Index-1_cp_letter-B|<b>B</b>]]</td>
<td>[[#Index-1_cp_letter-C|<b>C</b>]]</td>
<td>[[#Index-1_cp_letter-D|<b>D</b>]]</td>
<td>[[#Index-1_cp_letter-E|<b>E</b>]]</td>
<td>[[#Index-1_cp_letter-F|<b>F</b>]]</td>
<td>[[#Index-1_cp_letter-G|<b>G</b>]]</td>
<td>[[#Index-1_cp_letter-H|<b>H</b>]]</td>
<td>[[#Index-1_cp_letter-I|<b>I</b>]]</td>
<td>[[#Index-1_cp_letter-J|<b>J</b>]]</td>
<td>[[#Index-1_cp_letter-K|<b>K</b>]]</td>
<td>[[#Index-1_cp_letter-L|<b>L</b>]]</td>
<td>[[#Index-1_cp_letter-M|<b>M</b>]]</td>
<td>[[#Index-1_cp_letter-N|<b>N</b>]]</td>
<td>[[#Index-1_cp_letter-O|<b>O</b>]]</td>
<td>[[#Index-1_cp_letter-P|<b>P</b>]]</td>
<td>[[#Index-1_cp_letter-R|<b>R</b>]]</td>
<td>[[#Index-1_cp_letter-S|<b>S</b>]]</td>
<td>[[#Index-1_cp_letter-T|<b>T</b>]]</td>
<td>[[#Index-1_cp_letter-U|<b>U</b>]]</td>
<td>[[#Index-1_cp_letter-V|<b>V</b>]]</td>
<td>[[#Index-1_cp_letter-W|<b>W</b>]]</td>
<td>[[#Index-1_cp_letter-X|<b>X</b>]]</td>
<td>[[#Index-1_cp_letter-Z|<b>Z</b>]]</td>
</tr></table>



<hr size="6">
<div id="SEC_Contents"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
== Table of Contents ==

<div class="contents">

<ul>
  <li><div id="toc-Overview-1"></div>[[#Overview|Overview]]
  <ul>
    <li><div id="toc-What-is-CVS_003f-1"></div>[[#What is CVS?|What is CVS?]]</li>
    <li><div id="toc-What-is-CVS-not_003f-1"></div>[[#What is CVS not?|What is CVS not?]]</li>
    <li><div id="toc-A-sample-session-1"></div>[[#A sample session|A sample session]]
    <ul>
      <li><div id="toc-Getting-the-source-1"></div>[[#Getting the source|Getting the source]]</li>
      <li><div id="toc-Committing-your-changes-1"></div>[[#Committing your changes|Committing your changes]]</li>
      <li><div id="toc-Cleaning-up-1"></div>[[#Cleaning up|Cleaning up]]</li>
      <li><div id="toc-Viewing-differences-1"></div>[[#Viewing differences|Viewing differences]]</li>
    </ul>
</li>
  </ul></li>
  <li><div id="toc-The-Repository"></div>[[#The Repository|The Repository]]
  <ul>
    <li><div id="toc-Telling-CVS-where-your-repository-is"></div>[[#Telling CVS where your repository is|Telling CVS where your repository is]]</li>
    <li><div id="toc-How-data-is-stored-in-the-repository"></div>[[#How data is stored in the repository|How data is stored in the repository]]
    <ul>
      <li><div id="toc-Where-files-are-stored-within-the-repository"></div>[[#Where files are stored within the repository|Where files are stored within the repository]]</li>
      <li><div id="toc-File-permissions-1"></div>[[#File permissions|File permissions]]</li>
      <li><div id="toc-File-Permission-issues-specific-to-Windows"></div>[[#File Permission issues specific to Windows|File Permission issues specific to Windows]]</li>
      <li><div id="toc-The-attic"></div>[[#The attic|The attic]]</li>
      <li><div id="toc-The-CVS-directory-in-the-repository"></div>[[#The CVS directory in the repository|The CVS directory in the repository]]</li>
      <li><div id="toc-CVS-locks-in-the-repository"></div>[[#CVS locks in the repository|CVS locks in the repository]]</li>
      <li><div id="toc-How-files-are-stored-in-the-CVSROOT-directory"></div>[[#How files are stored in the CVSROOT directory|How files are stored in the CVSROOT directory]]</li>
    </ul></li>
    <li><div id="toc-How-data-is-stored-in-the-working-directory"></div>[[#How data is stored in the working directory|How data is stored in the working directory]]</li>
    <li><div id="toc-The-administrative-files"></div>[[#The administrative files|The administrative files]]
    <ul>
      <li><div id="toc-Editing-administrative-files"></div>[[#Editing administrative files|Editing administrative files]]</li>
    </ul></li>
    <li><div id="toc-Multiple-repositories-1"></div>[[#Multiple repositories|Multiple repositories]]</li>
    <li><div id="toc-Creating-a-repository-1"></div>[[#Creating a repository|Creating a repository]]</li>
    <li><div id="toc-Backing-up-a-repository"></div>[[#Backing up a repository|Backing up a repository]]</li>
    <li><div id="toc-Moving-a-repository-1"></div>[[#Moving a repository|Moving a repository]]</li>
    <li><div id="toc-Remote-repositories-1"></div>[[#Remote repositories|Remote repositories]]
    <ul>
      <li><div id="toc-Server-requirements-1"></div>[[#Server requirements|Server requirements]]</li>
      <li><div id="toc-Connecting-with-rsh"></div>[[#Connecting with rsh|Connecting with rsh]]</li>
      <li><div id="toc-Direct-connection-with-password-authentication"></div>[[#Direct connection with password authentication|Direct connection with password authentication]]
      <ul>
        <li><div id="toc-Setting-up-the-server-for-password-authentication"></div>[[#Setting up the server for password authentication|Setting up the server for password authentication]]</li>
        <li><div id="toc-Using-the-client-with-password-authentication"></div>[[#Using the client with password authentication|Using the client with password authentication]]</li>
        <li><div id="toc-Security-considerations-with-password-authentication"></div>[[#Security considerations with password authentication|Security considerations with password authentication]]</li>
      </ul></li>
      <li><div id="toc-Direct-connection-with-GSSAPI"></div>[[#Direct connection with GSSAPI|Direct connection with GSSAPI]]</li>
      <li><div id="toc-Direct-connection-with-kerberos"></div>[[#Direct connection with kerberos|Direct connection with kerberos]]</li>
      <li><div id="toc-Connecting-with-fork"></div>[[#Connecting with fork|Connecting with fork]]</li>
    </ul></li>
    <li><div id="toc-Read_002donly-repository-access"></div>[[#Read-only repository access|Read-only repository access]]</li>
    <li><div id="toc-Temporary-directories-for-the-server"></div>[[#Temporary directories for the server|Temporary directories for the server]]</li>
  </ul></li>
  <li><div id="toc-Starting-a-project-with-CVS"></div>[[#Starting a project with CVS|Starting a project with CVS]]
  <ul>
    <li><div id="toc-Setting-up-the-files-1"></div>[[#Setting up the files|Setting up the files]]
    <ul>
      <li><div id="toc-Creating-a-directory-tree-from-a-number-of-files"></div>[[#Creating a directory tree from a number of files|Creating a directory tree from a number of files]]</li>
      <li><div id="toc-Creating-Files-From-Other-Version-Control-Systems"></div>[[#Creating Files From Other Version Control Systems|Creating Files From Other Version Control Systems]]</li>
      <li><div id="toc-Creating-a-directory-tree-from-scratch"></div>[[#Creating a directory tree from scratch|Creating a directory tree from scratch]]</li>
    </ul></li>
    <li><div id="toc-Defining-the-module-1"></div>[[#Defining the module|Defining the module]]</li>
  </ul></li>
  <li><div id="toc-Revisions-1"></div>[[#Revisions|Revisions]]
  <ul>
    <li><div id="toc-Revision-numbers-1"></div>[[#Revision numbers|Revision numbers]]</li>
    <li><div id="toc-Versions_002c-revisions-and-releases"></div>[[#Versions, revisions and releases|Versions, revisions and releases]]</li>
    <li><div id="toc-Assigning-revisions-1"></div>[[#Assigning revisions|Assigning revisions]]</li>
    <li><div id="toc-Tags_002d_002dSymbolic-revisions"></div>[[#Tags&ndash;Symbolic revisions|Tags&ndash;Symbolic revisions]]</li>
    <li><div id="toc-Specifying-what-to-tag-from-the-working-directory"></div>[[#Specifying what to tag from the working directory|Specifying what to tag from the working directory]]</li>
    <li><div id="toc-Specifying-what-to-tag-by-date-or-revision"></div>[[#Specifying what to tag by date or revision|Specifying what to tag by date or revision]]</li>
    <li><div id="toc-Deleting_002c-moving_002c-and-renaming-tags"></div>[[#Deleting, moving, and renaming tags|Deleting, moving, and renaming tags]]</li>
    <li><div id="toc-Tagging-and-adding-and-removing-files"></div>[[#Tagging and adding and removing files|Tagging and adding and removing files]]</li>
    <li><div id="toc-Sticky-tags-1"></div>[[#Sticky tags|Sticky tags]]</li>
  </ul></li>
  <li><div id="toc-Branching-and-merging-1"></div>[[#Branching and merging|Branching and merging]]
  <ul>
    <li><div id="toc-What-branches-are-good-for"></div>[[#What branches are good for|What branches are good for]]</li>
    <li><div id="toc-Creating-a-branch-1"></div>[[#Creating a branch|Creating a branch]]</li>
    <li><div id="toc-Accessing-branches-1"></div>[[#Accessing branches|Accessing branches]]</li>
    <li><div id="toc-Branches-and-revisions-1"></div>[[#Branches and revisions|Branches and revisions]]</li>
    <li><div id="toc-Magic-branch-numbers-1"></div>[[#Magic branch numbers|Magic branch numbers]]</li>
    <li><div id="toc-Merging-an-entire-branch"></div>[[#Merging an entire branch|Merging an entire branch]]</li>
    <li><div id="toc-Merging-from-a-branch-several-times"></div>[[#Merging from a branch several times|Merging from a branch several times]]</li>
    <li><div id="toc-Merging-differences-between-any-two-revisions"></div>[[#Merging differences between any two revisions|Merging differences between any two revisions]]</li>
    <li><div id="toc-Merging-can-add-or-remove-files"></div>[[#Merging can add or remove files|Merging can add or remove files]]</li>
    <li><div id="toc-Merging-and-keywords-1"></div>[[#Merging and keywords|Merging and keywords]]</li>
  </ul></li>
  <li><div id="toc-Recursive-behavior-1"></div>[[#Recursive behavior|Recursive behavior]]</li>
  <li><div id="toc-Adding_002c-removing_002c-and-renaming-files-and-directories"></div>[[#Adding, removing, and renaming files and directories|Adding, removing, and renaming files and directories]]
  <ul>
    <li><div id="toc-Adding-files-to-a-directory"></div>[[#Adding files to a directory|Adding files to a directory]]</li>
    <li><div id="toc-Removing-files-1"></div>[[#Removing files|Removing files]]</li>
    <li><div id="toc-Removing-directories-1"></div>[[#Removing directories|Removing directories]]</li>
    <li><div id="toc-Moving-and-renaming-files"></div>[[#Moving and renaming files|Moving and renaming files]]
    <ul>
      <li><div id="toc-The-Normal-way-to-Rename"></div>[[#The Normal way to Rename|The Normal way to Rename]]</li>
      <li><div id="toc-Moving-the-history-file"></div>[[#Moving the history file|Moving the history file]]</li>
      <li><div id="toc-Copying-the-history-file"></div>[[#Copying the history file|Copying the history file]]</li>
    </ul></li>
    <li><div id="toc-Moving-and-renaming-directories"></div>[[#Moving and renaming directories|Moving and renaming directories]]</li>
  </ul></li>
  <li><div id="toc-History-browsing-1"></div>[[#History browsing|History browsing]]
  <ul>
    <li><div id="toc-Log-messages"></div>[[#Log messages|Log messages]]</li>
    <li><div id="toc-The-history-database"></div>[[#The history database|The history database]]</li>
    <li><div id="toc-User_002ddefined-logging"></div>[[#User-defined logging|User-defined logging]]</li>
    <li><div id="toc-Annotate-command"></div>[[#Annotate command|Annotate command]]</li>
  </ul></li>
  <li><div id="toc-Handling-binary-files"></div>[[#Handling binary files|Handling binary files]]
  <ul>
    <li><div id="toc-The-issues-with-binary-files"></div>[[#The issues with binary files|The issues with binary files]]</li>
    <li><div id="toc-How-to-store-binary-files"></div>[[#How to store binary files|How to store binary files]]</li>
  </ul></li>
  <li><div id="toc-Multiple-developers-1"></div>[[#Multiple developers|Multiple developers]]
  <ul>
    <li><div id="toc-File-status-1"></div>[[#File status|File status]]</li>
    <li><div id="toc-Bringing-a-file-up-to-date"></div>[[#Bringing a file up to date|Bringing a file up to date]]</li>
    <li><div id="toc-Conflicts-example-1"></div>[[#Conflicts example|Conflicts example]]</li>
    <li><div id="toc-Informing-others-about-commits"></div>[[#Informing others about commits|Informing others about commits]]</li>
    <li><div id="toc-Several-developers-simultaneously-attempting-to-run-CVS"></div>[[#Several developers simultaneously attempting to run CVS|Several developers simultaneously attempting to run CVS]]</li>
    <li><div id="toc-Mechanisms-to-track-who-is-editing-files"></div>[[#Mechanisms to track who is editing files|Mechanisms to track who is editing files]]
    <ul>
      <li><div id="toc-Telling-CVS-to-watch-certain-files"></div>[[#Telling CVS to watch certain files|Telling CVS to watch certain files]]</li>
      <li><div id="toc-Telling-CVS-to-notify-you"></div>[[#Telling CVS to notify you|Telling CVS to notify you]]</li>
      <li><div id="toc-How-to-edit-a-file-which-is-being-watched"></div>[[#How to edit a file which is being watched|How to edit a file which is being watched]]</li>
      <li><div id="toc-Information-about-who-is-watching-and-editing"></div>[[#Information about who is watching and editing|Information about who is watching and editing]]</li>
      <li><div id="toc-Using-watches-with-old-versions-of-CVS"></div>[[#Using watches with old versions of CVS|Using watches with old versions of CVS]]</li>
    </ul></li>
    <li><div id="toc-Choosing-between-reserved-or-unreserved-checkouts"></div>[[#Choosing between reserved or unreserved checkouts|Choosing between reserved or unreserved checkouts]]</li>
  </ul></li>
  <li><div id="toc-Revision-management-1"></div>[[#Revision management|Revision management]]
  <ul>
    <li><div id="toc-When-to-commit_003f"></div>[[#When to commit?|When to commit?]]</li>
  </ul></li>
  <li><div id="toc-Keyword-substitution-1"></div>[[#Keyword substitution|Keyword substitution]]
  <ul>
    <li><div id="toc-Keyword-List"></div>[[#Keyword List|Keyword List]]</li>
    <li><div id="toc-Using-keywords-1"></div>[[#Using keywords|Using keywords]]</li>
    <li><div id="toc-Avoiding-substitution-1"></div>[[#Avoiding substitution|Avoiding substitution]]</li>
    <li><div id="toc-Substitution-modes-1"></div>[[#Substitution modes|Substitution modes]]</li>
    <li><div id="toc-Configuring-Keyord-Expansion"></div>[[#Configuring Keyord Expansion|Configuring Keyord Expansion]]</li>
    <li><div id="toc-Problems-with-the-_0024-Log_0024-keyword_002e"></div>[[#Problems with the $ Log$ keyword.|Problems with the $ <i></i>Log$ keyword.]]</li>
  </ul></li>
  <li><div id="toc-Tracking-third_002dparty-sources"></div>[[#Tracking third-party sources|Tracking third-party sources]]
  <ul>
    <li><div id="toc-Importing-for-the-first-time"></div>[[#Importing for the first time|Importing for the first time]]</li>
    <li><div id="toc-Updating-with-the-import-command"></div>[[#Updating with the import command|Updating with the import command]]</li>
    <li><div id="toc-Reverting-to-the-latest-vendor-release"></div>[[#Reverting to the latest vendor release|Reverting to the latest vendor release]]</li>
    <li><div id="toc-How-to-handle-binary-files-with-cvs-import"></div>[[#How to handle binary files with cvs import|How to handle binary files with cvs import]]</li>
    <li><div id="toc-How-to-handle-keyword-substitution-with-cvs-import"></div>[[#How to handle keyword substitution with cvs import|How to handle keyword substitution with cvs import]]</li>
    <li><div id="toc-Multiple-vendor-branches-1"></div>[[#Multiple vendor branches|Multiple vendor branches]]</li>
  </ul></li>
  <li><div id="toc-How-your-build-system-interacts-with-CVS"></div>[[#How your build system interacts with CVS|How your build system interacts with CVS]]</li>
  <li><div id="toc-Special-Files-1"></div>[[#Special Files|Special Files]]</li>
  <li><div id="toc-Guide-to-CVS-commands"></div>[[#Guide to CVS commands|Guide to CVS commands]]
  <ul>
    <li><div id="toc-Overall-structure-of-CVS-commands"></div>[[#Overall structure of CVS commands|Overall structure of CVS commands]]</li>
    <li><div id="toc-CVS_0027s-exit-status"></div>[[#CVS&rsquo;s exit status|CVS&rsquo;s exit status]]</li>
    <li><div id="toc-Default-options-and-the-_007e_002f_002ecvsrc-file"></div>[[#Default options and the ~/.cvsrc file|Default options and the ~/.cvsrc file]]</li>
    <li><div id="toc-Global-options-1"></div>[[#Global options|Global options]]</li>
    <li><div id="toc-Common-command-options"></div>[[#Common command options|Common command options]]</li>
    <li><div id="toc-admin_002d_002d_002dAdministration"></div>[[#admin&mdash;Administration|admin&mdash;Administration]]
    <ul>
      <li><div id="toc-admin-options-1"></div>[[#admin options|admin options]]</li>
    </ul></li>
    <li><div id="toc-checkout_002d_002d_002dCheck-out-sources-for-editing"></div>[[#checkout&mdash;Check out sources for editing|checkout&mdash;Check out sources for editing]]
    <ul>
      <li><div id="toc-checkout-options-1"></div>[[#checkout options|checkout options]]</li>
      <li><div id="toc-checkout-examples-1"></div>[[#checkout examples|checkout examples]]</li>
    </ul></li>
    <li><div id="toc-commit_002d_002d_002dCheck-files-into-the-repository"></div>[[#commit&mdash;Check files into the repository|commit&mdash;Check files into the repository]]
    <ul>
      <li><div id="toc-commit-options-1"></div>[[#commit options|commit options]]</li>
      <li><div id="toc-commit-examples-1"></div>[[#commit examples|commit examples]]
      <ul>
        <li><div id="toc-Committing-to-a-branch"></div>[[#Committing to a branch|Committing to a branch]]</li>
        <li><div id="toc-Creating-the-branch-after-editing"></div>[[#Creating the branch after editing|Creating the branch after editing]]</li>
      </ul>
</li>
    </ul></li>
    <li><div id="toc-diff_002d_002d_002dShow-differences-between-revisions"></div>[[#diff&mdash;Show differences between revisions|diff&mdash;Show differences between revisions]]
    <ul>
      <li><div id="toc-diff-options-1"></div>[[#diff options|diff options]]
      <ul>
        <li><div id="toc-Line-group-formats-1"></div>[[#Line group formats|Line group formats]]</li>
        <li><div id="toc-Line-formats-1"></div>[[#Line formats|Line formats]]</li>
      </ul></li>
      <li><div id="toc-diff-examples-1"></div>[[#diff examples|diff examples]]</li>
    </ul></li>
    <li><div id="toc-export_002d_002d_002dExport-sources-from-CVS_002c-similar-to-checkout"></div>[[#export&mdash;Export sources from CVS, similar to checkout|export&mdash;Export sources from CVS, similar to checkout]]
    <ul>
      <li><div id="toc-export-options-1"></div>[[#export options|export options]]</li>
    </ul></li>
    <li><div id="toc-history_002d_002d_002dShow-status-of-files-and-users"></div>[[#history&mdash;Show status of files and users|history&mdash;Show status of files and users]]
    <ul>
      <li><div id="toc-history-options-1"></div>[[#history options|history options]]</li>
    </ul></li>
    <li><div id="toc-import_002d_002d_002dImport-sources-into-CVS_002c-using-vendor-branches"></div>[[#import&mdash;Import sources into CVS, using vendor branches|import&mdash;Import sources into CVS, using vendor branches]]
    <ul>
      <li><div id="toc-import-options-1"></div>[[#import options|import options]]</li>
      <li><div id="toc-import-output-1"></div>[[#import output|import output]]</li>
      <li><div id="toc-import-examples-1"></div>[[#import examples|import examples]]</li>
    </ul></li>
    <li><div id="toc-log_002d_002d_002dPrint-out-log-information-for-files"></div>[[#log&mdash;Print out log information for files|log&mdash;Print out log information for files]]
    <ul>
      <li><div id="toc-log-options-1"></div>[[#log options|log options]]</li>
      <li><div id="toc-log-examples-1"></div>[[#log examples|log examples]]</li>
    </ul></li>
    <li><div id="toc-rdiff_002d_002d_002d_0027patch_0027-format-diffs-between-releases"></div>[[#rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases|rdiff&mdash;&rsquo;patch&rsquo; format diffs between releases]]
    <ul>
      <li><div id="toc-rdiff-options-1"></div>[[#rdiff options|rdiff options]]</li>
      <li><div id="toc-rdiff-examples-1"></div>[[#rdiff examples|rdiff examples]]</li>
    </ul></li>
    <li><div id="toc-release_002d_002d_002dIndicate-that-a-Module-is-no-longer-in-use"></div>[[#release&mdash;Indicate that a Module is no longer in use|release&mdash;Indicate that a Module is no longer in use]]
    <ul>
      <li><div id="toc-release-options-1"></div>[[#release options|release options]]</li>
      <li><div id="toc-release-output-1"></div>[[#release output|release output]]</li>
      <li><div id="toc-release-examples-1"></div>[[#release examples|release examples]]</li>
    </ul></li>
    <li><div id="toc-update_002d_002d_002dBring-work-tree-in-sync-with-repository"></div>[[#update&mdash;Bring work tree in sync with repository|update&mdash;Bring work tree in sync with repository]]
    <ul>
      <li><div id="toc-update-options-1"></div>[[#update options|update options]]</li>
      <li><div id="toc-update-output-1"></div>[[#update output|update output]]</li>
    </ul>
</li>
  </ul></li>
  <li><div id="toc-Quick-reference-to-CVS-commands"></div>[[#Quick reference to CVS commands|Quick reference to CVS commands]]</li>
  <li><div id="toc-Reference-manual-for-Administrative-files"></div>[[#Reference manual for Administrative files|Reference manual for Administrative files]]
  <ul>
    <li><div id="toc-The-modules-file"></div>[[#The modules file|The modules file]]
    <ul>
      <li><div id="toc-Alias-modules-1"></div>[[#Alias modules|Alias modules]]</li>
      <li><div id="toc-Regular-modules-1"></div>[[#Regular modules|Regular modules]]</li>
      <li><div id="toc-Ampersand-modules-1"></div>[[#Ampersand modules|Ampersand modules]]</li>
      <li><div id="toc-Excluding-directories-1"></div>[[#Excluding directories|Excluding directories]]</li>
      <li><div id="toc-Module-options-1"></div>[[#Module options|Module options]]</li>
      <li><div id="toc-How-the-modules-file-_0060_0060program-options_0027_0027-programs-are-run"></div>[[#How the modules file &ldquo;program options&rdquo; programs are run|How the modules file &ldquo;program options&rdquo; programs are run]]</li>
    </ul></li>
    <li><div id="toc-The-cvswrappers-file"></div>[[#The cvswrappers file|The cvswrappers file]]</li>
    <li><div id="toc-The-commit-support-files"></div>[[#The commit support files|The commit support files]]
    <ul>
      <li><div id="toc-The-common-syntax"></div>[[#The common syntax|The common syntax]]</li>
      <li><div id="toc-Commitinfo"></div>[[#Commitinfo|Commitinfo]]</li>
      <li><div id="toc-Verifying-log-messages"></div>[[#Verifying log messages|Verifying log messages]]</li>
      <li><div id="toc-Editinfo"></div>[[#Editinfo|Editinfo]]
      <ul>
        <li><div id="toc-Editinfo-example"></div>[[#Editinfo example|Editinfo example]]</li>
      </ul></li>
      <li><div id="toc-Loginfo"></div>[[#Loginfo|Loginfo]]
      <ul>
        <li><div id="toc-Loginfo-example"></div>[[#Loginfo example|Loginfo example]]</li>
        <li><div id="toc-Keeping-a-checked-out-copy-1"></div>[[#Keeping a checked out copy|Keeping a checked out copy]]</li>
      </ul>
</li>
    </ul></li>
    <li><div id="toc-Rcsinfo"></div>[[#Rcsinfo|Rcsinfo]]</li>
    <li><div id="toc-Ignoring-files-via-cvsignore"></div>[[#Ignoring files via cvsignore|Ignoring files via cvsignore]]</li>
    <li><div id="toc-The-checkoutlist-file"></div>[[#The checkoutlist file|The checkoutlist file]]</li>
    <li><div id="toc-The-history-file"></div>[[#The history file|The history file]]</li>
    <li><div id="toc-Expansions-in-administrative-files"></div>[[#Expansions in administrative files|Expansions in administrative files]]</li>
    <li><div id="toc-The-CVSROOT_002fconfig-configuration-file"></div>[[#The CVSROOT/config configuration file|The CVSROOT/config configuration file]]</li>
  </ul></li>
  <li><div id="toc-All-environment-variables-which-affect-CVS"></div>[[#All environment variables which affect CVS|All environment variables which affect CVS]]</li>
  <li><div id="toc-Compatibility-between-CVS-Versions"></div>[[#Compatibility between CVS Versions|Compatibility between CVS Versions]]</li>
  <li><div id="toc-Troubleshooting-1"></div>[[#Troubleshooting|Troubleshooting]]
  <ul>
    <li><div id="toc-Partial-list-of-error-messages"></div>[[#Partial list of error messages|Partial list of error messages]]</li>
    <li><div id="toc-Trouble-making-a-connection-to-a-CVS-server"></div>[[#Trouble making a connection to a CVS server|Trouble making a connection to a CVS server]]</li>
    <li><div id="toc-Other-common-problems"></div>[[#Other common problems|Other common problems]]</li>
  </ul></li>
  <li><div id="toc-Credits-1"></div>[[#Credits|Credits]]</li>
  <li><div id="toc-Dealing-with-bugs-in-CVS-or-this-manual"></div>[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</li>
  <li><div id="toc-Index-1"></div>[[#Index|Index]]</li>
</ul>
</div>

----

<div id="SEC_Overview"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
== Short Table of Contents ==

<div class="shortcontents">
<ul>
<li><div id="stoc-Overview-1"></div>[[#Overview|Overview]]</li>
<li><div id="stoc-The-Repository"></div>[[#The Repository|The Repository]]</li>
<li><div id="stoc-Starting-a-project-with-CVS"></div>[[#Starting a project with CVS|Starting a project with CVS]]</li>
<li><div id="stoc-Revisions-1"></div>[[#Revisions|Revisions]]</li>
<li><div id="stoc-Branching-and-merging-1"></div>[[#Branching and merging|Branching and merging]]</li>
<li><div id="stoc-Recursive-behavior-1"></div>[[#Recursive behavior|Recursive behavior]]</li>
<li><div id="stoc-Adding_002c-removing_002c-and-renaming-files-and-directories"></div>[[#Adding, removing, and renaming files and directories|Adding, removing, and renaming files and directories]]</li>
<li><div id="stoc-History-browsing-1"></div>[[#History browsing|History browsing]]</li>
<li><div id="stoc-Handling-binary-files"></div>[[#Handling binary files|Handling binary files]]</li>
<li><div id="stoc-Multiple-developers-1"></div>[[#Multiple developers|Multiple developers]]</li>
<li><div id="stoc-Revision-management-1"></div>[[#Revision management|Revision management]]</li>
<li><div id="stoc-Keyword-substitution-1"></div>[[#Keyword substitution|Keyword substitution]]</li>
<li><div id="stoc-Tracking-third_002dparty-sources"></div>[[#Tracking third-party sources|Tracking third-party sources]]</li>
<li><div id="stoc-How-your-build-system-interacts-with-CVS"></div>[[#How your build system interacts with CVS|How your build system interacts with CVS]]</li>
<li><div id="stoc-Special-Files-1"></div>[[#Special Files|Special Files]]</li>
<li><div id="stoc-Guide-to-CVS-commands"></div>[[#Guide to CVS commands|Guide to CVS commands]]</li>
<li><div id="stoc-Quick-reference-to-CVS-commands"></div>[[#Quick reference to CVS commands|Quick reference to CVS commands]]</li>
<li><div id="stoc-Reference-manual-for-Administrative-files"></div>[[#Reference manual for Administrative files|Reference manual for Administrative files]]</li>
<li><div id="stoc-All-environment-variables-which-affect-CVS"></div>[[#All environment variables which affect CVS|All environment variables which affect CVS]]</li>
<li><div id="stoc-Compatibility-between-CVS-Versions"></div>[[#Compatibility between CVS Versions|Compatibility between CVS Versions]]</li>
<li><div id="stoc-Troubleshooting-1"></div>[[#Troubleshooting|Troubleshooting]]</li>
<li><div id="stoc-Credits-1"></div>[[#Credits|Credits]]</li>
<li><div id="stoc-Dealing-with-bugs-in-CVS-or-this-manual"></div>[[#Dealing with bugs in CVS or this manual|Dealing with bugs in CVS or this manual]]</li>
<li><div id="stoc-Index-1"></div>[[#Index|Index]]</li>
</ul>
</div>

----

<div id="SEC_About"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#Top|Top]]|</td>
<td valign="middle" align="left">|[[#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[#Index|Index]]|</td>
<td valign="middle" align="left">|[[#SEC_About| ? ]]|</td>
</tr></table>
== About This Document ==

<p>
  This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
</p>
<p>
  The buttons in the navigation panels have the following meaning:
</p>
<table border="1">
  <tr>
    <th> Button </th>
    <th> Name </th>
    <th> Go to </th>
    <th> From 1.2.3 go to</th>
  </tr>
  <tr>
    <td align="center"> [ &lt;&lt; ] </td>
    <td align="center">FastBack</td>
    <td>Beginning of this chapter or previous chapter</td>
    <td>1</td>
  </tr>
  <tr>
    <td align="center"> [ &lt; ] </td>
    <td align="center">Back</td>
    <td>Previous section in reading order</td>
    <td>1.2.2</td>
  </tr>
  <tr>
    <td align="center"> [ Up ] </td>
    <td align="center">Up</td>
    <td>Up section</td>
    <td>1.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt; ] </td>
    <td align="center">Forward</td>
    <td>Next section in reading order</td>
    <td>1.2.4</td>
  </tr>
  <tr>
    <td align="center"> [ &gt;&gt; ] </td>
    <td align="center">FastForward</td>
    <td>Next chapter</td>
    <td>2</td>
  </tr>
  <tr>
    <td align="center"> [Top] </td>
    <td align="center">Top</td>
    <td>Cover (top) of document</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Contents] </td>
    <td align="center">Contents</td>
    <td>Table of contents</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Index] </td>
    <td align="center">Index</td>
    <td>Index</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [ ? ] </td>
    <td align="center">About</td>
    <td>About (help)</td>
    <td> &nbsp; </td>
  </tr>
</table>

<p>
  where the ''' Example ''' assumes that the current position is at ''' Subsubsection One-Two-Three ''' of a document of the following structure:
</p>

<ul>
  <li> 1. Section One
    <ul>
      <li>1.1 Subsection One-One
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.2 Subsection One-Two
        <ul>
          <li>1.2.1 Subsubsection One-Two-One</li>
          <li>1.2.2 Subsubsection One-Two-Two</li>
          <li>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
            <strong>&lt;== Current Position </strong></li>
          <li>1.2.4 Subsubsection One-Two-Four</li>
        </ul>
      </li>
      <li>1.3 Subsection One-Three
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.4 Subsection One-Four</li>
    </ul>
  </li>
</ul>


----

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
