CVS at MSSL

Quick start

cvs update updates your local copy of a file with the changes in the repository.

cvs commit commits your local copy of a file to the repository.


Normal Procedure

Edit a file

emacs file.c
If it is a new file you need to add it before using commit
cvs add file.c
Commit it to the CVS repository
cvs commit file.c
Then edit another file ...
If you want to update a file in your checked-out software with other people's changes
cvs update file.c
(or cvs update to update everything).

Create repository

(You don't need to do this)
cd ~egse
mkdir CVS
cvs -d ~egse/CVS init
make sure everybody will run
setenv CVSROOT /home/egse/CVS

Create a new directory tree

(You rarely need to do this)
cd
mkdir tmp
cd tmp

cvs import -m "Created em" icu icu start
cd ..
rmdir tmp
chmod 775 ~egse/CVS/icu

cd ~
cvs checkout icu

cd icu
Go to creating a new file

Creating a new file

emacs newfile.c
cvs add newfile.c
Go to editing files

Editing files

emacs newfile.c
cvs commit newfile.c

Comparing versions

cvs diff sc_driver.c
will compare the revision of sc_driver.c in the current directory with the revision you checked out of the repository. This will not tell you if someone else has committed the file (use
cvs status file
to check this). The lines marked ">" are lines in the locally modified revision and those marked "<" are lines in the last repository revision.

To ignore changes in whitespace, use

cvs diff -b

and to ignore changes in case, use

cvs diff -i

Releasing

cvs release module
when finished editing for a while

Deleting

To remove a file from CVS
cvs remove file

It is OK to delete your source tree (except Tartan Ada won't like its lib and proj directories disappearing).

If everything is up to date (i.e. you have used cvs commit on everything, you can do

cd ~
rm -rf egse
and get it all back with
cvs checkout egse
But is is much safer to do
cd ..
cvs release -d icu
which will remind you if you haven't finished committing everything yet. The -d option deleted the source code leaving only the code in the repository. cvs checkout must then be used to get another working copy.

Tagging

To tag a release - i.e. to give a name to the current state of the module
cd ~/icu
cvs tag sent_this_to_america .
So that then, later, when you want to go back to this state,
cvs checkout -r sent_this_to_america icu

Creating a branch

If you need to develop the above even though it is an old version
cvs rtag -b -r sent_this_to_america sent_this_to_america_patches icu
cvs checkout -r sent_this_to_america_patches icu
and start editing.

To remove sticky tags do

cvs update -A

Old version

To retrieve an old version of a file without setting a sticky tag,

cvs update -p -r ver file > temp_file
for example,
cvs update -p -r 1.1 file1.adb > file1_tmp.adb

Just checking ...

If you just want to check what CVS will do without having it do anything for real on the repository
cvs -n ...
for example
cvs -n update file.c
Will pretend to update file.c and give all the messages but will not actually update it.


Release10b

This is roughly what we did for release10b.
cvs rtag -b -r release10 acquirefix dpu/util
cvs rtag -b -r release10 acquirefix white
cvs rtag -b -r release10 acquirefix blue
cvs rtag -b -r release10 acquirefix red
cvs rtag -b -r release10 acquirefix include
cvs checkout -r refimagefix dpu/util
cd dpu
mkdir development
cd development/
cvs checkout -r refimagefix white
cvs checkout -r refimagefix red
cvs checkout -r refimagefix blue
cvs checkout -r refimagefix include
cd white/
cd src
cd cc
patch < patch
cvs commit cwhite.c
cd ..
cd ..
cd ..
cvs tag release10b red
cvs tag release10b white
cvs tag release10b blue
cvs tag release10b include
cd ..
cd ..
cvs tag release10b dpu/development/
cd dpu/
cvs tag release10b development
cd development/
cd ..
cvs tag release10b util