Home
Up
Account / Password
VC++ with GLUT/GLUI
vuVolume Notes
Doxygen
SSH,  SCP & FTP
Tmake
Tar & gzip
CVS & vuVolume
KDEvelop
Important Directories
Misc

Notes:

Creating a CVS Root and Using CVS:

  • > ssh fraser.sfu.ca (or where a CVS client is installed)

    Important: all participants in a project should use the same version of the CVS client to update the project.
     

  • To check the version of the CVS client, type in:

    > cvs -v
     

  • Add a CVSROOT to the .mycshrc file, two examples below:

    1) CVS repository provided by www.cvsdude.org

    setenv CVSROOT :pserver:tmeng@cvs1.cvsdude.com:/cvs/stdg
    setenv CVS_RSH ssh

    2) CVS repository in the GrUVi file space

    setenv CVSROOT tmeng@dogwood.css.sfu.ca:/gruvi/usr/CVS/home
    setenv CVS_RSH ssh
     

  • Note that .mycshrc must be changed and NOT .mylogin. Also note that 'setenv' MUST be used and NOT 'set'.

    To check that the newly added lines work properly, start a new c-shell (i.e. >csh) or logout and log back in, and type:

    > echo $CVSROOT

    The value set for CVSROOT should show up.
     

  • If the CVS server you are ssh'ing to needs a login and a password, execute the following line one time only:

    > cvs login

    When prompted, type in the password corresponding to the username specified as part of the CVSROOT.
     

  • The first time > cvs login is executed, some message along the lines of ".cvspass does not exist" should show up. This is normal. That file is created after > cvs login is run, and will save you the trouble of typing in a password every time you ssh to the CVS server.

    Important: different versions of the CVS client may not recognize the same .cvspass file. If your CVS client just hangs while connecting to the CVS server, check to make sure that you are using the same version of the CVS client that was used to create the .cvspass file.
     

  • To import the project directory with its subdirectories, go into the root of the project directory:

    > cvs import -m "comment" -d projName myName start

    Where myName can be any string (i.e. Tai), projName is any name for the current folder under CVSROOT (i.e. the CVS project name), and projName should not be the same as $CVSROOT (else expect infinite recursion).
     

  • Common CVS commands:

    > cvs commands
    lists the CVS commands.

    > cvs -H <command>
    lists the syntax of the command. i.e. > cvs -H add


    > cvs checkout projName
    projName will be retrieved in a folder called projName.

    > cvs update [dirName | fileName]*
    a directory or file name list is optional.

    > cvs log [-r<revisions>] [dirName | fileName]*
    i.e. > cvs log -r1.1 schedule.doc

    > cvs add [dirName | fileName]*
    schedule to add some files or directories.

    > cvs delete [dirName | fileName]*
    You must delete the files and directories from your local directory before executing this line, else CVS will complain.

    > cvs commit -m "Revision History" [dirName | fileName]*
    i.e. cvs commit -m "Bug fix." main.cpp broker.h

    > cvs update -j <currentRev> -j <pastRev> fileName
    > cvs commit -m "reverting a change." fileName
    i.e. > cvs update -j 1.5 -j 1.4 hello.cpp

    This will replace the current revision 1.5 with a revision 1.6 that is the same as revision 1.4. You might need to see > cvs log for the revision numbers. You must commit for the rollback to take effect.

    To discard a roll back, simply do not commit, and delete the file from your local directory. Then do an update on the file.


    > cvs diff [options] [dirName | fileName]*
    Without any arguments, > cvs diff displays the differences of all files compared to the repository copy.

    Some useful options:
    -r1.3 -r1.2 compares two revisions.
    -w OR --ignore-all-space
    -b OR --ignore-space-change
    -B OR --ignore-blank-lines

     

  • To prevent certain files from being processed by the CVS client, add a .cvsignore file in the user's home directory. Add in all files that should be excluded by CVS into this file. .cvsignore can also be created on a per-directory basis. CVS will cascade all .cvsignore files that are found in the subfolders leading up to the current directory. Content of a .cvsignore file could look like:

    *.bak
    *.out
    *.gch
    depend
    scratch.cpp

    So, it is a good idea to name all output files *.out.

CVS & vuVolume [likely outdated]

  • Go to a directory where you plan to download vuVolume (where there is plenty of space). /net/wien/People/<username> is a good choice. If you do not have a directory set up under wien, please talk to your network administrator. Your home directory is not big enough to hold vuVolume.

  • > cvs -d ~torsten/cvsroot checkout proj

    or alternatively:

    > cvs -d /cs/fac1/torsten/cvsroot checkout proj

    or alternatively:

    > cvs -d ~torsten/cvsroot checkout .

    so that vuVolume will be copied to the current directory, rather than to a newly created directory (named "proj") within the current directory.

  • Now modify or add to vuVolume, refer to Notes - Week 09 on how to update and commit using KDEvelop (very easy).

    Alternatively, you can go into the directory that you want to update, and type in:

    > cvs update

    or

    > cvs update <filename>

    Now the newest merged vuVolume is in your local directory. Make sure you re-make vuVolume and re-run vuGui BEFORE you commit.

    When you are ready to commit:

    > cvs -m "<Message>"

    or

    > cvs -m "<Message>" <filename>

Tai Meng | 孟泰 | Last Updated: May 01, 2013