Development: CVS PrimerThis document gives a short introduction to the Concurrent Versions System (CVS) used to manage the source code. DocumentationThere is a lot of documentation available on how to use CVS. Recommended links include:
Initial Configuration
|
Flag | Description |
---|---|
U | The file was brought up to date with respect to the repository. This is done for any file that exists in the repository but not in your source, and for files that you haven't changed but are not the most recent versions available in the repository. |
A | The file has been added to your private copy of the sources, and will be added to the source repository when you run 'cvs commit' on the file. This is a reminder to you that the file needs to be committed. |
R | The file has been removed from your private copy of the sources, and will be removed from the source repository when you run 'cvs commit' on the file. This is a reminder to you that the file needs to be committed. |
M | The file is modified in your working directory. 'M' can indicate one of two states for a file you're working on: either there were no modifications to the same file in the repository, so that your file remains as you last saw it; or there were modifications in the repository as well as in your copy, but they were merged successfully, without conflict, in your working directory. |
C | A conflict was detected while trying to merge your changes to file with changes from the source repository. file (the copy in your working directory) is now the result of merging the two versions; an unmodified copy of your file is also in your working directory, with the name '.#file.version', where version is the revision that your modified file started from. (Note that some systems automatically purge files that begin with '.#' if they have not been accessed for a few days. If you intend to keep a copy of your original file, it is a very good idea to rename it.) |
? | The file is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for cvs to ignore. It should either be added or put on the list of files to be ignored. |
Sometimes it happens that someone else has changed a file and checked
it in that has been modified by you, too.
CVS tries to merge
these changes together. Most of the time these merges succeed.
But if the same lines of code have been change by you and someone else
the merge cannot be done automatically and
CVS creates a so-called
conflict file. The file is also marked by a 'C' in the output of
cvs update
.
The conflicts in the conflict files have to be resolved manually.
This can be done either with an editor or with the use of some
merge utility (e.g. tkdiff -conflict <conflict file>
).
Before you can successfully check in your changes three preconditions have to be met:
cvs update
has to be used (in the top level directory
of the project).
cvs add <file>
.
cvs remove <file>
.
.cvsignore
file to tell
CVS that
these file should be ignored.
Since updates may change the code (and the correctness of the code)
the above two steps might be needed to be done more than once. Finally
the output of cvs update
shouldn't have any lines marked
by an 'U' or '?'.
When you are done with the cycle of updating and building (build
world
) the project the checking can be done. Therefore change
to the top level directory of the project and run cvs
commit
.