source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.7.0/manual/CoreTasks/cvs.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 8.3 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18
19<head>
20<meta http-equiv="Content-Language" content="en-us">
21<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
22<title>CVS Task</title>
23<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
24</head>
25
26<body>
27
28<h2><a name="cvs">Cvs</a></h2>
29<h3>Description</h3>
30<p>Handles packages/modules retrieved from a
31<a href="http://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p>
32<p><b>Important:</b> This task needs &quot;<code>cvs</code>&quot; on the path. If it isn't, you will get
33an error (such as error <code>2</code> on windows). If <code>&lt;cvs&gt;</code> doesn't work, try to execute <code>cvs.exe</code>
34from the command line in the target directory in which you are working.
35
36<p><b>CVSNT Note</b>: CVSNT prefers users to store the passwords
37inside the registry. If the <a href="cvspass.html">cvspass task</a>
38and the passfile attribute don't seem to work for you, the most likely
39reason is that CVSNT ignores your .cvspass file completely. See <a
40href="http://issues.apache.org/bugzilla/show_bug.cgi?id=21657#c5">bug
41zilla report 21657</a> for recommended workarounds.</p>
42
43<h3>Parameters</h3>
44<table border="1" cellpadding="2" cellspacing="0">
45 <tr>
46 <td valign="top"><b>Attribute</b></td>
47 <td valign="top"><b>Description</b></td>
48 <td align="center" valign="top"><b>Required</b></td>
49 </tr>
50 <tr>
51 <td valign="top">command</td>
52 <td valign="top">the CVS command to execute.</td>
53 <td align="center" valign="top">No, default &quot;checkout&quot;.</td>
54 </tr>
55 <tr>
56 <td valign="top">compression</td>
57 <td valign="top"><code>true</code> or <code>false</code> - if set
58 to true, this is the same as <code>compressionlevel=&quot;3&quot;</code></td>
59 <td align="center" valign="top">No. Defaults to false.</td>
60 </tr>
61 <tr>
62 <td valign="top">compressionlevel</td>
63 <td valign="top">A number between 1 and 9 (corresponding to
64 possible values for CVS' <code>-z#</code> argument). Any
65 other value is treated as <code>compression=&quot;false&quot;</code></td>
66 <td align="center" valign="top">No. Defaults to no compression.</td>
67 </tr>
68
69 <tr>
70 <td valign="top">cvsRoot</td>
71 <td valign="top">the <code>CVSROOT</code> variable.</td>
72 <td align="center" valign="top">No</td>
73 </tr>
74 <tr>
75 <td valign="top">cvsRsh</td>
76 <td valign="top">the <code>CVS_RSH</code> variable.</td>
77 <td align="center" valign="top">No</td>
78 </tr>
79 <tr>
80 <td valign="top">dest</td>
81 <td valign="top">the directory where the checked out files should
82 be placed. Note that this is different from CVS's <code>-d</code> command line
83 switch as Ant will never shorten pathnames to avoid empty
84 directories.</td>
85 <td align="center" valign="top">No, default is project's basedir.</td>
86 </tr>
87 <tr>
88 <td valign="top">package</td>
89 <td valign="top">the package/module to check out.</td>
90 <td align="center" valign="top">No</td>
91 </tr>
92 <tr>
93 <td valign="top">tag</td>
94 <td valign="top">the tag of the package/module to check out.</td>
95 <td align="center" valign="top">No</td>
96 </tr>
97 <tr>
98 <td valign="top">date</td>
99 <td valign="top">Use the most recent revision no later than the given date</td>
100 <td align="center" valign="top">No</td>
101 </tr>
102 <tr>
103 <td valign="top">quiet</td>
104 <td valign="top">suppress informational messages. This is the same as <code>-q</code> on the command line.</td>
105 <td align="center" valign="top">No, default &quot;false&quot;</td>
106 </tr>
107 <tr>
108 <td valign="top">reallyquiet</td>
109 <td valign="top">suppress all messages. This is the same as
110 <code>-Q</code> on the command line. <em>since Ant 1.6</em>.</td>
111 <td align="center" valign="top">No, default &quot;false&quot;</td>
112 </tr>
113 <tr>
114 <td valign="top">noexec</td>
115 <td valign="top">report only, don't change any files.</td>
116 <td align="center" valign="top">No, default to &quot;false&quot;</td>
117 </tr>
118 <tr>
119 <td valign="top">output</td>
120 <td valign="top">the file to direct standard output from the command.</td>
121 <td align="center" valign="top">No, default output to ANT Log as <code>MSG_INFO</code>.</td>
122 </tr>
123 <tr>
124 <td valign="top">error</td>
125 <td valign="top">the file to direct standard error from the command.</td>
126 <td align="center" valign="top">No, default error to ANT Log as <code>MSG_WARN</code>.</td>
127 </tr>
128 <tr>
129 <td valign="top">append</td>
130 <td valign="top">whether to append output/error when redirecting to a file.</td>
131 <td align="center" valign="top">No, default to &quot;false&quot;.</td>
132 </tr>
133 <tr>
134 <td valign="top">port</td>
135 <td valign="top">Port used by CVS to communicate with the server.</td>
136 <td align="center" valign="top">No, default port <code>2401</code>.</td>
137 </tr>
138 <tr>
139 <td valign="top">passfile</td>
140 <td valign="top">Password file to read passwords from.</td>
141 <td align="center" valign="top">No, default file <code>~/.cvspass</code>.</td>
142 </tr>
143 <tr>
144 <td valign="top">failonerror</td>
145 <td valign="top">Stop the build process if the command exits with a
146 return code other than <code>0</code>. Defaults to &quot;false&quot;</td>
147 <td align="center" valign="top">No</td>
148 </tr>
149</table>
150<h3>Examples</h3>
151<pre> &lt;cvs cvsRoot=&quot;:pserver:[email protected]:/home/cvspublic&quot;
152 package=&quot;ant&quot;
153 dest=&quot;${ws.dir}&quot;
154 /&gt;</pre>
155<p>checks out the package/module &quot;ant&quot; from the CVS
156repository pointed to by the <code>cvsRoot</code> attribute, and stores the files in &quot;<code>${ws.dir}</code>&quot;.</p>
157<pre> &lt;cvs dest=&quot;${ws.dir}&quot; command=&quot;update&quot;/&gt;</pre>
158<p>updates the package/module that has previously been checked out into
159&quot;<code>${ws.dir}</code>&quot;.</p>
160
161<pre> &lt;cvs command=&quot;-q diff -u -N&quot; output=&quot;patch.txt&quot;/&gt;</pre>
162
163<p>silently (<code>-q</code>) creates a file called <code>patch.txt</code> which contains a unified (<code>-u</code>) diff which includes new files added via &quot;cvs add&quot; (<code>-N</code>) and can be used as input to patch.
164The equivalent, using <code>&lt;commandline&gt;</code> elements, is:
165</p>
166<pre>
167&lt;cvs output=&quot;patch&quot;&gt;
168 &lt;commandline&gt;
169 &lt;argument value=&quot;-q&quot;/&gt;
170 &lt;argument value=&quot;diff&quot;/&gt;
171 &lt;argument value=&quot;-u&quot;/&gt;
172 &lt;argument value=&quot;-N&quot;/&gt;
173 &lt;/commandline&gt;
174&lt;/cvs&gt;
175</pre>
176or:
177<pre>
178&lt;cvs output=&quot;patch&quot;&gt;
179 &lt;commandline&gt;
180 &lt;argument line=&quot;-q diff -u -N&quot;/&gt;
181 &lt;/commandline&gt;
182&lt;/cvs&gt;
183</pre>
184<p>
185You may include as many <code>&lt;commandline&gt;</code> elements as you like.
186Each will inherit the <code>failonerror</code>, <code>compression</code>, and other &quot;global&quot; parameters
187from the <code>&lt;cvs&gt;</code> element.
188</p>
189
190
191<pre> &lt;cvs command=&quot;update -A -d&quot;/&gt;</pre>
192<p>Updates from the head of repository ignoring sticky bits (<code>-A</code>) and creating any new directories as necessary (<code>-d</code>).</p>
193<p>Note: the text of the command is passed to cvs &quot;as-is&quot; so any cvs options should appear
194before the command, and any command options should appear after the command as in the diff example
195above. See <a href="http://ximbiot.com/cvs/wiki/index.php?title=Category:User_Documentation" target="_top">the cvs manual</a> for details,
196specifically the <a href="http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Guide_to_CVS_commands#SEC116" target="_top">Guide to CVS commands</a></p>
197
198
199</body>
200</html>
201
Note: See TracBrowser for help on using the repository browser.