2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2001-02-13 12:32:01 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
2007-05-02 06:15:35 +00:00
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
|
|
|
<title>CVS Task</title>
|
2001-02-13 12:32:01 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="cvs">Cvs</h2>
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Handles packages/modules retrieved from a <a href="https://www.nongnu.org/cvs/"
|
|
|
|
target="_top">CVS</a> repository.</p>
|
2018-03-10 20:17:33 +01:00
|
|
|
<p><strong>Important:</strong> This task needs <kbd>cvs</kbd> binary on the path. If it isn't, you
|
2018-03-08 07:43:53 +01:00
|
|
|
will get an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't
|
2018-03-10 20:17:33 +01:00
|
|
|
work, try to execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you
|
|
|
|
are working. Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with
|
|
|
|
the Unix version, this is not completely true for certain other CVS clients—like CVSNT for
|
2018-02-28 07:58:59 +01:00
|
|
|
example—and some operation may fail when using such an incompatible client.</p>
|
|
|
|
|
|
|
|
<p><strong>CVSNT Note</strong>: CVSNT prefers users to store the passwords inside the registry. If
|
|
|
|
the <a href="cvspass.html">cvspass task</a> and the <var>passfile</var> attribute don't seem to work
|
|
|
|
for you, the most likely reason is that CVSNT ignores your <samp>.cvspass</samp> file completely.
|
2018-03-08 07:43:53 +01:00
|
|
|
See <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=21657#c5" target="_top">bugzilla
|
|
|
|
report 21657</a> for recommended workarounds.</p>
|
2005-03-14 11:06:26 +00:00
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2001-02-13 12:32:01 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>command</td>
|
|
|
|
<td>the CVS command to execute.</td>
|
|
|
|
<td>No; default is <q>checkout</q></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
2002-04-04 10:34:22 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>compression</td>
|
|
|
|
<td><q>true</q> (equivalent to <var>compressionlevel</var>=<q>3</q>) or <q>false</q></td>
|
|
|
|
<td>No; defaults to <q>false</q></td>
|
2002-04-11 09:52:48 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>compressionlevel</td>
|
|
|
|
<td>A number between <q>1</q> and <q>9</q> (corresponding to possible values for
|
2018-03-10 20:17:33 +01:00
|
|
|
CVS <kbd>-z#</kbd> argument). Any other value is treated
|
2018-02-28 07:58:59 +01:00
|
|
|
as <var>compression</var>=<q>false</q></td>
|
|
|
|
<td>No; defaults to no compression</td>
|
2002-04-04 10:34:22 +00:00
|
|
|
</tr>
|
2001-02-13 12:32:01 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>cvsRoot</td>
|
|
|
|
<td>the <code>CVSROOT</code> variable.</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
2001-11-19 10:54:50 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>cvsRsh</td>
|
|
|
|
<td>the <code>CVS_RSH</code> variable.</td>
|
|
|
|
<td>No</td>
|
2001-11-19 10:54:50 +00:00
|
|
|
</tr>
|
2001-02-13 12:32:01 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>dest</td>
|
|
|
|
<td>the directory where the checked out files should be placed. Note that this is different
|
2018-03-10 20:17:33 +01:00
|
|
|
from CVS's <kbd>-d</kbd> command line switch as Apache Ant will never shorten pathnames to
|
2018-02-28 07:58:59 +01:00
|
|
|
avoid empty directories.</td>
|
|
|
|
<td>No; default is project's <var>basedir</var></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>package</td>
|
|
|
|
<td>the package/module to check out. <strong>Note</strong>: multiple attributes can be split
|
|
|
|
using spaces. Use a nested <code><module></code> element if you want to specify a
|
|
|
|
module with spaces in its name.</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>tag</td>
|
|
|
|
<td>the tag of the package/module to check out.</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>date</td>
|
|
|
|
<td>Use the most recent revision no later than the given date</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>quiet</td>
|
2018-03-10 20:17:33 +01:00
|
|
|
<td>suppress informational messages. This is the same as <kbd>-q</kbd> on the command
|
2018-02-28 07:58:59 +01:00
|
|
|
line.</td>
|
|
|
|
<td>No; defaults to <q>false</q></td>
|
2003-09-02 14:38:19 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>reallyquiet</td>
|
2018-03-10 20:17:33 +01:00
|
|
|
<td>suppress all messages. This is the same as <kbd>-Q</kbd> on the command line. <em>since
|
2018-03-02 08:23:45 +01:00
|
|
|
Ant 1.6</em>.</td>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>No; defaults to <q>false</q></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>noexec</td>
|
|
|
|
<td>report only, don't change any files.</td>
|
|
|
|
<td>No; defaults to <q>false</q></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>output</td>
|
|
|
|
<td>the file to direct standard output from the command.</td>
|
|
|
|
<td>No; default is output to the log as <code>MSG_INFO</code></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>error</td>
|
|
|
|
<td>the file to direct standard error from the command.</td>
|
|
|
|
<td>No; default is error to the log as <code>MSG_WARN</code></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
2001-12-29 19:46:45 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>append</td>
|
|
|
|
<td>whether to append output/error when redirecting to a file.</td>
|
|
|
|
<td>No; defaults to <q>false</q></td>
|
2001-12-29 19:46:45 +00:00
|
|
|
</tr>
|
2001-04-27 11:52:55 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>port</td>
|
|
|
|
<td>Port used by CVS to communicate with the server.</td>
|
|
|
|
<td>No; default is <q>2401</q></td>
|
2001-04-27 11:52:55 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>passfile</td>
|
|
|
|
<td>Password file to read passwords from.</td>
|
|
|
|
<td>No; default is <q>~/.cvspass</q></td>
|
2001-04-27 11:52:55 +00:00
|
|
|
</tr>
|
2001-10-19 08:47:14 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>failonerror</td>
|
2018-03-02 08:23:45 +01:00
|
|
|
<td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>No; defaults to <q>false</q></td>
|
2001-10-19 08:47:14 +00:00
|
|
|
</tr>
|
2001-02-13 12:32:01 +00:00
|
|
|
</table>
|
2008-10-16 14:39:24 +00:00
|
|
|
|
|
|
|
<h3>Parameters specified as nested elements</h3>
|
|
|
|
|
|
|
|
<h4>module</h4>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Specifies a package/module to work on, unlike the package attribute modules specified using this
|
|
|
|
attribute can contain spaces in their name.</p>
|
2008-10-16 14:39:24 +00:00
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2008-10-16 14:39:24 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2008-10-16 14:39:24 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>name</td>
|
|
|
|
<td>The module's/package's name.</td>
|
|
|
|
<td>Yes</td>
|
2008-10-16 14:39:24 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Examples</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre>
|
|
|
|
<cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
|
|
|
|
package="ant"
|
|
|
|
dest="${ws.dir}"/></pre>
|
|
|
|
<p>checks out the package/module <samp>ant</samp> from the CVS repository pointed to by
|
|
|
|
the <var>cvsRoot</var> attribute, and stores the files in <samp>${ws.dir}</samp>.</p>
|
|
|
|
|
|
|
|
<pre><cvs dest="${ws.dir}" command="update"/></pre>
|
|
|
|
<p>updates the package/module that has previously been checked out into <samp>${ws.dir}</samp>.</p>
|
|
|
|
|
|
|
|
<pre><cvs command="-q diff -u -N" output="patch.txt"/></pre>
|
|
|
|
|
2018-03-10 20:17:33 +01:00
|
|
|
<p>silently (<kbd>-q</kbd>) creates a file called <samp>patch.txt</samp> which contains a unified
|
|
|
|
(<kbd>-u</kbd>) diff which includes new files added via <kbd>cvs add</kbd> (<kbd>-N</kbd>) and
|
|
|
|
can be used as input to <kbd>patch</kbd>. The equivalent, using <code><commandline></code>
|
2018-02-28 07:58:59 +01:00
|
|
|
elements, is:</p>
|
2002-04-04 10:34:22 +00:00
|
|
|
<pre>
|
2003-09-02 14:38:19 +00:00
|
|
|
<cvs output="patch">
|
2002-04-04 10:34:22 +00:00
|
|
|
<commandline>
|
2003-09-02 14:38:19 +00:00
|
|
|
<argument value="-q"/>
|
|
|
|
<argument value="diff"/>
|
|
|
|
<argument value="-u"/>
|
|
|
|
<argument value="-N"/>
|
2002-04-04 10:34:22 +00:00
|
|
|
</commandline>
|
2018-02-28 07:58:59 +01:00
|
|
|
</cvs></pre>
|
|
|
|
<p>or:</p>
|
2002-04-04 10:34:22 +00:00
|
|
|
<pre>
|
2003-09-02 14:38:19 +00:00
|
|
|
<cvs output="patch">
|
2002-04-04 10:34:22 +00:00
|
|
|
<commandline>
|
2003-09-02 14:38:19 +00:00
|
|
|
<argument line="-q diff -u -N"/>
|
2002-04-04 10:34:22 +00:00
|
|
|
</commandline>
|
2018-02-28 07:58:59 +01:00
|
|
|
</cvs></pre>
|
|
|
|
<p>You may include as many <code><commandline></code> elements as you like. Each will inherit
|
|
|
|
the <var>failonerror</var>, <var>compression</var>, and other "global" parameters from
|
|
|
|
the <code><cvs></code> element.</p>
|
2002-04-04 10:34:22 +00:00
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
<pre> <cvs command="update -A -d"/></pre>
|
2018-03-10 20:17:33 +01:00
|
|
|
<p>Updates from the head of repository ignoring sticky bits (<kbd>-A</kbd>) and creating any new
|
|
|
|
directories as necessary (<kbd>-d</kbd>).</p>
|
|
|
|
<p>Note: the text of the command is passed to <kbd>cvs</kbd> "as-is" so any cvs options
|
2018-02-28 07:58:59 +01:00
|
|
|
should appear before the command, and any command options should appear after the command as in the
|
|
|
|
diff example above. See <a href="http://cvsbook.red-bean.com/cvsbook.html" target="_top">the CVS
|
|
|
|
book</a> for details, specifically
|
|
|
|
the <a href="http://cvsbook.red-bean.com/cvsbook.html#Commands%20And%20Options" target="_top">Guide
|
|
|
|
to CVS commands</a></p>
|
2006-09-11 20:22:51 +00:00
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
</body>
|
|
|
|
</html>
|