How do I create a CVS repository?

Introduction

CVS (Concurrent Versions System) is a tool used by many software developers to manage changes within their source code tree. CVS provides the means to store not only the current version of a piece of source code, but a record of all changes (and who made those changes) that have occurred to that source code. The CVS server stores a copy of the software and data that the project has uploaded to that server. The server retains both the most recent version of each file and every historical version of the file (past changes). This copy of the software and data uploaded by the project is called a CVS repository.

How to Create a CVS Repository?

1. Create a directory called cvsroot in the home directory of an account where you and those of your group who will need to get to the repository have access. All the accounts accessing the repository should be members of the same group.

$ mkdir ~/cvsroot

2. Change group ownership of the cvsroot directory to the same group that contains the cvs members (the -R simply means that this command affects the specified directory plus any files or directories under it).

$ chgrp -R <cvsgroup> ~/cvsroot

3. Give the group write permission to the repository. The s forces everything in the file tree to be in the same group.

$ chmod -R g+rwXs ~/cvsroot

4. This allows members of the group to access the CVS root via your home directory.

$ chgrp <cvsgroup> ~
$ chmod g+X ~

5. Then, for every member who will be accessing the repository, add these environment variables to your login environment script:

CVS_RSH ssh
CVSROOT servername.seas.upenn.edu:/home/user/cvsroot

For example:

CVSROOT seas.upenn.edu:home1/b/barbara
© Computing and Educational Technology Services