Home > Articles > Software Development & Management

  • Print
  • + Share This

Checking Out a Working Directory

CVS doesn't work on ordinary directory trees; you need to work within a directory that CVS created for you. Just as you check out a book from a library before taking it home to read it, you use the cvs checkout command to get a directory tree from CVS before working on it. For example, suppose you are working on a project named httpc, a trivial HTTP client:

$ cd
$ cvs checkout httpc
cvs checkout: Updating httpc
U httpc/.cvsignore
U httpc/Makefile
U httpc/httpc.c
U httpc/poll-server

The command cvs checkout httpc means, "Check out the source tree called httpc from the repository specified by the CVSROOT environment variable."

CVS puts the tree in a subdirectory named httpc:

$ cd httpc
$ ls -l
total 8
drwxr-xr-x  2 jimb          512 Oct 31 11:04 CVS
-rw-r--r--  1 jimb           89 Oct 31 10:42 Makefile
-rw-r--r--  1 jimb         4432 Oct 31 10:45 httpc.c
-rwxr-xr-x  1 jimb          460 Oct 30 10:21 poll-server

Most of these files are your working copies of the httpc sources. However, the subdirectory called CVS (at the top) is different. CVS uses it to record extra information about each of the files in that directory, to help it determine what changes you've made since you checked it out.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.