CVS Guide

As part of a software planning course I created a set of slides for my groups presentation of CVS as a configuration mangement tool.

The originaly slides are available in a danish version
Slides.pdf (77.01kb)

Creating a CVS tree

Directory structure

  • report
    • graphics
  • source
    • client
    • server
  • slides


Creating the CVS repository
$ mkdir /project/s301a/cvstree

Tell CVS where it can find the repository
$ export CVSROOT=/project/s301a/cvstree

Create the repository
$ cvs init

Importing directory structure
In the following e3104 is the module name to import.

First we need to create all the directories to make up the directory structure we want in our repository.

$ mkdir -p ~/tmp/e3104
$ cd ~/tmp/e3104

$ mkdir report
$ mkdir report/graphics
$ mkdir source
$ mkdir source/client
$ mkdir source/server
$ mkdir slides

$ cd ~/tmp

Then we can import the directories using the cvs import command.

$ cvs import -m "Imported directory structure." . E3-104 start
cvs import: Importing /project/s301a/cvstree/./e3104/report
cvs import: Importing /project/s301a/cvstree/./e3104/source
cvs import: Importing /project/s301a/cvstree/./e3104/slides

No conflicts created by this import


E3-104 is the vendor tag, you properbly want to change this with your group or company tag.

Finally we remove the tempoary directory structure.

$ cd ~
$ rm -rf tmp

Checking out a module

After having created the CVS repository, developers can on each their account export the CVSROOT variable

$ export CVSROOT=/project/s301a/cvstree

and checkout the e3104 module to start editing their local copy.

$ cvs checkout e3104
cvs checkout: Updating e3104
cvs checkout: Updating e3104/report
cvs checkout: Updating e3104/report/graphics
cvs checkout: Updating e3104/slides
cvs checkout: Updating e3104/source
cvs checkout: Updating e3104/source/client
cvs checkout: Updating e3104/source/server

Adding files and directories

Commiting changes

File differences

Merging file differences

Retrieving old file versions

Branching

Advanced

Working from home or laptop using CVS via SSH
$ export CVS_RSH=ssh
$ export CVS_SERVER=/pack/cvs/bin/cvs
$ cvs -d user [at] server.com:/project/s301a/cvstree co e3104

Announcing changes via e-mail

Extra tools