CVS is a system which enables a group of people to co-operate. For a group of
volunteers and professionals like us, it's a great tool to use. You only have
to focus on your own work. CVS will take care of merging it with the shared
source-tree (aka the repository). I'm going to try to explain the basic
functions, those you'll need the most and which you can't live without. For
more information check the related links below !
Anonymous CVS
Those interested in the inners of the website can download the www-repository
anonymously by doing the following:
export CVSROOT=cvs@badlands.rug.ac.be:/cvs
export CVS_RSH=/usr/bin/ssh
cvs checkout www/
Beware: this way you cannot commit changes to the repository, this is
only useful to peek into the repository.
Using CVS locally to learn it
... Wim Vandeputte ...
Acquiring and setting up a CVS-account
... Wim Vandeputte ...
export CVSROOT=<name>@badlands.rug.ac.be:/cvs
export CVS_RSH=/usr/bin/ssh
Getting a local copy of the repository
Imagine you like the idea of helping us, then you need to have your own copy
of the repository, a copy of the files.
If you already know how to deal with CVS and you now have a CVS-account, then
you'll have to do the following to get the test-repository:
cvs checkout test/
This will connect to the
CVSROOT and get the specified repository with
the given
name. Now you're free to make changes to your local copy of
the repository.
test/ is the test-repository, our main repository is called
www/.
Commiting your changes back
So you changed some files, probably improved some too ;) How are you going
to synchronize these changes with the remote copy, you wonder. Try:
cvs commit
while residing in the root of the local repository. You'll notice it scans
all files and starts an editor (probably vim). It's important now to
describe exactly what changes you made. As a useful guide, CVS will show
which files you touched.
Normally you'll commit changes after you're done working on some part of
the repository, or when you quit working. Don't forget to commit before
you quit.
Adding files (text and binary)
Now changing files is great, but what if you want to add files or directories.
There's a distinction between binary and textfiles. Textfiles will be parsed
and only changes will apply to being commit, with binaries this is not true.
So if you are adding files, CVS needs to know whether it's a binary or not.
If you're adding textfiles, try:
cvs add <textfile>
For binary files, only add
-ko, like:
cvs add -ko <binary>
These commands won't add it immediately, you'll have to commit your changes
like we mentioned earlier.
Removing files
Removing files can easily done by doing:
cvs remove <file>
Once again you'll have to commit the removal.
Updating the repository
Now, imagine you already got the repository, but that was a while ago (some
hours, days). The local repository is out of sync with the remote one. So
you'll need to update it. Type:
cvs up
in the root of the local repository.
Related links