Version Control
- Each developer uses
cvs checkout to
create her own copy of the source tree from the CVS
repository. The command can operate on a directory
tree, a single file or a module; a
module groups several files or directories into one
entity which can be operated on as a unit. One defines
modules by editing the `modules' file.
- The developer modifies, compiles and tests the code
in her copy of the source tree (called a
working directory) with whatever
editors and tools she chooses --
Emacs,
make, etags, etc. She uses
cvs add and cvs remove to add
and remove files.
- When the changes are complete, the developer uses
cvs commit to merge her changes back into
the repository. This makes her changes available to
other developers.
- At any point, the developer may use
cvs
update to merge changes committed by others into
her working directory. If there are uncommitted changes
to files in her working directory, CVS prints a message
and attempts to merge the changes from the repository
with her changes in the working directory. If the merge
fails, CVS indicates a conflict which she resolves
manually with a text editor.
- The developer can show the differences between two
revisions with
cvs diff; show the log of
changes to a particular file with cvs log;
show the history of each line of a file with cvs
annotate; and show who has used cvs
checkout, cvs tag, and several
other CVS commands, using cvs
history.
- CVS supports watches, allowing
developers to request notification when someone begins
editing a file or obtain a list of developers currently
working on a file.
- The user can record the state of the repository at
a particular point with the
cvs tag
command and use that tag as an argument to most CVS
commands, for example to retrieve the files as of the
tagged point.
- The developer can create a new development branch
with
cvs tag -b, and manipulate branches
with cvs update -r and cvs checkout
-r. Subsequent operations in that working
directory apply to that branch. To return to the main
branch, the developer can use cvs update
-A. The cvs update -j command
merges changes made on another branch into the working
directory.
- The existence or nonexistence of a file is itself
version controlled so that files can exist on some but
not all branches and users can reproduce the state of
the files at any given point in time.
- The developer can mark a file as binary, which
prohibits merging and line terminator conversions,
using
cvs admin -kb.
|