Go to the previous, next section.
Most of the below commands should be executing while in the directory you
checked out. If you did a cvs checkout malloc then you should be in the
malloc sub-directory to execute most of these commands. cvs release is
different and must be executed from the directory above.
cvs checkout (or cvs co)
cvs
checkout module where module is an entry in your modules file (see below).
This will create a sub-directory module and check-out the files from the
repository into the sub-directory for you to work on.
cvs update
cvs update. This will tell you which files
have been updated (their names are displayed with a U before them), and
which have been modified by you and not yet committed (preceded by an
M).
It can be that when you do an update, the changes in the central copy clash
with changes you have made in your own copy. You will be warned of any files
that contain clashes by a preceding C. Inside the files the clashes will be
marked in the file surrounded by lines of the form <<<< and >>>>.
You have to resolve the clashes in your copy by hand. After an update where
there have been clashes, your original version of the file is saved as
`.#file.version'.
If you feel you have messed up a file and wish to have CVS forget about your
changes and go back to the version from the repository, delete the file and do
an cvs update. CVS will announce that the file has been "lost" and
will give you a fresh copy.
cvs commit
cvs commit. You will be put
in an editor to make a message that describes the changes that you have made
(for future reference). Your changes will then be added to the central copy.
When you do a commit, if you haven't updated to the most recent version of the files, CVS tells you this; then you have to first update, resolve any possible clashes, and then redo the commit.
cvs add and cvs remove
cvs add `filename'
cvs remove `filename'
You still have to do a commit after these commands to make the additions and
removes actually take affect. You may make any number of new files in your
copy of the repository, but they will not be committed to the central copy
unless you do a cvs add.
CVS remove does not actually remove the files from the repository. It only removes them from the "current list" and puts the files in the CVS Attic. When another person checks out the module in the future they will not get the files that were removed. But if you ask for older versions that had the file before it was removed, the file will be checked out of the Attic.
cvs release
cvs release module. This
must be done in the directory above the module sub-directory you which
to release. It safely cancels the effects of cvs checkout.
Usually you should do a commit first.
If you wish to have CVS also remove the module sub-directory and your
local copy of the files then your cvs release -d module.
NOTE: Take your time here. CVS will inform you of files that may have changed or it does not know about (watch for the ? lines) and then with ask you to confirm this action. Make sure you want to do this.
cvs log
cvs log [`filename(s)']
cvs diff
cvs diff [`filename(s)']
cvs tag
One of the exciting features of CVS is its ability to mark all the files in a module at once with a symbolic name. You can say `this copy of my files is version 3'. And then later say `this file I am working on looked better in version 3 so check out the copy that I marked as version 3.'
Use cvs tag to tag the version of the files that you have checked
out. You can then at a later date retrieve this version of the files
with the tag.
cvs tag tag-name [filenames]
Later you can do:
cvs co -r tag-name module
cvs rtag
cvs rtag LIBRARY_2_0 lib
This will recursively go through all the repository directories below lib and add the LIBRARY_2_0 tag to each file. This is one of the most useful features of CVS (IMHO). Use this feature if you about to release a copy of the files to the outside world or just want to mark a point in the developmental progression of the files.
cvs history
cvs history
command. By default history will show you all the entries that correspond to
you. Use the -a option to show information about everyone.
cvs history -a -oshows you (a)ll the checked (o)ut modulescvs history -a -Treports (a)ll the r(T)ags for the modulescvs history -a -ereports (a)ll the information about (e)verything
Go to the previous, next section.