/[MITgcm]/mitgcm.org/front_content/using_cvs.xml
ViewVC logotype

Contents of /mitgcm.org/front_content/using_cvs.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Thu Dec 4 23:01:40 2003 UTC (21 years, 7 months ago) by edhill
Branch: MAIN
Changes since 1.3: +1 -1 lines
File MIME type: text/xml
 o add plume_on_slope

1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta name="generator" content="HTML Tidy, see www.w3.org" />
7 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
8 <base href="http:/mitgcm.org" />
9
10 <!-- Hinting for menu generation -->
11 <meta name="add_name_0" content="Source Code" />
12 <meta name="add_name_1" content="Using CVS" />
13 <meta name="add_name_2" content="" />
14 <meta name="add_title" content="Using CVS" />
15 <!-- Hinting for menu generation -->
16
17 <title>MITgcm: <!--ADDTITLE--></title>
18 <style type="text/css">
19 span.c2 {font-size: 110%}
20 div.c1 {text-align: center}
21 </style>
22 </head>
23
24 <body>
25
26 <center>
27 <h3>Obtaining the MITgcm Source using CVS</h3>
28 </center>
29
30 <h4>Using CVS "pserver" for Anonymous Access</h4>
31
32 <p>The most convenient way to get local copies of the MITgcm source code is
33 to use the CVS "pserver" mechanism. This method only allows you to "check
34 out" (or obtain a local copy) of the source. It does not provide a
35 mechanism for "committing" or "checking in" changes (please see below).
36 Using CVS pserver from the command line requires just a three commands.
37 Using a Bourne, "bash", or "sh-compatible" shell they are:</p>
38
39 <pre>
40 $ export CVSROOT=':pserver:cvsanon@mitgcm.org:/u/gcmpack'
41 $ cvs login
42 ( enter the CVS password: "cvsanon" )
43 $ cvs co MITgcm MITgcm_contrib
44 </pre>
45
46 <p>Using a "C", "csh", or "tcsh" shell the commands are:</p>
47
48 <pre>
49 $ setenv CVSROOT ':pserver:cvsanon@mitgcm.org:/u/gcmpack'
50 $ cvs login
51 ( enter the CVS password: "cvsanon" )
52 $ cvs co MITgcm MITgcm_contrib
53 </pre>
54
55 <p>Note that you will only need to perform the "cvs login" once. And for
56 convenience, you may want to add the CVSROOT variable to your shell's
57 environment (that is, define it within your "~/.bashrc" or "~/.chsrc"
58 files).</p>
59
60
61 <h4>Getting Parts of the Source "Tree"</h4>
62
63 <p>The above commands demonstrate how to check out all of the MITgcm code
64 and the "contributed" (that is, unsupported by often useful) information
65 within the "MITgcm_contrib" directory. In many cases, this is overkill
66 and can result in long download times. To reduce the volume of
67 information downloaded and thereby speedup the download times, one can
68 select one of the following pre-defined "aliases" that will provide a
69 sub-set of the entire MITgcm source "tree":</p>
70
71 <table align="center" border="0" cellpadding="10" width="90%" summary="CVS
72 aliases">
73 <tr bgcolor="#00cccc">
74 <td width="25%">Alias Name</td>
75 <td>Information (directories) Contained</td>
76 </tr>
77 <tr bgcolor="#bbffdd">
78 <td width="25%">MITgcm_code</td>
79 <td>Only the source code -- none of the verification examples.</td>
80 </tr>
81 <tr bgcolor="#bbddff">
82 <td width="25%">MITgcm_verif_basic</td>
83 <td>Source code plus a small set of the verification examples
84 ("global_ocean.90x40x15", "aim.5l_cs", "hs94.128x64x5",
85 "front_relax", and "plume_on_slope").</td>
86 </tr>
87 <tr bgcolor="#bbffdd">
88 <td width="25%">MITgcm_verif_atmos</td>
89 <td>Source code plus all of the atmospheric examples.</td>
90 </tr>
91 <tr bgcolor="#bbddff">
92 <td width="25%">MITgcm_verif_ocean</td>
93 <td>Source code plus all of the oceanic examples.</td>
94 </tr>
95 <tr bgcolor="#bbffdd">
96 <td width="25%">MITgcm_verif_all</td>
97 <td>Source code plus all of the verification examples.</td>
98 </tr>
99 <!--
100 <tr bgcolor="#bbddff">
101 <td width="25%"></td>
102 <td></td>
103 </tr>
104 <tr bgcolor="#bbffdd">
105 <td width="25%"></td>
106 <td></td>
107 </tr>
108 -->
109 </table>
110
111
112 <h4>Getting Specific Releases or "Checkpoints"</h4>
113
114 <p>As shown within the <a
115 href="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/doc/tag-index"> CVS
116 Code Browser</a>, the MITgcm code is continuously undergoing updates. At
117 points during the development (typically, after work has been done and the
118 source code has passed the <a href="testing/latest.html">verification
119 tests</a>), a release or checkpoint "tag" is created. These tags are a
120 convenient mechanism for referring to different times or points within the
121 development. One can check out these versions using the "-r TAG_NAME" CVS
122 option such as: </p>
123
124 <pre>
125 $ cvs co -r release1_p5 MITgcm
126 $ cvs co -r checkpoint52a_post MITgcm
127 </pre>
128
129 <p>By default (that is, when no tag is specified), CVS will retrieve the
130 latest version of all files.</p>
131
132
133 <h4>Show changes that YOU have made</h4>
134
135 <p>If you are running into difficulties it is very useful to see the changes
136 that you yourself have made since obtaining the code. From within
137 your working directory:</p>
138
139 <pre>
140 cvs diff
141 </pre>
142
143
144 <p>will show the differences between your version and the version that you
145 checked out. It acts recursively on all directories below your current
146 directory. You can limit the operation to just one file or directory by
147 specifying those as arguments:</p>
148
149 <pre>
150 cvs diff <i>file</i>
151 </pre>
152
153
154 <h4>Show changes to the repository that you don't have</h4>
155
156 <p>The source code evolves continuously and you should try to stay up to
157 date. To see what needs to be updated:</p>
158
159 <pre>
160 cvs -n update
161 </pre>
162
163 <p>behaves just as "cvs update" but doesn't actually change anything. This
164 is a useful way of summarizing the state of your code. The meaning of the
165 output is summarized in the next topic.</p>
166
167 <h4>Getting updates from the repository</h4>
168
169 <p>You can download and merge updates from the repository to bring you
170 working code up to date:</p>
171
172 <pre>
173 cvs update -d -P
174 </pre>
175
176 <p>will work recursively on all files in the current directory and below.
177 To update just a specific file or directory:</p>
178
179 <pre>
180 cvs update <i>file</i>
181 </pre>
182
183 <p>You can also update to a specific version, just as you could check out
184 a specific version.</p>
185
186 <pre>
187 cvs update -d -P -r release1_p5
188 </pre>
189
190 <p>If you checked out a specific version and want to update to the very
191 latest use the -A option will remove associated with a specific version as
192 follows:</p>
193
194 <pre>
195 cvs update -d -P -A
196 </pre>
197
198 <p>"cvs update" produces output to the terminal with the following
199 meanings:</p>
200
201 <table align="center" border="0" cellpadding="10" width="90%" summary="CVS
202 update codes">
203 <tr bgcolor="#00cccc">
204 <td width="20%">Return Code</td>
205 <td>Description</td>
206 </tr>
207 <tr bgcolor="#bbffdd">
208 <td width="20%">U <i>file</i></td>
209 <td>indicates that <i>file</i> was brought up to date with the
210 repository or that it exists in the repository but not in your work
211 space</td>
212 </tr>
213 <tr bgcolor="#bbddff">
214 <td width="20%">P <i>file</td>
215 <td>does exactly as above but uses the "patch" method</td>
216 </tr>
217 <tr bgcolor="#bbffdd">
218 <td width="20%">M <i>file</i></td>
219 <td>means the <i>file</i> was modified in your work space. Any
220 additional changes from the repository were merged in
221 successfully</td>
222 </tr>
223 </tr>
224 <tr bgcolor="#bbddff">
225 <td width="20%">C <i>file</i></td>
226 <td>means a merge is necessary because both the your copy and the
227 repository have changed <b>but</b> there is a conflict between the
228 changes</td>
229 </tr>
230 <tr bgcolor="#bbffdd">
231 <td width="20%">? <i>file</i></td>
232 <td>means the file exists in your work space but not on the
233 repository</td>
234 </tr>
235 </table>
236
237 <p>When conflicts arise, the sections of code are both kept and surrounded
238 by &lt;&lt;&lt;&lt;&lt;, ===== and >>>>> indicators. You need to examine
239 these lines of the files and resolve the conflict.</p>
240
241 <h4>Wow! CVS is so good, where can I learn more?</h4>
242
243 <p>The <a href="http://www.loria.fr/~molli/cvs/doc/cvs_toc.html">basic
244 manual</a> is a good reference. There is also an <a
245 href="http://web.mit.edu/afs/athena.mit.edu/project/gnu/doc/html/cvs_toc.html">online
246 tutorial</a> as well as an <a
247 href="http://www.loria.fr/~molli/cvs/cvstrain/cvstrain.html">training
248 manual</a>. For those who prefer the good old fashioned book there's <a
249 href="http://cvsbook.red-bean.com/">"Open Source Development With
250 CVS"</a>.</p>
251
252 </body>
253 </html>
254

  ViewVC Help
Powered by ViewVC 1.1.22