1<div id="Specifying-a-repository"></div>
2<div class="header">
3<p>
4Next: [[cvs: How data is stored in the repository#How data is stored in the repository|Repository storage]], Up: [[cvs: The Repository#The Repository|Repository]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
5</div>
6
7----
8
9<div id="Telling-CVS-where-your-repository-is"></div>
10=== Telling CVS where your repository is ===
11
12There are several ways to tell <small>CVS</small>
13where to find the repository.  You can name the
14repository on the command line explicitly, with the
15<code>-d</code> (for &quot;directory&quot;) option:
16
17<div class="example" style="margin-left: 3.2em">
18 cvs -d /usr/local/cvsroot checkout yoyodyne/tc
19</div>
20
21<div id="index-_002eprofile_002c-setting-CVSROOT-in"></div>
22<div id="index-_002ecshrc_002c-setting-CVSROOT-in"></div>
23<div id="index-_002etcshrc_002c-setting-CVSROOT-in"></div>
24<div id="index-_002ebashrc_002c-setting-CVSROOT-in"></div>
25<div id="index-CVSROOT_002c-environment-variable"></div>
26Or you can set the <code>$CVSROOT</code> environment
27variable to an absolute path to the root of the
28repository, &lsquo;<tt>/usr/local/cvsroot</tt>&rsquo; in this example.
29To set <code>$CVSROOT</code>, <code>csh</code> and <code>tcsh</code>
30users should have this line in their &lsquo;<tt>.cshrc</tt>&rsquo; or
31&lsquo;<tt>.tcshrc</tt>&rsquo; files:
32
33<div class="example" style="margin-left: 3.2em">
34 setenv CVSROOT /usr/local/cvsroot
35</div>
36
37<code>sh</code> and <code>bash</code> users should instead have these lines in their
38&lsquo;<tt>.profile</tt>&rsquo; or &lsquo;<tt>.bashrc</tt>&rsquo;:
39
40<div class="example" style="margin-left: 3.2em">
41 CVSROOT=/usr/local/cvsroot
42 export CVSROOT
43</div>
44
45<div id="index-Root-file_002c-in-CVS-directory"></div>
46<div id="index-CVS_002fRoot-file"></div>
47A repository specified with <code>-d</code> will
48override the <code>$CVSROOT</code> environment variable.
49Once you&rsquo;ve checked a working copy out from the
50repository, it will remember where its repository is
51(the information is recorded in the
52&lsquo;<tt>CVS/Root</tt>&rsquo; file in the working copy).
53
54The <code>-d</code> option and the &lsquo;<tt>CVS/Root</tt>&rsquo; file both
55override the <code>$CVSROOT</code> environment variable.  If
56<code>-d</code> option differs from &lsquo;<tt>CVS/Root</tt>&rsquo;, the
57former is used.  Of course, for proper operation they
58should be two ways of referring to the same repository.
59
60This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
61