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

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

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

revision 1.1 by edhill, Thu Dec 4 02:14:52 2003 UTC revision 1.16 by dimitri, Sat Nov 21 03:21:16 2015 UTC
# Line 14  Line 14 
14      <meta name="add_title" content="Using CVS" />      <meta name="add_title" content="Using CVS" />
15      <!-- Hinting for menu generation -->      <!-- Hinting for menu generation -->
16    
     <title>MITgcm: <!--ADDTITLE--></title>  
17  <style type="text/css">  <style type="text/css">
18   span.c2 {font-size: 110%}   span.c2 {font-size: 110%}
19   div.c1 {text-align: center}   div.c1 {text-align: center}
# Line 22  Line 21 
21    </head>    </head>
22    
23    <body>    <body>
24        
25      <center>      <center>
26        <h3>Obtaining the MITgcm Source using CVS</h3>        <h3>Obtaining the MITgcm Source using CVS</h3>
27      </center>      </center>
# Line 33  Line 32 
32        to use the CVS "pserver" mechanism.  This method only allows you to "check        to use the CVS "pserver" mechanism.  This method only allows you to "check
33        out" (or obtain a local copy) of the source.  It does not provide a        out" (or obtain a local copy) of the source.  It does not provide a
34        mechanism for "committing" or "checking in" changes (please see below).        mechanism for "committing" or "checking in" changes (please see below).
35        Using CVS pserver from the command line requires just a three        Using CVS pserver from the command line requires just a three commands.
36        commands:</p>        Using a Bourne, "bash", or "sh-compatible" shell they are:</p>
37    
38    <pre>
39      $ export CVSROOT=':pserver:cvsanon@mitgcm.org:/u/gcmpack'
40      $ cvs login
41        ( enter the CVS password: "cvsanon" )
42      $ cvs co -P MITgcm
43    </pre>
44    
45        <p>Using a "C", "csh", or "tcsh" shell the commands are:</p>
46    
47    <pre>
48      $ setenv CVSROOT ':pserver:cvsanon@mitgcm.org:/u/gcmpack'
49      $ cvs login
50        ( enter the CVS password: "cvsanon" )
51      $ cvs co -P MITgcm
52    </pre>
53    
54        <p>using the "-P" option to check-out ("<i>cvs co -P</i>") prevents
55        to download unnecessary empty directories.</p>
56    
57    
58        <p>Note that it is possible to checkout code without "cvs login" and without
59    setting any shell environment variables by specifying the pserver name and
60    password in one line, for example:</p>
61    
62    <pre>
63      $ cvs -d :pserver:cvsanon:cvsanon@mitgcm.org:/u/gcmpack co -P MITgcm
64    </pre>
65            
66  <blockquote>      <p>A large amount of additional (optional!) content is available
67  Using a Bourne, "bash", or "sh-compatible" shell:      from the <i>MITgcm_contrib</i> directory; much of it is specific to certain
68        setups (eg. high-res setups, in-development material that is not yet part
69        of the "main" code, etc ...).
70        But rather than checking out the full content of MITgcm_contrib
71        ("<i>cvs co -P MITgcm_contrib</i>"), which takes a long time to download
72        (particularly from remote locations), we recommend to download only the
73        specific part of interest, e.g.: "<i>submesoscale</i>" directory,
74        which can be checked out using:</p>
75    
76  <pre>  <pre>
77  $  export CVSROOT=':pserver:cvsanon@mitgcm.org:/usr/local/gcmpack'    $ cvs co -P MITgcm_contrib/submesoscale
 $  cvs login  
 ( enter the CVS password: "cvsanon" )  
 $  cvs co MITgcm MITgcm_contrib  
 </pre><br />  
   
 Using a "C", "csh", or "tcsh" shell:  
 <pre>  
 $  setenv CVSROOT ':pserver:cvsanon@mitgcm.org:/usr/local/gcmpack'  
 $  cvs login  
 ( enter the CVS password: "cvsanon" )  
 $  cvs co MITgcm MITgcm_contrib  
