Setting up CVS on linux

This is a simple step-by-step setup for a CVS for a single person. I use this to keep track of the version of my thesis. All of this is straight from the cvs info manual.

  1. set environment variable CVSROOT, for example if you run zsh, put CVSROOT=/opt/cvsroot; export CVSROOT into your .zshrc file.
  2. make sure you own the directory: sudo chown YOU:YOU /opt/cvsroot
  3. Run cvs init. This creates a repository in the CVSROOT directory.
  4. Now we want to import the files into the CVS directory. cd into the directory you want to use CVS on and do cvs import -m "Imported sources" NAME_IN_CVS YOU start where NAME_IN_CVS is the name the directory will have in the CVS tree. The -m thingy will add the message following it to the log file.
  5. To edit a file, you get a local copy of what's in the repository by doing cvs checkout DIR Once you're done with editing, and want to commit the changes to the CVS, run cvs commit DIR
  6. If you later on want to add a file, get a copy of the directory as above, put the file into the directory and do cvs add FILENAME. Similarly, if you want to remove a file, remove it from your local copy and run cvs remove FILENAME.