|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
-
- <html>
-
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
- <title>CVS Task</title>
- </head>
-
- <body>
-
- <h2 id="cvs">Cvs</h2>
- <h3>Description</h3>
- <p>Handles packages/modules retrieved from a <a href="https://www.nongnu.org/cvs/"
- target="_top">CVS</a> repository.</p>
- <p><strong>Important:</strong> This task needs <kbd>cvs</kbd> binary on the path. If it isn't, you
- will get an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't
- 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
- 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.
- See <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=21657#c5" target="_top">bugzilla
- report 21657</a> for recommended workarounds.</p>
-
- <h3>Parameters</h3>
- <table class="attr">
- <tr>
- <th>Attribute</th>
- <th>Description</th>
- <th>Required</th>
- </tr>
- <tr>
- <td>command</td>
- <td>the CVS command to execute.</td>
- <td>No; default is <q>checkout</q></td>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <td>compressionlevel</td>
- <td>A number between <q>1</q> and <q>9</q> (corresponding to possible values for
- CVS <kbd>-z#</kbd> argument). Any other value is treated
- as <var>compression</var>=<q>false</q></td>
- <td>No; defaults to no compression</td>
- </tr>
- <tr>
- <td>cvsRoot</td>
- <td>the <code>CVSROOT</code> variable.</td>
- <td>No</td>
- </tr>
- <tr>
- <td>cvsRsh</td>
- <td>the <code>CVS_RSH</code> variable.</td>
- <td>No</td>
- </tr>
- <tr>
- <td>dest</td>
- <td>the directory where the checked out files should be placed. Note that this is different
- from CVS's <kbd>-d</kbd> command line switch as Apache Ant will never shorten pathnames to
- avoid empty directories.</td>
- <td>No; default is project's <var>basedir</var></td>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <td>tag</td>
- <td>the tag of the package/module to check out.</td>
- <td>No</td>
- </tr>
- <tr>
- <td>date</td>
- <td>Use the most recent revision no later than the given date</td>
- <td>No</td>
- </tr>
- <tr>
- <td>quiet</td>
- <td>suppress informational messages. This is the same as <kbd>-q</kbd> on the command
- line.</td>
- <td>No; defaults to <q>false</q></td>
- </tr>
- <tr>
- <td>reallyquiet</td>
- <td>suppress all messages. This is the same as <kbd>-Q</kbd> on the command line. <em>since
- Ant 1.6</em>.</td>
- <td>No; defaults to <q>false</q></td>
- </tr>
- <tr>
- <td>noexec</td>
- <td>report only, don't change any files.</td>
- <td>No; defaults to <q>false</q></td>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <td>append</td>
- <td>whether to append output/error when redirecting to a file.</td>
- <td>No; defaults to <q>false</q></td>
- </tr>
- <tr>
- <td>port</td>
- <td>Port used by CVS to communicate with the server.</td>
- <td>No; default is <q>2401</q></td>
- </tr>
- <tr>
- <td>passfile</td>
- <td>Password file to read passwords from.</td>
- <td>No; default is <q>~/.cvspass</q></td>
- </tr>
- <tr>
- <td>failonerror</td>
- <td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
- <td>No; defaults to <q>false</q></td>
- </tr>
- </table>
-
- <h3>Parameters specified as nested elements</h3>
-
- <h4>module</h4>
-
- <p>Specifies a package/module to work on, unlike the package attribute modules specified using this
- attribute can contain spaces in their name.</p>
-
- <table class="attr">
- <tr>
- <th>Attribute</th>
- <th>Description</th>
- <th>Required</th>
- </tr>
- <tr>
- <td>name</td>
- <td>The module's/package's name.</td>
- <td>Yes</td>
- </tr>
- </table>
-
- <h3>Examples</h3>
- <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>
-
- <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>
- elements, is:</p>
- <pre>
- <cvs output="patch">
- <commandline>
- <argument value="-q"/>
- <argument value="diff"/>
- <argument value="-u"/>
- <argument value="-N"/>
- </commandline>
- </cvs></pre>
- <p>or:</p>
- <pre>
- <cvs output="patch">
- <commandline>
- <argument line="-q diff -u -N"/>
- </commandline>
- </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>
-
- <pre> <cvs command="update -A -d"/></pre>
- <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
- 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>
-
- </body>
- </html>
|