78  </pre>  </pre>
 </blockquote>  
79    
80      <p>Note that you will only need to perform the "cvs login" once.  And for      <p>Note that you will only need to perform the "cvs login" once.  And for
81        convenience, you may want to add the CVSROOT variable to your shell's        convenience, you may want to add the CVSROOT variable to your shell's
# Line 63  $  cvs co MITgcm MITgcm_contrib Line 86  $  cvs co MITgcm MITgcm_contrib
86      <h4>Getting Parts of the Source "Tree"</h4>      <h4>Getting Parts of the Source "Tree"</h4>
87    
88      <p>The above commands demonstrate how to check out all of the MITgcm code      <p>The above commands demonstrate how to check out all of the MITgcm code
89        and the "contributed" (that is, unsupported by often useful) information        and the "contributed" (that is, unsupported but occasionally useful)
90        within the "MITgcm_contrib" directory.  In many cases, this is overkill        information within the "<i>MITgcm_contrib</i>" directory. In many cases,
91        and can result in long download times.  To reduce the volume of        this is overkill and can result in long download times.
92        information downloaded and thereby speedup the download times, one can        To reduce the volume of information downloaded and thereby speedup the
93        select one of the following pre-defined "aliases" that will provide a        download times, one can select one of the following pre-defined "aliases"
94        sub-set of the entire MITgcm source "tree":</p>        that will provide a sub-set of the entire MITgcm source "tree":</p>
95    
96      <table align="center" border="0" cellpadding="10" width="90%" summary="CVS      <table align="center" border="0" cellpadding="10" width="90%" summary="CVS
97        aliases">        aliases">
# Line 82  $  cvs co MITgcm MITgcm_contrib Line 105  $  cvs co MITgcm MITgcm_contrib
105        </tr>        </tr>
106        <tr bgcolor="#bbddff">        <tr bgcolor="#bbddff">
107          <td width="25%">MITgcm_verif_basic</td>          <td width="25%">MITgcm_verif_basic</td>
108          <td>Source code plus three of the verification examples          <td>Source code plus a small set of the verification examples
109            ("adjustment.128x64x1", "internal_wave", and            ("aim.5l_cs", "hs94.128x64x5", "ideal_2D_oce", "lab_sea",
110            "solid-body.cs-32x32x1").</td>             "tutorial_baroclinic_gyre", "tutorial_global_oce_latlon"
111       </tr>             and "tutorial_plume_on_slope").</td>
112          </tr>
113          <tr bgcolor="#bbffdd">
114            <td width="25%">MITgcm_tutorials</td>
115            <td>Source code plus all of the tutorials examples.</td>
116          </tr>
117          <tr bgcolor="#bbddff">
118            <td width="25%">MITgcm_verif_all</td>
119            <td>Source code plus all of the verification examples.</td>
120          </tr>
121          <!--
122        <tr bgcolor="#bbffdd">        <tr bgcolor="#bbffdd">
123          <td width="25%">MITgcm_verif_atmos</td>          <td width="25%">MITgcm_verif_atmos</td>
124          <td>Source code plus all of the atmospheric examples.</td>          <td>Source code plus all of the atmospheric examples.</td>
# Line 94  $  cvs co MITgcm MITgcm_contrib Line 127  $  cvs co MITgcm MITgcm_contrib
127          <td width="25%">MITgcm_verif_ocean</td>          <td width="25%">MITgcm_verif_ocean</td>
128          <td>Source code plus all of the oceanic examples.</td>          <td>Source code plus all of the oceanic examples.</td>
129       </tr>       </tr>
       <tr bgcolor="#bbffdd">  
         <td width="25%">MITgcm_verif_all</td>  
         <td>Source code plus all of the verification examples.</td>  
       </tr>  
       <!--  
