(Skip to menu.)

CVS instructions

Here are some quick instructions for using cvs. Before beginning, you should set favorite editor as the default in ~/.cshrc (for tcsh):
setenv EDITOR pico
or ~/.bashrc (for bash):
export EDITOR=pico
Now that you have that set, login again and
  1. Set up a new cvsroot
    1. make a directory ~/cvsroot
    2. within this directory, run cvs init
    3. make a directory for you project, e.g. paper
    4. if you want others to have access to it, do chmod -R a+rw ~/cvsroot/paper. You might have to run this whenever you add new files...
  2. Create a working directory: go back to your home directory and run cvs -d /users/login/cvsroot get paper
  3. Add new files:
    1. make some files, e.g. paper.tex
    2. run cvs add paper.tex to register the file
    3. run cvs commit to check in your version of the file
    4. your editor will pop up for you to make comments if you like - save the file after making your comments and exit the editor
  4. Edit files:
    1. run cvs update to get the latest versions
    2. make your edits
    3. run cvs update again to check for conflicts
    4. if there are conflicts from two people editing the same line at the same time, resolve them by editing the file
    5. run cvs commit to submit your changes
You can repeat steps 3 and 4 as often as you like. Remember to make backup copies of the cvsroot once in a while - CVS is not a backup system!! If you accidentally remove files from the cvsroot, the files will be deleted from your working directory at the next cvs update, so watch out!!

Emacs tricks for CVS

Emacs works very well with CVS. To check in changes to a file, just press C-x v v. Emacs will prompt you for a message - type C-c C-c when done. To view the comments for all versions of a file, type C-x v l. C-x v g will show you who edited each line and when. Even better, C-u C-x v g will give you control over what version to annotate and the time scale (in units of years) for coloring. For a paper that is just a few days old, use a ratio of 0.01.