Setting-up CVS.

Specifying the repository.

CVS commands need to know where to find the root directory of the CVS repository to consult. One can do this explicitly in the command, using the -d option:

    cvs -d /usr/local/cvsroot co yoyodyne/tc

Or, one can define a default repository in the environment variable $CVSROOT:

    export CVSROOT=/usr/local/cvsroot
    cvs co yoyodyne/tc

How do I create a repository?

Repositories are created with the cvs init command. For example, using the -d option to specify its location:

    cvs -d /usr/local/cvsroot init

How do I create a project hierarchy?

To create a project hierarchy from scratch, say under $CVSROOT/yoyodyne/dir, issue the following commands:

    mkdir tmp
    mkdir tmp/man
    mkdir tmp/man/testing
    cd tmp
    cvs import -m"Created directory structure" yoyodyne/dir yoyo start

Thereafter, use cvs add to add new files and directories as they are created. “yoyo” is the vendor tag, and “start” is the release tag.

To verify and clean-up:

    cd ..
    cvs co yoyodyne/dir
    diff -r tmp yoyodyne/dir
    rm -r tmp

To create a repository from an existing directory tree (that does not have any CVS/ directories in it), use:

    cd wdir
    cvs import -m"Imported sources" yoyodyne/rdir yoyo start