[1] Setting up a CVS repository on your account   |   [2] Setting up other members in group to use CVS on your account   |   [3] Basic CVS commands   |   [4] Resources

[1] Setting up a CVS repository on your account

A. Adding the CVSROOT environment variable

B. Setting up the CVS repository so that other group members and yourself can checkout/in files.

  1. Go to your root directory
  2. type: groups     (this determines which groups you are a part of. Remember the group name you wish to use CVS with)
  3. type: umask 007     (all new files will be locked to outsiders but readable and writable by the owner and group of the file)
  4. type: mkdir .cvsroot     (this is the CVS repository)
  5. type: chgrp group_name .cvsroot     (allows the group 'group_name' access to the .cvsroot repository - substitute group_name with a group name from step 2 [i.e. cs354_31] )
  6. type: chmod 2770 .cvsroot     (makes the repository owner and group readable and writable)
  7. type: mkdir .cvsroot/CVSROOT     (all the files that CVS needs are stored within this directory)
  8. type: mkdir .cvsroot/project     (where project is the name of the project you're working on. Make as many 'project's as desired. A module with the name 'project' will be used [this name goes in the file modules, as described on step 12])
  9. type: cvs init     (this populates the .cvsroot/CVSROOT directory with the files that CVS needs. This step assumes the CVSROOT environment variable has been set)
  10. Go to your root directory
  11. type: cvs checkout CVSROOT/modules     (this creates a CVSROOT directory tree in your root)
  12. Edit the file (~/CVSROOT/modules) and insert a line that defines the module(s) you're working on (i.e. 'project').
    Add the following line at the end of the file (you can add as many modules as needed):
    project_name     project     (where project_name is the name of the module you want defined, and project is the name of the directory containing the files [as created on step 8])
  13. Save ~/CVSROOT/modules
  14. type: cvs commit -m "The message to log with this change" CVSROOT/modules     (this commits this changed file into the repository)
  15. type: cvs release -d CVSROOT     (this releases (and deletes) the CVSROOT working directory, which you just checked out/in)

To import an existing directory (with files) into the repository:

Otherwise, files can be added to the repository via:
cvs add file_name
cvs commit

MAKE SURE that the CVS repository is NOT world-readable:

CVS is now set up on your account for the people in group_name to access/modify/update files within .cvsroot/project

[2] Setting up other members in group 'group_name' to access CVS on the account where the CVS repository resides

  1. Each member should add the following two lines to their .cshrc (or equivalent) file:
    umask 007     (this will replace any existing umask)
    setenv CVSROOT /u/mypartner/.cvsroot     (where, in this case, '/u/mypartner/' would be set to what $HOME was above [i.e. '/u2/rmflatt/'] )
  2. Logout and log back in for these changes to take affect

You are now ready to checkout any modules that were created in section [1].

To checkout a project:

[3] Basic CVS commands

[4] Resources

CVS homepage
Created by: Rob Flatt
Last Modified: 030116