Getting Started with CVS
First steps
To gain access to the repository you will have to login with:
cvs login
Make sure that your terminal environment has been configured with the approporiate value of CVSROOT.
After you have finished, you are advised to logout using the command:
cvs logout
To check out the module named component:
cvs co component
The directory structure contained within the module (in this case 'component') will be created in your current working directory. You may want to issue this command in a 'fresh' directory. You
are now free to edit or add to these files as they are now resident on
your local filespace.
Finding out about the changes
Other people will be working on the code while you are. To view any changes
that have been made to the source code you can use:
cvs -n -q update
This command compares the state of the central repository with your local
copy and shows the files that are not up-to-date (-q option). With
the -n option no changes are actually made to your local source. By doing
cvs update
all changes in the repository are merged with your local code. For any new directories created in the repository to appear in your local filespace, add a -d to the previous command. This
command will work recursively from your current directory to produce a
list of files with a defined state.
| State |
Meaning |
| U |
Your local file was updated from a later version that exists in the
repository. |
| A |
The file has been added to your local copy and will be added to the
repository after a commit. |
| R |
The file has been removed from your local copy and will be removed
from the repository after a commit. |
| M |
You have modified your local file or their are modifications in the
repository that do not conflict with your changes. |
| C |
You have modified your local file and their are modifications in the
repository that conflict with your changes. The conflicts will be left
in the file and will have to be resolved by hand. |
| ? |
The local file has no corresponding partner in the repository |
Contributing your changes
Adding new files or directories into the repository is a two stage process.
The files are added to the repository and then commited. If you have made
changes to any existing files then these changes have to be committed into
the repository before they will appear there for others to use.
The add command will not work recursively.
cvs add <file>
The commit command will work recursvively. A message needs to be specified
to identify the changes made to the files. If none is provided you will
be asked to enter some information through an editor. Alternatively the
information can be provided on the command line.
cvs commit <file>