CVS Notes

You might want to put /usr/local/gnu/bin first in your path in order to make sure you get the trusted GNU versions of rcs and pals. Other than that, just choose your CVSROOT (and add it your environment), haul down the distribution (which I assume you already have), and cvs import. Once you've imported you should probably then imediately checkout again (I usually checkout into another directory myself).

Creating the password file


  htpasswd -c passwd sip
to create password file in the CVSROOT directory underneath the source repository. Add a third entry to determine the user name CVS uses to access the repository. For example,
allows remote login as user sip, but manipulates files as user hgs locally.


Create a new module

This is only done initially, once, by the "owner". E.g., for the RTSP server library:
cd /proj/irt/rtspd
setenv CVSROOT ~/src/cvsroot/
cvs import -d -m "Initial RTSP server tree" rtsp rtsp start

Note that the directory contains the original sources. It is not the working directory used later. This will create a directory named 'rtsp' below '~/src/cvsroot'.


All modules require the same login:

  cvs -d login
where user is replaced by your CVS login user name, not the string 'user'.

cvs checkout

Before you start editing, you need to copy the current version of the source files into your working directory. You must set your CVSROOT environment variable, as in (for csh and tcsh)

  setenv CVSROOT
or, for bash,
  export CVSROOT

The checkout command creates a new directory named after the module. Example:

  cvs checkout foo

This will create a subdirectory in your current directory called foo and copy the current version of all files in the foo directory to your local directory. In addition, it will create an foo/CVS directory, which contains the admin files. Here, foo is the last argument to the checkout command (e.g., rtsp or rtplib).

Running checkout doesn't change any state on the CVS server. You will not have an exclusive lock on the files, but you will never be locked out either. You may be forced to update if someone checks something in before you do, but more on that in a bit.

You have read/write access to all files that you checked out, so you can edit to your hearts delight. When you are ready to check your changes in, you can use cvs commit (see below) from the foo directory.

You should do all your testing locally and only check in versions that compile and have been tested. Email will be sent to the other group members when you check in changes.

cvs commit

cvs commit checks the files in the current directory and commits the ones that have changed since the last checkout or update.


  cvs commit foo.c
  cvs commit
The latter updates all changed files.

cvs update

If you would like to "freshen up" your current directory, type:
  cvs update

This merges in changes from the cvs server to your local directory, so all local edits will also be kept. If there are conflicts, those will be marked with "<<<<<<<<<<<<<<" and ">>>>>>>>>>>>>>" tags.

If you try to commit files that are out of date with the server, you will be stopped with the error message "files are out of date: you must run cvs update first" or something to that effect.

To remove empty directories, do

cvs update -dP

To create any new directories, add the -d flag

  cvs update -d

cvs add

To add a new file, type

  cvs add foo.tex

Binary files should be added as

  cvs add -kb summary.pdf

The next time you commit the file, that file will be added to the repository.

cvs diff

To see what differs between what you have and *what you checked out*, type:

  cvs diff foo.tex

Differences of own version in working directory compared to latest version checked in:

  cvs diff -r HEAD foo.tex

cvs tag

All major releases should be tagged.
  cvs tag -b tag-name

To retrieve a tagged version, update your repository by doing

  cvs update -r tag-name
to switch to the branch, or
  cvs update -A"
to switch to the trunk. The branch tags are "sticky", so you'll stay on the branch or the trunk until you explicitly switch, and any check-ins you do will be made to the branch you're currently on.

cvs log

If you want to see the revision history of a file, use:

  cvs log foo.tex

Binary Files

To mark a file as binary:

cvs admin -kb name_of_binary_file

IRT CVS Modules

RTP library rtplib
RTSP server rtsp
SIP client (sipc) sipc
SIP softwares suite (CINEMA): cinema
SIP RFC2543bis specification sip-bis
l2x converter l2x

Last updated by Henning Schulzrinne