Quick Help to the most important CVS commands

The Concurrent Versions System (CVS) is used to manage all the source code and scripts for the GMT FPGAs. CVS is a powerful system that allows multiple developers to develop a common project. It keeps track of revisions of source files and allows to tag groups of source files in order to form a release (or version) of all or part of the code.

For more informations see

Basic Idea:

In the following the most important basic CVS commands are explained:

  1. Log into the CVS server
  2. setenv CVSROOT :pserver:user@hepcvs.oeaw.ac.at:/data/cms/cvsroot
    cvs login
    
    user is your user name at hepcvs (ask Gerhard Walzel ( gerhard@hephy.oeaw.ac.at) for help if needed).

    A valid password is required when logging in to the CVS server.

  3. Check out all code from the CVS repository
  4. Change to the directory under which the GMT structure should be created. The following commands will create a subdirectory 'GMT' containing the whole GMT tree below this directory.

    cvs co -r tagname GMT
    
    tagname is the tag (version) of the code and tools to check out. (e.g. GMTBoard_beh_works_14Nov2003)

    To check out the latest version of all files (the 'CVS head'), the -r tagname option may be omitted.

  5. Check out a single file
  6. The cvs co command can also be used to check out a single file by changing to the directory of the file and typing:

    cvs co -r revision_number_or_tagname FileName
    
    revision_or_tagname is either a tag name or the revision number of a single file (e.g. 1.21).

  7. Look at the log file of a single file
  8. The log (or revision history) of a file can be displayed by changing to the directory of the file and typing:

    cvs log FileName
    
  9. Look at the difference of a file in the working area and in the repository
  10. cvs diff -r revision_number_or_tagname FileName
    
    The difference can also be displayed graphically using tkdiff.
    tkdiff -Crevision_number FileName
    
    If -Crevision_number is omitted, tkdiff compares the file in the work area to the latest version in the repository.

  11. Check an updated version into the repository
  12. cvs commit -m "comment on changes"  FileName
    
    The new version will be checked in. The file revision number will be increased (e.g. from 1.10 to 1.11).

  13. Add a new file to the repository
  14. In the directory of the new file type:

    cvs add FileName
    
    This has to be done before committing a new file for the first time. The command also is used to add a new directory to the repository.

  15. Tag a group of source files to create a version
  16. Change to the directory containing the files to tag. All files in the repository residing in directories below will also be tagged. That will be tagged is the last version checked out or committed to the repository.

    cvs tag tagname .
    
    To tag the lasted checked out / committed version of everything:
    cd GMT
    cvs tag tagname .
    
    tagname is a symbolic name like LogicFPGA_problemxy_fixed

Hannes Sakulin, $Date: 2003/11/26 10:51:43 $ , $Revision: 1.1 $