ViewVC logotype

Contents of /mitgcm.org/usingcvstoget.html

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

Revision 1.5 - (show annotations) (download) (as text)
Fri Oct 12 17:51:45 2001 UTC (22 years, 9 months ago) by adcroft
Branch: MAIN
Changes since 1.4: +5 -5 lines
File MIME type: text/html
Changes for Sealion

1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.14-5.0 i686) [Netscape]">
6 </head>
7 <body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
9 <center>
10 <h1>
11 Obtaining MITgcm source using CVS</h1></center>
13 <h2>
14 Environment</h2>
16 <blockquote>
17 <pre>setenv CVSROOT :pserver:cvsanon@mitgcm.org:/u/u0/gcmpack
18 cvs login ( CVS password: cvsanon )</pre>
19 </blockquote>
20 You only need to do "cvs login" once but the environment should be set
21 in you .cshrc or .tcshrc.
22 <h2>
23 To obtain the latest source (with CVS information)</h2>
25 <blockquote>
26 <pre>cvs co -d <i>directory</i> -P MITgcm</pre>
27 </blockquote>
28 This creates a directory called <i>directory</i>. If <i>directory</i> already
29 exists this command updates your code based on the repository (see "Getting
30 updates from the repository" below). Each directory in the source tree
31 with contain a directory "CVS". This contains information required by CVS
32 to keep track of your file versions with respect to the repository. <i>Don't
33 edit the files in CVS</i>.
34 <p>You can also "check out" a particular version of the code. We use the
35 notion of checkpoints to indicate the evolution of the code. To specify
36 which "tag" you require use the -r option:
37 <blockquote>
38 <pre>cvs co -d <i>directory</i> -P -r release1_beta1 MITgcm</pre>
39 </blockquote>
41 <h2>
42 Show changes that YOU have made</h2>
43 If you are running into difficulties it is very useful to see the changes
44 that you yourself have made since obtaining the code.
45 <br>From within your working directory:
46 <blockquote>
47 <pre>cvs diff</pre>
48 </blockquote>
49 will show the differences between your version and the version that you
50 checked out. It acts recursively on all directories below your current
51 directory. You can limit the operation to just one file or directory by
52 specifying those as arguments:
53 <blockquote>
54 <pre>cvs diff <i>file</i></pre>
55 </blockquote>
57 <h2>
58 Show changes to the repository that you don't have</h2>
59 The source code evolves continuously and you should try to stay up to date.
60 To see what needs to be updated:
61 <blockquote>
62 <pre>cvs -n update</pre>
63 </blockquote>
64 behaves just as "cvs update" but doesn't actually change anything. This
65 is a useful way of summarizing the state
66 <br>of your code. The meaning of the output is summarized in the next topic.
67 <h2>
68 Getting updates from the repository</h2>
69 You can download and merge updates from the repository to bring you working
70 code up to date:
71 <blockquote>
72 <pre>cvs update -d -P</pre>
73 </blockquote>
74 will work recursively on all files in the current directory and below.
75 To update just a specific file or
76 <br>directory:
77 <blockquote>
78 <pre>cvs update <i>file</i></pre>
79 </blockquote>
80 You can also update to a specific version, just as you could check out
81 a specific version.
82 <blockquote>
83 <pre>cvs update -d -P -r release1_beta1</pre>
84 </blockquote>
85 If you checked out a specific version and want to update to the very latest
86 use the -A option will remove associated with a specific version as follows:
87 <blockquote>
88 <pre>cvs update -d -P -A</pre>
89 </blockquote>
90 "cvs update" produces output to the terminal with the following meanings:
91 <br>&nbsp;
94 <td NOSAVE>U <i>file</i></td>
96 <td>indicates that <i>file</i> was brought up to date with the repository
97 or that it exists in the repository but not in your work space.</td>
98 </tr>
100 <tr>
101 <td>P <i>file</i></td>
103 <td>does exactly as above but uses the "patch" method.</td>
104 </tr>
107 <td ALIGN=LEFT VALIGN=TOP>M <i>file</i></td>
109 <td>means the <i>file</i> was modified in your work space. Any additional
110 changes from the repository were merged in successfully.</td>
111 </tr>
113 <tr>
114 <td>C <i>file</i></td>
116 <td>means a merge is necessary because both the your copy and the repository
117 have changed <b>but</b> there is a conflict between the changes.</td>
118 </tr>
120 <tr>
121 <td>? <i>file</i></td>
123 <td>means the file exists in your work space but not on the repository.</td>
124 </tr>
125 </table>
127 <p>When conflicts arise, the sections of code are both kept and surrounded
128 by &lt;&lt;&lt;&lt;&lt;, ===== and >>>>> indicators. You need to
129 <br>examine these lines of the files and resolve the conflict.
130 <h2>
131 Wow! CVS is so good, where can I learn more?</h2>
132 The <a href="http://www.loria.fr/~molli/cvs/doc/cvs_toc.html">basic manual</a>
133 is a good reference. There is also an <a href="http://www.loria.fr/~molli/cvs/cvs-tut/cvs_tutorial_toc.html">online
134 tutorial</a> as well as an <a href="http://www.loria.fr/~molli/cvs/cvstrain/cvstrain.html">training
135 manual</a>. For those who prefer the good old fashioned book there's <a href="http://cvsbook.red-bean.com/">"Open
136 Source Development With CVS"</a>.
137 <br>
138 <hr WIDTH="100%">
140 <tr NOSAVE>
141 <td NOSAVE>Last modified on $Date: 2001/10/04 12:58:28 $</td>
143 <td>
144 <div align=right>CVS: $Source: /u/gcmpack/mitgcm.org/usingcvstoget.html,v
145 $Revision: 1.4 $</div>
146 </td>
147 </tr>
148 </table>
150 </body>
151 </html>

  ViewVC Help
Powered by ViewVC 1.1.22