GENIE:Quick CVS ref

=Using CVS: Quick reference=


 * You will need a CVS account to access the source code. If you do not have one please contact [mailto:gethin.williams.bristol.ac.uk Gethin Williams].


 * The source code is held in a remote repository. You will need to access it using SSH. Instructions for accessing the repository.

From the Command Line
Below are some example commands. More examples are given in genie-main/README and the user manual (genie-main/doc/user-manual.pdf).

Everyday Commands

 * First, you will have to login to CVS. You will be prompted for your password. From your genie directory type: cvs login


 * To checkout a copy of the source code (in dir ~/genie): cvs co core
 * To run the tests: make test
 * To update your copy of the code (in dir ~/genie) : cvs update NB use -d to get any new directories: cvs update -d
 * To check if a copy of a file is upto date: cvs status
 * To add a file locally, prior to commiting it to the repository: cvs add
 * To commit a file: cvs commit -m "my log message"

More Sophisticated Commands

 * To checkout a copy of the source code at a given time: cvs co -D "2004-06-29 14:00:00 GMT" core
 * To update your checkout to the state of the repository at a given time: cvs update -d -D "2004-06-29 14:00:00 GMT"
 * To tag a version in the past, first get a backdated checkout as above, and then for example: cvs tag -D "2005-12-23 12:00:00 GMT" rel-2-0-0 genie-* NB cvs rtag does not interact well with files that have been removed

Good check-in practice
Before committing a component (e.g. source code) to the CVS it is good practice to test whether your changes will a) cause the model compilation to fail (obvious) and b) whether the change will cause changes to the simulated climatology. Two basic tests to run are:


 * make test
 * make testlong

If some of the tests fail the changes you have introduced mean that the simulated climate now differs from before your changes. test and testlong are defined in the testing.mak file. The subtle problem is in deciding whether the changes are intentional (e.g. solving a bug in the convection scheme) or not. Also, poor code may compile on one compiler (e.g. ifort) but not with another (e.g. g95).

The TkCVS GUI
CVS also has a GUI called TkCVS. You can download this from the TkCVS web site. Below is a screenshot showing the main TkCVS window along with its very useful differencing tool. This tool highlights the differences between two versions of a file.