130        <tr bgcolor="#bbddff">        <tr bgcolor="#bbddff">
131          <td width="25%"></td>          <td width="25%"></td>
132          <td></td>          <td></td>
# Line 110  $  cvs co MITgcm MITgcm_contrib Line 138  $  cvs co MITgcm MITgcm_contrib
138        -->        -->
139      </table>      </table>
140    
141        <p>It is important to note that the CVS aliases above cannot be used in
142          conjunction with the CVS <i>-d DIRNAME</i> option.  However, the MITgcm
143          directories they create can be changed to a different name following the
144          check-out:</p>
145    <pre>
146      $ cvs co -P MITgcm_verif_basic
147      $ mv MITgcm MITgcm_verif_basic
148    </pre>
149    
150      <h4>Getting Specific Releases or "Checkpoints"</h4>      <h4>Getting Specific Releases or "Checkpoints"</h4>
151        
152      <p>As shown within the <a      <p>As shown within the
153        href="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/doc/tag-index"> CVS        <!-- <a href="http://mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/doc/tag-index">CVS Code Browser</a> -->
154        Code Browser</a>, the MITgcm code is continuously undergoing updates.  At        <a href="http://mitgcm.org/viewvc/MITgcm/MITgcm/doc/tag-index">CVS Code Browser</a>
155          , the MITgcm code is continuously undergoing updates.  At
156        points during the development (typically, after work has been done and the        points during the development (typically, after work has been done and the
157        source code has passed the <a href="testing/latest.html">verification        source code has passed the <a href="./testing.html">verification
158        tests</a>), a release or checkpoint "tag" is created.  These tags are a        tests</a>), a release or checkpoint "tag" is created.  These tags are a
159        convenient mechanism for referring to different times or points within the        convenient mechanism for referring to different times or points within the
160        development.  One can check out these versions using the "-r TAG_NAME" CVS        development.  One can check out these versions using the "-r TAG_NAME" CVS
161        option such as: </p>        option such as: </p>
162    
 <blockquote>  
163  <pre>  <pre>
164  $  cvs co -r release1_p5 MITgcm    $ cvs co -P -r release1_p5 MITgcm
165  $  cvs co -r checkpoint52a_post MITgcm    $ cvs co -P -r checkpoint52a_post MITgcm
166  </pre>  </pre>
 </blockquote>  
