If you're really interested in knowing the intricacies and details of
Concurrent Versions Systems (CVSs), feel free to dive into the CVS Manual,
written by Per Cederqvist. There are other CVS-related docs linked over
here.

On the other hand, if you're not really all that interested in CVS in
and of itself, but you still want to use it, this cheat sheet should get
you up and running as quickly as possible.

Getting an Account on the OSWG CVS system

To get an account on the OSWG CVS system, you have to send a preferred
username and crypted password to cvs-maintainer@oswg.org.
Here's the basic procedure:

Choose a password. For this example, "haddock".

Choose two other alphanumeric characters. We call this the "salt".
We'll choose "z8" for this example.

Invoke Perl with the command "perl -de 1". You'll get some
messages then the prompt "DB<1>"

At the prompt type:

DB<1> print crypt("haddock", "z8")

Obviously, vary the password and salt to taste. It will produce a
13-character string that starts with the salt -- in this case
"z88PqAvWBiBis". This is your crypted password.

If you use a C-like shell (csh, tcsh) rather than a Bourne-like (ash,
bash, sh, zsh) that first line won't work -- instead, use the
equivalent:

$ setenv CVSROOT :pserver:yourusername@oswg.org:/home/cvs/cvsroot

Once you've logged in, you won't need to again unless you lose
~/.cvspass.

Working with CVS

Always check out the latest version of the CVS contents before you start
editing, else you might end up editing an outdated version, which means
your work may go to waste.

To get the latest stuff:

$ cvs update -PAd

Then make whatever changes you want in your local CVS tree. If you've
been working on a file for a while and you think someone else might have
checked a more recent version in while you were working on it, you can
check with:

$ cvs update <file-name>

When you've finished with your changes, you can update the main
repository with your changes with:

$ cvs commit <file-name>

Alternately, $ cvs commit without specifying any filenames will
commit all files in your CVS tree that are more recent than those in the
main CVS repository on the OSWG server. You will be shown a list of the
files that are updated.

Adding a new file or directory

To create a new directory or file to the main CVS system on the OSWG
server, you have to first add that file or directory to your local copy
of the CVS tree. When you've done that, use the add,
commit, and update commands to add and update that
file or directory to the main tree.

For example:

$ mkdir newdir
$ cvs add newdir
$ cvs commit newdir
$ cvs update

...or...

$ vi newfile
$ cvs add newfile
$ cvs commit newfile
$ cvs update

Why is the OSWG CVS structured the way it is?

The OSWG CVS tree is modelled after the CVS tree that the FreeBSD Documentation
Project uses. Nik Clayton provided us with this guidance, and we decided to take
advantage of the lessons the FDP had learned. The FDP CVS tree, in
other words, provided us with everything we were looking for, including
extensibility.