CVS Tutorial

mail bugs to jjlilley@mit.edu
Introduction:
CVS is a revision control manager used in Metaglue that is
essentially a multi-user front-end for RCS. Users can check out
whole directories of files, edit files, then commit them back
into the baseline repository when they compile properly.
Changes that others commit to the central repository can be
dynamically updated into your own directory, with changes to
the same files being merged intelligently.
Individual files in a CVS directory must be explicitly added
and removed from CVS control. Since CVS stores files by
diffs, it is customary to control only source files (and
make files, etc.) and not to control object files.
The files are all put in the CVS repository, which is determined by
the CVSROOT environmental variable. The one for Hal/Metaglue
is at /HOME/HCI/METAGLUE/CVS. Do not edit the files there
manually.
Reference:
- Checking out a directory locally:
cvs checkout directory
The directory will be make off the current directory.
- To "uncheckout" a directory:
One generally keeps a checked out directory around and simply
runs CVS update to retrieve new changes. If you don't
need it anymore, just rm -r the directory.
- To Update your directory FROM the baseline's latest changes:
cvs update
There are normally no other parameters -- you should be in the
directory under CVS control.
CVS knows it controls a directory because of a CVS
file put on the controlled directory.
You should generally update before you start working...
- To Commit your changes TO the baseline:
cvs commit
There are normally no other parameters -- you should be in the
directory under CVS control.
CVS knows it controls a directory because of a CVS
file put on the controlled directory.
It will pull up an emacs buffer for you to type up a log entry.
If you made some changes that you don't like, rm the file, then
update into the directory to replace with a baseline copy.
You should commit only working versions into team projects
and do so every time you have made useful changes/advance.
- To Add a file to the baseline:
cvs add filename
cvs commit
After the file exists, do the cvs add, then commit.
Do NOT add object files (only source files).
- To Remove a file to the baseline:
cvs remove filename
cvs commit
Delete the file. Then cvs remove, then commit.
- To import a new directory/directory structure to CVS control:
Create the directory, add some interesting files,
remove useless files like tilde emacs files, .class files...
cd [dir-name]
cvs import [dir-name] [vendor-tag] [version-tag]
cd ..
cvs checkout [dir-name]
- To have the commit email sent to more email addresses:
cvs checkout CVSROOT
(all admin files are in CVSROOT)
There's a file called loginfo in that module that has an
line like:
DEFAULT mhmail jjlilley@ai.mit.edu hau@ai.mit.edu dmcguire@ai.mit.edu -subject metaglue_commit_notice
Change it as necessary.
cvs commit
remove the unnecessary CVSROOT directory you checked out.