Obtaining MITgcmUV source using CVS
You only need to do "cvs login" once but the environment should be set
in you .cshrc or .tcshrc.
setenv CVSROOT :pserver:firstname.lastname@example.org:/u/u0/gcmpack
cvs login ( CVS password: cvsanon )
To obtain the latest source (with CVS information)
This creates a directory called directory. If directory already
exists this command updates your code based on the repository (see "Getting
updates from the repository" below). Each directory in the source tree
with contain a directory "CVS". This contains information required by CVS
to keep track of your file versions with respect to the repository. Don't
edit the files in CVS.
cvs co -d directory -P models/MITgcmUV
Show changes that YOU have made
If you are running into difficulties it is very useful to see the changes
that you yourself have made since obtaining the code.
From within your working directory:
will show the differences between your version and the version that you
checked out. It acts recursively on all directories below your current
directory. You can limit the operation to just one file or directory by
specifying those as arguments:
cvs diff file
Show changes to the repository that you don't have
The source code evolves continuously and you should try to stay up to date.
To see what needs to be updated:
behaves just as "cvs update" but doesn't actually change anything. This
is a useful way of summarizing the state
cvs -n update
of your code. The meaning of the output is summarized in the next topic.
Getting updates from the repository
You can download and merge updates from the repository to bring you working
code up to date:
will work recursively on all files in the current directory and below.
To update just a specific file or
"cvs update" produces output to the terminal with the following meanings:
cvs update file
|indicates that file was brought up to date with the repository
or that it exists in the repository but not in your work space.
|does exactly as above but uses the "patch" method.
|means the file was modified in your work space. Any additional
changes from the repository were merged in successfully.
|means a merge is necessary because both the your copy and the repository
have changed but there is a conflict between the changes.
|means the file exists in your work space but not on the repository.
When conflicts arise, the sections of code are both kept and surrounded
by <<<<<, ===== and >>>>> indicators. You need to
examine these lines of the files and resolve the conflict.
Wow! CVS is so good, where can I learn more?
The basic manual
is a good reference. There is also an online
tutorial as well as an training
manual. For those who prefer the good old fashioned book there's "Open
Source Development With CVS".
|Last modified on $Date: 2001/07/06 18:36:54 $
CVS: $Source: /home/ubuntu/mnt/e9_copy/mitgcm.org/Attic/usingcvstoget.html,v $Revision: 1.1 $