CVS on Unix/Linux HowTo


0. Introduction

CVS is a version control system. Using it, you can record the history of sources files, and documents. For detailed information, you may refer http://www.gnu.org/software/cvs/.

This document gives the typical usage of CVS under Unix/Linux platforms. The intended audience are EMAN/EMAN2 developers.

1. Before you use CVS, set up environmental variable CVSROOT and CVS_RSH. For EMAN/EMAN2, set up the following in your shell startup script:

a) for csh/tcsh
    setenv CVS_RSH ssh
    setenv CVSROOT "blake.bcm.tmc.edu:/usr/local/CVS/CVS"

b) for bash/sh/zsh
    export CVS_RSH=ssh
    export CVSROOT="blake.bcm.tmc.edu:/usr/local/CVS/CVS"


NOTE: The following supposes you put EMAN2 under $HOME/EMAN2.

2.  To check out EMAN2 source code, run
        cd $HOME/EMAN2/src
        cvs co eman2

3.  To add new files, run

        cd $HOME/EMAN2/src/eman2
        cd YOUR-DIRECTORY
        cvs add YOUR-FILES
        cvs commit

4. To remove files, run
        cd $HOME/EMAN2/src/eman2
        cd YOUR-DIRECTORY
        cvs remove YOUR-FILES
        cvs commit


5.  To check in modified existing files, run
        cd $HOME/EMAN2/src/eman2
        cvs ci

6. To update your source code to the latest version in the CVS tree, run
        cd $HOME/EMAN2/src/eman2
        cvs update -d
       NOTE: read the output from the above command. If you see merging conflicts, you must resolve them first.

7. To add new project to CVS
        cvs   import   project_name   user_tag   release_tag




Last modified on 02/14/2007 by Grant Tang (gtang@bcm.edu)