1<div id="Creating-a-repository"></div> 2<div class="header"> 3<p> 4Next: [[cvs: Backing up a repository#Backing up a repository|Backing up]], Previous: [[cvs: Multiple repositories#Multiple repositories|Multiple repositories]], Up: [[cvs: The Repository#The Repository|Repository]] |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p> 5</div> 6 7---- 8 9<div id="Creating-a-repository-1"></div> 10=== Creating a repository === 11 12<div id="index-Repository_002c-setting-up"></div> 13<div id="index-Creating-a-repository"></div> 14<div id="index-Setting-up-a-repository"></div> 15 16To set up a <small>CVS</small> repository, first choose the 17machine and disk on which you want to store the 18revision history of the source files. CPU and memory 19requirements are modest, so most machines should be 20adequate. For details see [[cvs: Server requirements#Server requirements|Server requirements]]. 21 22To estimate disk space 23requirements, if you are importing RCS files from 24another system, the size of those files is the 25approximate initial size of your repository, or if you 26are starting without any version history, a rule of 27thumb is to allow for the server approximately three 28times the size of the code to be under <small>CVS</small> for the 29repository (you will eventually outgrow this, but not 30for a while). On the machines on which the developers 31will be working, you’ll want disk space for 32approximately one working directory for each developer 33(either the entire tree or a portion of it, depending 34on what each developer uses). 35 36The repository should be accessible 37(directly or via a networked file system) from all 38machines which want to use <small>CVS</small> in server or local 39mode; the client machines need not have any access to 40it other than via the <small>CVS</small> protocol. It is not 41possible to use <small>CVS</small> to read from a repository 42which one only has read access to; <small>CVS</small> needs to be 43able to create lock files (see [[cvs: Several developers simultaneously attempting to run CVS#Several developers simultaneously attempting to run CVS|Concurrency]]). 44 45<div id="index-init-_0028subcommand_0029"></div> 46To create a repository, run the <code>cvs init</code> 47command. It will set up an empty repository in the 48<small>CVS</small> root specified in the usual way 49(see [[cvs: The Repository#The Repository|Repository]]). For example, 50 51<div class="example" style="margin-left: 3.2em"> 52 cvs -d /usr/local/cvsroot init 53</div> 54 55<code>cvs init</code> is careful to never overwrite any 56existing files in the repository, so no harm is done if 57you run <code>cvs init</code> on an already set-up 58repository. 59 60<code>cvs init</code> will enable history logging; if you 61don’t want that, remove the history file after running 62<code>cvs init</code>. See [[cvs: The history file#The history file|history file]]. 63 64 65---- 66 67<div class="header"> 68<p> 69Next: [[cvs: Backing up a repository#Backing up a repository|Backing up]], Previous: [[cvs: Multiple repositories#Multiple repositories|Multiple repositories]], Up: [[cvs: The Repository#The Repository|Repository]] |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p> 70</div> 71This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>]. 72