CVS Instructions
This is a brief overview on using CVS for revisions. It assumes a
relatively simple project, with only a few people.
Setting Up
-
Make a directory on Elvis for CVS to keep files in. If you are
going to work by yourself, set it mode 700. If you are working
with a group of people, set it mode 770 and use chgrp(1) to put
it in the right group, or use an ACL. I will assume you have named
the directory CVS-Main. If you named it something else, make
appropriate changes to the commands that appear later.
-
Tell your shell where the CVS directory is:
setenv CVSROOT ~/CVS-Main
You can put this in your ~/.cshrc file, and it will be automatic.
If you're working in a group, be sure to use the home directory of
whoever in your group created CVS-Main.
-
Go to the directory where you have started your project, or
create the directory you will be using for your project. It's
best to name the directory the same name you'll be using for the
CVS archive. Copy whatever files you already have, and then add
whatever files you'll be adding (the source files, the Makefile,
data files, etc).
-
Import the files into CVS, so it will make a copy of everything in
its archive. I will assume that your project is FunStuff,
and your username is homer:
cvs import -m "My Fun Programming Project" FunStuff initial homer
This will create an archive of everything in this directory and
under it, so if you have core dumps or other such stuff clean up
first.
Working On A Project Archived With CVS
Now that the project is in CVS, and your shell knows where to look,
any person with access to the directory can get at the latest version of
the files whenever needed. After making updates and changes, you can
test them out and then commit your changes, so the next person to work
has access to your most recent updates.
-
Checking Out a Copy of the Project
-
Go into a directory where you want to work, and run:
cvs checkout FunStuff
It will create a directory called "FunStuff", with all the files
in it.
-
Committing Your Changes To CVS
-
Inside the directory where you are working, run:
cvs commit
You will get an editor window into which you should type a log
message about what changes you made. If your changes will overlap
someone else's changes, the commit will fail, and you will have to
update your files to match the latest revision first.
-
Updating Your Copy to Match the CVS Repository
-
Inside the directory where you are working, run:
cvs update
Your files will be updated to match the most recently committed
versions. If there are conflicts, you will get a message about
them, and CVS will modify the files indicating what went wrong.
Then you're on your own to clean up.
|