home contents changes options help

1/21/03 by Sam Richards; updated by Robin Rowe

CVS enables multiple developers to work on the same code at the same time. It provides the latest, most up to date version of the code at all times. Our CVS policy is that what's in CVS should always build. However, it may contain untested code.

There are two classes of CVS users: anonymous and developers. Anyone can check out source code from CVS. Only developers can check in code. It's not necessary to become a CinePaint developer to contribute code to CinePaint. The alternative is to submit a patch, and that's what first-time contributors do. CinePaint developers are granted special access by the project manager because they need more frequent access than is convenient to do using patches.

Setting Up Your CVS Environment

Create a bash script to export the appropriate shell variables.

Anonymous:

 export CVSROOT="pserver:anonymous@cvs.sourceforge.net:/cvsroot/cinepaint"

Developer (substitute your SourceForge login name for robinrowe):

 export CVSROOT=":ext:robinrowe@cvs.sourceforge.net:/cvsroot/cinepaint"
 export CVS_RSH=ssh

After creating the appropriate file, use source filename.sh to enable it. You could also add the source command to your .bash_profile.

Checking Out the Entire Project:

 cvs co cinepaint-project

Updating:

 cvs up

Other Ways to Update:

 cvs up filename
 cvs update -t rel-0-8
 cvs update -D 2002-11-01

When updates happen it will produce a list of files each with a letter before it, the letters mean:

 
M
The file has been locally modified.
U
The file has been updated from the repository.
P
Identical to U, except that the change was applied as a "patch".
C
A conflict was detected while trying to merge you changes to the file in the repository. Your file will now contain the result of attempting to merge the two revisions. An unmodified copy of your file is also in your working direcotry with the name .#file.revision
?
This file does not correspond to anything in CVS. This is a good place to check for files that should be added to the repository.

Committing Changes:

 cvs up
 cvs ci -m "your note explaining changes" .

Adding New Files:

 cvs add filename
 cvs ci filename

Removing Files:

 rm filename
 cvs remove filename

Viewing Changes:

 cvs diff filename
 cvs log filename</PRE>

Undo

Be ABSOLUTELY sure you type the commands correctly or you will merely compound the problem:

 cvs up -j 1.5 -j 1.4 filename.C
 cvs ci -m "Undid previous commit'' filename.C

This removes all changes made between revision 1.4 and 1.5

Note

  1. The order of the revisions!!! Highest number comes first.
  2. If you forget to specifiy a filename you will be in a worse mess than before - the revision numbers will probably be very different between the various files making up a module and if you don't tell it which file to work on, cvs will do the merge on EVERY file. Not pretty. Probably best to play it safe and do the files one by one (I warned you it was tedious).
  3. Remember to cvs commit your changes afterwards - carefully, this time!

Good cvs client tools

Other links: