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 "<code>cvs</code>" on the path. If it isn't, you will get
|
---|
33 | an error (such as error <code>2</code> on windows). If <code><cvs></code> doesn't work, try to execute <code>cvs.exe</code>
|
---|
34 | from 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
|
---|
37 | inside the registry. If the <a href="cvspass.html">cvspass task</a>
|
---|
38 | and the passfile attribute don't seem to work for you, the most likely
|
---|
39 | reason is that CVSNT ignores your .cvspass file completely. See <a
|
---|
40 | href="http://issues.apache.org/bugzilla/show_bug.cgi?id=21657#c5">bug
|
---|
41 | zilla 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 "checkout".</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="3"</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="false"</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 "false"</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 "false"</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 "false"</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 "false".</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 "false"</td>
|
---|
147 | <td align="center" valign="top">No</td>
|
---|
148 | </tr>
|
---|
149 | </table>
|
---|
150 | <h3>Examples</h3>
|
---|
151 | <pre> <cvs cvsRoot=":pserver:[email protected]:/home/cvspublic"
|
---|
152 | package="ant"
|
---|
153 | dest="${ws.dir}"
|
---|
154 | /></pre>
|
---|
155 | <p>checks out the package/module "ant" from the CVS
|
---|
156 | repository pointed to by the <code>cvsRoot</code> attribute, and stores the files in "<code>${ws.dir}</code>".</p>
|
---|
157 | <pre> <cvs dest="${ws.dir}" command="update"/></pre>
|
---|
158 | <p>updates the package/module that has previously been checked out into
|
---|
159 | "<code>${ws.dir}</code>".</p>
|
---|
160 |
|
---|
161 | <pre> <cvs command="-q diff -u -N" output="patch.txt"/></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 "cvs add" (<code>-N</code>) and can be used as input to patch.
|
---|
164 | The equivalent, using <code><commandline></code> elements, is:
|
---|
165 | </p>
|
---|
166 | <pre>
|
---|
167 | <cvs output="patch">
|
---|
168 | <commandline>
|
---|
169 | <argument value="-q"/>
|
---|
170 | <argument value="diff"/>
|
---|
171 | <argument value="-u"/>
|
---|
172 | <argument value="-N"/>
|
---|
173 | </commandline>
|
---|
174 | </cvs>
|
---|
175 | </pre>
|
---|
176 | or:
|
---|
177 | <pre>
|
---|
178 | <cvs output="patch">
|
---|
179 | <commandline>
|
---|
180 | <argument line="-q diff -u -N"/>
|
---|
181 | </commandline>
|
---|
182 | </cvs>
|
---|
183 | </pre>
|
---|
184 | <p>
|
---|
185 | You may include as many <code><commandline></code> elements as you like.
|
---|
186 | Each will inherit the <code>failonerror</code>, <code>compression</code>, and other "global" parameters
|
---|
187 | from the <code><cvs></code> element.
|
---|
188 | </p>
|
---|
189 |
|
---|
190 |
|
---|
191 | <pre> <cvs command="update -A -d"/></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 "as-is" so any cvs options should appear
|
---|
194 | before the command, and any command options should appear after the command as in the diff example
|
---|
195 | above. See <a href="http://ximbiot.com/cvs/wiki/index.php?title=Category:User_Documentation" target="_top">the cvs manual</a> for details,
|
---|
196 | specifically 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 |
|
---|