167    
168      <p>By default (that is, when no tag is specified), CVS will retrieve the      <p>By default (that is, when no tag is specified), CVS will retrieve the
169        latest version of all files.</p>        latest version of all files. To download an older version corresponding
170          to a specific time, e.g., May 1rst, 2008, at 5pm, one can use the "-D"
171          CVS option as follows: </p>
172    
173    <pre>
174      $ cvs co -P -D "2008-05-01 17:00" MITgcm
175    </pre>
176    
177      <h4>Show changes that YOU have made</h4>      <h4>Show changes that YOU have made</h4>
178    
# Line 140  $  cvs co -r checkpoint52a_post MITgcm Line 180  $  cvs co -r checkpoint52a_post MITgcm
180        that you yourself have made since obtaining the code.  From within        that you yourself have made since obtaining the code.  From within
181        your working directory:</p>        your working directory:</p>
182    
183  <blockquote>  <pre>
184  <pre>cvs diff</pre>    cvs diff
185  </blockquote>  </pre>
186    
187    
188      <p>will show the differences between your version and the version that you      <p>will show the differences between your version and the version that you
189        checked out. It acts recursively on all directories below your current        checked out. It acts recursively on all directories below your current
190        directory. You can limit the operation to just one file or directory by        directory. You can limit the operation to just one file or directory by
191        specifying those as arguments:</p>        specifying those as arguments:</p>
192    
193  <blockquote>  <pre>
194  <pre>cvs diff <i>file</i></pre>    cvs diff <i>file</i>
195  </blockquote>  </pre>
196    
197    
198      <h4>Show changes to the repository that you don't have</h4>      <h4>Show changes to the repository that you don't have</h4>
199    
200      <p>The source code evolves continuously and you should try to stay up to      <p>The source code evolves continuously and you should try to stay up to
201        date.  To see what needs to be updated:</p>        date.  To see what needs to be updated:</p>
202    
203  <blockquote>  <pre>
204  <pre>cvs -n update</pre>    cvs -n update
205  </blockquote>  </pre>
206    
207      <p>behaves just as "cvs update" but doesn't actually change anything. This      <p>behaves just as "cvs update" but doesn't actually change anything. This
208        is a useful way of summarizing the state of your code. The meaning of the        is a useful way of summarizing the state of your code. The meaning of the
# Line 171  $  cvs co -r checkpoint52a_post MITgcm Line 213  $  cvs co -r checkpoint52a_post MITgcm
213      <p>You can download and merge updates from the repository to bring you      <p>You can download and merge updates from the repository to bring you
214        working code up to date:</p>        working code up to date:</p>
215    
216  <blockquote>  <pre>
217  <pre>cvs update -d -P</pre>    cvs update -d -P
218  </blockquote>  </pre>
219    
220        <p>will work recursively on all files in the current directory and below.        <p>will work recursively on all files in the current directory and below.
221          To update just a specific file or directory:</p>          To update just a specific file or directory:</p>
222    
223  <blockquote>  <pre>
224  <pre>cvs update <i>file</i></pre>    cvs update <i>file</i>
225  </blockquote>  </pre>
226    
227      <p>You can also update to a specific version, just as you could check out      <p>You can also update to a specific version, just as you could check out
228        a specific version.</p>        a specific version.</p>
229    
230  <blockquote>  <pre>
231  <pre>cvs update -d -P -r release1_p5</pre>    cvs update -d -P -r release1_p5
232  </blockquote>  </pre>
233    
234      <p>If you checked out a specific version and want to update to the very      <p>If you checked out a specific version and want to update to the very
235        latest use the -A option will remove associated with a specific version as        latest use the -A option will remove associated with a specific version as
236        follows:</p>        follows:</p>
237    
238  <blockquote>  <pre>
239  <pre>cvs update -d -P -A</pre>    cvs update -d -P -A
240  </blockquote>  </pre>
241    
242      <p>"cvs update" produces output to the terminal with the following      <p>"cvs update" produces output to the terminal with the following
243        meanings:</p>        meanings:</p>
244        
245      <table align="center" border="0" cellpadding="10" width="90%" summary="CVS      <table align="center" border="0" cellpadding="10" width="90%" summary="CVS
246        update codes">        update codes">
247        <tr bgcolor="#00cccc">        <tr bgcolor="#00cccc">
# Line 242  $  cvs co -r checkpoint52a_post MITgcm Line 284  $  cvs co -r checkpoint52a_post MITgcm
284    
285      <h4>Wow! CVS is so good, where can I learn more?</h4>      <h4>Wow! CVS is so good, where can I learn more?</h4>
286    
287      <p>The <a href="http://www.loria.fr/~molli/cvs/doc/cvs_toc.html">basic      <p>The <a
288        manual</a> is a good reference. There is also an <a        href="http://web.mit.edu/afs/athena.mit.edu/project/gnu/doc/html/cvs_toc.html">basic
289        href="http://web.mit.edu/afs/athena.mit.edu/project/gnu/doc/html/cvs_toc.html">online        manual</a> is a good reference.
290        tutorial</a> as well as an <a        For those who prefer the good old fashioned book there's
291        href="http://www.loria.fr/~molli/cvs/cvstrain/cvstrain.html">training        <a href="http://cvsbook.red-bean.com/">"Open Source Development With CVS"</a>.</p>
       manual</a>. For those who prefer the good old fashioned book there's <a  
       href="http://cvsbook.red-bean.com/">"Open Source Development With  
       CVS"</a>.</p>  
292    
293    </body>    </body>
294  </html>  </html>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.22