1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>CVS Task</title>
|
---|
6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <h2><a name="cvs">Cvs</a></h2>
|
---|
12 | <h3>Description</h3>
|
---|
13 | <p>Handles packages/modules retrieved from a
|
---|
14 | <a href="http://www.cvshome.org/" target="_top">CVS</a> repository.</p>
|
---|
15 | <p><b>Important:</b> This task needs "<code>cvs</code>" on the path. If it isn't, you will get
|
---|
16 | an error (such as error <code>2</code> on windows). If <code><cvs></code> doesn't work, try to execute <code>cvs.exe</code>
|
---|
17 | from the command line in the target directory in which you are working.
|
---|
18 | <h3>Parameters</h3>
|
---|
19 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
20 | <tr>
|
---|
21 | <td valign="top"><b>Attribute</b></td>
|
---|
22 | <td valign="top"><b>Description</b></td>
|
---|
23 | <td align="center" valign="top"><b>Required</b></td>
|
---|
24 | </tr>
|
---|
25 | <tr>
|
---|
26 | <td valign="top">command</td>
|
---|
27 | <td valign="top">the CVS command to execute.</td>
|
---|
28 | <td align="center" valign="top">No, default "checkout".</td>
|
---|
29 | </tr>
|
---|
30 | <tr>
|
---|
31 | <td valign="top">compression</td>
|
---|
32 | <td valign="top"><code>true</code> or <code>false</code> - if set
|
---|
33 | to true, this is the same as <code>compressionlevel="3"</code></td>
|
---|
34 | <td align="center" valign="top">No. Defaults to false.</td>
|
---|
35 | </tr>
|
---|
36 | <tr>
|
---|
37 | <td valign="top">compressionlevel</td>
|
---|
38 | <td valign="top">A number between 1 and 9 (corresponding to
|
---|
39 | possible values for CVS' <code>-z#</code> argument). Any
|
---|
40 | other value is treated as <code>compression="false"</code></td>
|
---|
41 | <td align="center" valign="top">No. Defaults to no compression.</td>
|
---|
42 | </tr>
|
---|
43 |
|
---|
44 | <tr>
|
---|
45 | <td valign="top">cvsRoot</td>
|
---|
46 | <td valign="top">the <code>CVSROOT</code> variable.</td>
|
---|
47 | <td align="center" valign="top">No</td>
|
---|
48 | </tr>
|
---|
49 | <tr>
|
---|
50 | <td valign="top">cvsRsh</td>
|
---|
51 | <td valign="top">the <code>CVS_RSH</code> variable.</td>
|
---|
52 | <td align="center" valign="top">No</td>
|
---|
53 | </tr>
|
---|
54 | <tr>
|
---|
55 | <td valign="top">dest</td>
|
---|
56 | <td valign="top">the directory where the checked out files should
|
---|
57 | be placed. Note that this is different from CVS's <code>-d</code> command line
|
---|
58 | switch as Ant will never shorten pathnames to avoid empty
|
---|
59 | directories.</td>
|
---|
60 | <td align="center" valign="top">No, default is project's basedir.</td>
|
---|
61 | </tr>
|
---|
62 | <tr>
|
---|
63 | <td valign="top">package</td>
|
---|
64 | <td valign="top">the package/module to check out.</td>
|
---|
65 | <td align="center" valign="top">No</td>
|
---|
66 | </tr>
|
---|
67 | <tr>
|
---|
68 | <td valign="top">tag</td>
|
---|
69 | <td valign="top">the tag of the package/module to check out.</td>
|
---|
70 | <td align="center" valign="top">No</td>
|
---|
71 | </tr>
|
---|
72 | <tr>
|
---|
73 | <td valign="top">date</td>
|
---|
74 | <td valign="top">Use the most recent revision no later than the given date</td>
|
---|
75 | <td align="center" valign="top">No</td>
|
---|
76 | </tr>
|
---|
77 | <tr>
|
---|
78 | <td valign="top">quiet</td>
|
---|
79 | <td valign="top">suppress informational messages. This is the same as <code>-q</code> on the command line.</td>
|
---|
80 | <td align="center" valign="top">No, default "false"</td>
|
---|
81 | </tr>
|
---|
82 | <tr>
|
---|
83 | <td valign="top">reallyquiet</td>
|
---|
84 | <td valign="top">suppress all messages. This is the same as
|
---|
85 | <code>-Q</code> on the command line. <em>since Ant 1.6</em>.</td>
|
---|
86 | <td align="center" valign="top">No, default "false"</td>
|
---|
87 | </tr>
|
---|
88 | <tr>
|
---|
89 | <td valign="top">noexec</td>
|
---|
90 | <td valign="top">report only, don't change any files.</td>
|
---|
91 | <td align="center" valign="top">No, default to "false"</td>
|
---|
92 | </tr>
|
---|
93 | <tr>
|
---|
94 | <td valign="top">output</td>
|
---|
95 | <td valign="top">the file to direct standard output from the command.</td>
|
---|
96 | <td align="center" valign="top">No, default output to ANT Log as <code>MSG_INFO</code>.</td>
|
---|
97 | </tr>
|
---|
98 | <tr>
|
---|
99 | <td valign="top">error</td>
|
---|
100 | <td valign="top">the file to direct standard error from the command.</td>
|
---|
101 | <td align="center" valign="top">No, default error to ANT Log as <code>MSG_WARN</code>.</td>
|
---|
102 | </tr>
|
---|
103 | <tr>
|
---|
104 | <td valign="top">append</td>
|
---|
105 | <td valign="top">whether to append output/error when redirecting to a file.</td>
|
---|
106 | <td align="center" valign="top">No, default to "false".</td>
|
---|
107 | </tr>
|
---|
108 | <tr>
|
---|
109 | <td valign="top">port</td>
|
---|
110 | <td valign="top">Port used by CVS to communicate with the server.</td>
|
---|
111 | <td align="center" valign="top">No, default port <code>2401</code>.</td>
|
---|
112 | </tr>
|
---|
113 | <tr>
|
---|
114 | <td valign="top">passfile</td>
|
---|
115 | <td valign="top">Password file to read passwords from.</td>
|
---|
116 | <td align="center" valign="top">No, default file <code>~/.cvspass</code>.</td>
|
---|
117 | </tr>
|
---|
118 | <tr>
|
---|
119 | <td valign="top">failonerror</td>
|
---|
120 | <td valign="top">Stop the build process if the command exits with a
|
---|
121 | return code other than <code>0</code>. Defaults to "false"</td>
|
---|
122 | <td align="center" valign="top">No</td>
|
---|
123 | </tr>
|
---|
124 | </table>
|
---|
125 | <h3>Examples</h3>
|
---|
126 | <pre> <cvs cvsRoot=":pserver:[email protected]:/home/cvspublic"
|
---|
127 | package="ant"
|
---|
128 | dest="${ws.dir}"
|
---|
129 | /></pre>
|
---|
130 | <p>checks out the package/module "ant" from the CVS
|
---|
131 | repository pointed to by the <code>cvsRoot</code> attribute, and stores the files in "<code>${ws.dir}</code>".</p>
|
---|
132 | <pre> <cvs dest="${ws.dir}" command="update"/></pre>
|
---|
133 | <p>updates the package/module that has previously been checked out into
|
---|
134 | "<code>${ws.dir}</code>".</p>
|
---|
135 |
|
---|
136 | <pre> <cvs command="-q diff -u -N" output="patch.txt"/></pre>
|
---|
137 |
|
---|
138 | <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.
|
---|
139 | The equivalent, using <code><commandline></code> elements, is:
|
---|
140 | </p>
|
---|
141 | <pre>
|
---|
142 | <cvs output="patch">
|
---|
143 | <commandline>
|
---|
144 | <argument value="-q"/>
|
---|
145 | <argument value="diff"/>
|
---|
146 | <argument value="-u"/>
|
---|
147 | <argument value="-N"/>
|
---|
148 | </commandline>
|
---|
149 | </cvs>
|
---|
150 | </pre>
|
---|
151 | or:
|
---|
152 | <pre>
|
---|
153 | <cvs output="patch">
|
---|
154 | <commandline>
|
---|
155 | <argument line="-q diff -u -N"/>
|
---|
156 | </commandline>
|
---|
157 | </cvs>
|
---|
158 | </pre>
|
---|
159 | <p>
|
---|
160 | You may include as many <code><commandline></code> elements as you like.
|
---|
161 | Each will inherit the <code>failonerror</code>, <code>compression</code>, and other "global" parameters
|
---|
162 | from the <code><cvs></code> element.
|
---|
163 | </p>
|
---|
164 |
|
---|
165 |
|
---|
166 | <pre> <cvs command="update -A -d"/></pre>
|
---|
167 | <p>Updates from the head of repository ignoring sticky bits (<code>-A</code>) and creating any new directories as necessary (<code>-d</code>).</p>
|
---|
168 | <p>Note: the text of the command is passed to cvs "as-is" so any cvs options should appear
|
---|
169 | before the command, and any command options should appear after the command as in the diff example
|
---|
170 | above. See <a href="http://www.cvshome.org/docs/manual/cvs-1.11.13/cvs.html" target="_top">the cvs manual</a> for details,
|
---|
171 | specifically the <a href="http://www.cvshome.org/docs/manual/cvs-1.11.13/cvs_16.html" target="_top">Guide to CVS commands</a></p>
|
---|
172 | <hr>
|
---|
173 | <p align="center">Copyright © 2000-2004 The Apache Software
|
---|
174 | Foundation. All rights Reserved.</p>
|
---|
175 |
|
---|
176 | </body>
|
---|
177 | </html>
|
---|
178 |
|
---|