This section offers general background about CVS.
CVS commands are of the form:
cvs global_options command command_options
For example, here is a simple sequence of commands showing both kinds of options in the context of creating a repository, importing existing files, and performing a few common operations on them:
user@localhost$ cvs -d /usr/local/cvsrep init user@localhost$ cd ~/work/hello user@localhost$ cvs -d /usr/local/cvsrep import -m 'Import' hello vendor start user@localhost$ cd .. user@localhost$ mv hello hello.bak user@localhost$ cvs -d /usr/local/cvsrep checkout hello user@localhost$ cd hello user@localhost$ vi hello user@localhost$ cvs commit -m 'Fixed a typo' user@localhost$ cvs tag hello-1_0 user@localhost$ cvs remove -f Makefile user@localhost$ cvs commit -m 'Removed old Makefile' user@localhost$ cvs upd -r hello-1_0 user@localhost$ cvs upd -A
Some global options are common to both user and administrator commands, and some are specific to each of these. The common global options are described in the next section, and the user and administrator options are described in the Section 14.4, "CVS User Reference" and Section 14.3, "CVS Administrator Reference" sections, respectively.
Table 14-1 lists the global options that apply to both user and administrator commands.
Option | Description |
---|---|
-b bindir | Location of external RCS programs. This option is obsolete, having been deprecated at CVS versions above 1.9.18. |
-T tempdir | Absolute path for temporary files. Overrides the setting of $TMPDIR. |
-v --version |
Display version and copyright information. |
This section clarifies a few aspects of CVS that can sometimes cause confusion.
While directories are supported, they are not versioned in the same way as traditional files. This is particularly important in the early evolutionary stages of a project, when the structure may be in flux. Also, if the project is undergoing major changes, the structure is likely to change. See later in Section 14.3.4, "Hacking the Repository".
There is no equivalent to diff for binary files, although CVS's support for binary files is usually sufficient. Use admin -kb to tell CVS a file is binary.
Moving a segment of code from one place in a file to another is seen as one delete (from the old location) and an unrelated add (to the new location).
As far as CVS is concerned, small formatting changes are equivalent to sweeping logic changes in the same line ranges.
CVS was originally built on top of RCS, but now all the RCS-related functionality is internal to CVS itself. RCS still shows up in the name of the $RCSBIN environment variable and the description of the -b option, which are now obsolete.
Copyright © 2001 O'Reilly & Associates. All rights reserved.
This HTML Help has been published using the chm2web software. |