CVS for MRSRL Grants

Brian Hargreaves
Other MRSRL CVS Links

This is a quick page designed to get you started using CVS when somebody else has set up the CVS archive for a grant.

It assumes you're using a command-line-based CVS system.


1. Bookmark this Page

This page is kept short to try to get you going quickly. However, you're going to have to learn it all at some point.

So, please bookmark this page. When there is something that you don't know how to do, follow the "Other CVS Links" above, which should answer this question!

2. Setup Environment Variables

Now add the following lines to your .cshrc, .bashrc, .bash_profile, etc file: (to find out what shell you are running, type echo $SHELL.)

.cshrc     .bash_profile
#CVS Environment variables
setenv CVSEDITOR emacs
setenv CVS_RSH ssh

    #CVS Environment variables
export CVSEDITOR=emacs
export CVS_RSH=ssh

This tells the system what editor to call up (you could replace emacs with vi) and to use ssh to connect to other machines. (Most machines will only accept ssh connections.)

Now run source ~/.bash_profile

(or .cshrc if applicable).

3. Check out a Project

This is the same for our example as it is for the case where another user checks out an existing project. Checking out a project in CVS will create a CVS working copy. If you are using a linux machine on the linux network (dr1-6, warp, fisp, ssfp, sade, etc but NOT quench, crad) run:

cd ~
cvs -d /mrsrl/home/cvs/depot checkout samplegrant

If you are using ANY other machine, run:

cd ~
cvs -d :ext:yourname@dr4.stanford.edu:/mrsrl/home/cvs/depot checkout samplegrant

Now you have a directory called samplegrant, which should have a subdirectory called CVS. (all directories under CVS control will have this subdirectory). There are files and maybe subdirectories in this directory too. You can replace samplegrant with the grant you actually want, but for now mess around with samplegrant and get used to CVS.

4. Updating the Working Directory

Update is one of the most important CVS commands. It updates your working directory from the repository, but also tells you status of files. Try it:

cvs update

5. Making Changes

After you've edited a file, you will want to change it in the repository. To do this, type:

cvs commit -m "Nice message describing changes" A.tex

A.tex is one of the files in samplegrant.

6. Adding files

If you have created a file in your working directory, you can add it to the repository as: cvs add newfile.tex

If the file is not to be treated as text (ie .gif, .jpg, .ps, .eps, .pdf) then use: cvs add -kb newfile.pdf

(DON'T check in .ps or .eps files as text - CVS may screw them up!)

7. Please send comments to Brian

Honestly, CVS is the best way to work on grants. (John, Steve, Krish and I all agree on this. Bob and Mike haven't complained. Dwight agrees in principle.)

Anyway, I haven't spent hours on this for nothing, so let's try to get everyone running with it.