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.
- set environment variable CVSROOT, for example if you run zsh, put
CVSROOT=/opt/cvsroot; export CVSROOTinto your .zshrc file. - make sure you own the directory: sudo chown YOU:YOU /opt/cvsroot
- Run cvs init. This creates a repository in the CVSROOT directory.
- 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 startwhere 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. - To edit a file, you get a local copy of what's in the repository by doing
cvs checkout DIROnce you're done with editing, and want to commit the changes to the CVS, runcvs commit DIR - 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.