/[MITgcm]/mitgcm.org/usingcvstoget.html
ViewVC logotype

Annotation of /mitgcm.org/usingcvstoget.html

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


Revision 1.8 - (hide annotations) (download) (as text)
Fri Jan 22 03:49:20 2010 UTC (14 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +2 -2 lines
File MIME type: text/html
FILE REMOVED
has been replaced 6 years ago by mitgcm.org/front_content .xml version
 and visible from http://mitgcm.org/public/cvs_policy.html
               or http://mitgcm.org/public/using_cvs.html

1 adcroft 1.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">
8    
9     <center>
10     <h1>
11 adcroft 1.5 Obtaining MITgcm source using CVS</h1></center>
12 adcroft 1.1
13     <h2>
14     Environment</h2>
15    
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>
24    
25     <blockquote>
26 adcroft 1.5 <pre>cvs co -d <i>directory</i> -P MITgcm</pre>
27 adcroft 1.1 </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 adcroft 1.3 <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 adcroft 1.5 <pre>cvs co -d <i>directory</i> -P -r release1_beta1 MITgcm</pre>
39 adcroft 1.3 </blockquote>
40    
41 adcroft 1.1 <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>
56    
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 adcroft 1.3 <pre>cvs update -d -P</pre>
73 adcroft 1.1 </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 adcroft 1.3 You can also update to a specific version, just as you could check out
81     a specific version.
82     <blockquote>
83 adcroft 1.4 <pre>cvs update -d -P -r release1_beta1</pre>
84 adcroft 1.3 </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 adcroft 1.1 "cvs update" produces output to the terminal with the following meanings:
91     <br>&nbsp;
92     <table BORDER CELLPADDING=3 WIDTH="80%" NOSAVE >
93     <tr ALIGN=LEFT VALIGN=TOP NOSAVE>
94     <td NOSAVE>U <i>file</i></td>
95    
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>
99    
100     <tr>
101     <td>P <i>file</i></td>
102    
103     <td>does exactly as above but uses the "patch" method.</td>
104     </tr>
105    
106     <tr ALIGN=LEFT VALIGN=TOP>
107     <td ALIGN=LEFT VALIGN=TOP>M <i>file</i></td>
108    
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>
112    
113     <tr>
114     <td>C <i>file</i></td>
115    
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>
119    
120     <tr>
121     <td>? <i>file</i></td>
122    
123     <td>means the file exists in your work space but not on the repository.</td>
124     </tr>
125     </table>
126    
127 adcroft 1.3 <p>When conflicts arise, the sections of code are both kept and surrounded
128 adcroft 1.1 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 heimbach 1.7 The <a href="http://web.mit.edu/afs/athena.mit.edu/project/gnu/doc/html/cvs_toc.html">basic manual</a>
133 heimbach 1.6 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">online
134 adcroft 1.1 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%">
139     <table CELLSPACING=0 CELLPADDING=0 WIDTH="100%" NOSAVE >
140     <tr NOSAVE>
141 jmc 1.8 <td NOSAVE>Last modified on $Date: 2008/04/30 15:05:26 $</td>
142 adcroft 1.1
143     <td>
144 adcroft 1.3 <div align=right>CVS: $Source: /u/gcmpack/mitgcm.org/usingcvstoget.html,v
145 jmc 1.8 $Revision: 1.7 $</div>
146 adcroft 1.1 </td>
147     </tr>
148     </table>
149    
150     </body>
151     </html>

  ViewVC Help
Powered by ViewVC 1.1.22