<div id="Multiple-repositories"></div>
<div class="header">
<p>
Next: [[cvs: Creating a repository#Creating a repository|Creating a repository]], Previous: [[cvs: The administrative files#The administrative files|Intro administrative files]], Up: [[cvs: The Repository#The Repository|Repository]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<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 [[cvs: Telling CVS where your repository is#Telling CVS where your repository is|Specifying a repository]]).

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.


This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
