How to get a working copy of a CVS Module
CVS stores the files in a central repository, but users work from a working copy of a file.
Make a directory to do your work in (I tend to use
~/cvs), then cd into that
directory. The checkout syntax is
module To checkout a module called example, try
cvs checkout example.
The checkout will put a copy of that module's files and subdirectories into your cvs directory.
cvs$ ls example cvs$ cd example; ls CVS src cvs/example$ cd CVS; ls Entries Repository Root
cvs directory is a special directory that CVS
uses for its own purposes. CVS/Entries lists files and subdirectories
CVS knows about. CVS/Repository contains the path to the
corresponding directory in the repository. CVS/Root contains the path
to the repository, so you won't need to use the
-d repository-path option again for these files.
Note that CVS/Root overrides the $CVSROOT environment variable, so if you change the repository, you should check out the module again. Alternately, if you're in the middle of a big edit when you realize that your repository needs to be changed, try this perl one-liner, as shown in [Hack #73]:
cvs/src$ ls CVS Makefile sample.h sample.c
The src directory contains the source files for the example project. sample.c, sample.h, and Makefile are ordinary files in the working copy. In the repository, they are stored in a format that tracks the changes.