| <!-- |
| 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. |
| --> |
| <html> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <title>Subversion Task</title> |
| <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css"> |
| </head> |
| |
| <body> |
| |
| <h2><a name="svn">SVN</a></h2> |
| <h3>Description</h3> |
| <p>Handles packages/modules retrieved from a |
| <a href="http://subversion.tigris.org/" target="_top">Subversion</a> repository.</p> |
| <p><b>Important:</b> This task needs "<code>svn</code>" on the path. If it isn't, you will get |
| an error (such as error <code>2</code> on windows). If <code><svn></code> doesn't work, try to execute <code>svn.exe</code> |
| from the command line in the target directory in which you are working. |
| <h3>Parameters</h3> |
| <table border="1" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td valign="top"><b>Attribute</b></td> |
| <td valign="top"><b>Description</b></td> |
| <td align="center" valign="top"><b>Required</b></td> |
| </tr> |
| <tr> |
| <td valign="top">subcommand</td> |
| <td valign="top">the SVN subcommand to execute.</td> |
| <td align="center" valign="top">No, default "checkout".</td> |
| </tr> |
| <tr> |
| <td valign="top">svnURL</td> |
| <td valign="top">the URL the subcommand should apply to.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">dest</td> |
| <td valign="top">the directory where the checked out files should |
| be placed. Note that this is different from SVN's <code>-d</code> command line |
| switch as Ant will never shorten pathnames to avoid empty |
| directories.</td> |
| <td align="center" valign="top">No, default is project's basedir.</td> |
| </tr> |
| <tr> |
| <td valign="top">revision</td> |
| <td valign="top">the revision or date of the subcommand should apply to</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">quiet</td> |
| <td valign="top">suppress informational messages. This is the same as <code>--quiet</code> on the command line.</td> |
| <td align="center" valign="top">No, default "false"</td> |
| </tr> |
| <tr> |
| <td valign="top">verbose</td> |
| <td valign="top">Be verbose. This is the same as <code>--verbose</code> on the command line.</td> |
| <td align="center" valign="top">No, default "false"</td> |
| </tr> |
| <tr> |
| <td valign="top">dryrun</td> |
| <td valign="top">report only, don't change any files.</td> |
| <td align="center" valign="top">No, default to "false"</td> |
| </tr> |
| <tr> |
| <td valign="top">file</td> |
| <td valign="top">Uses the contents of the file passed as an |
| argument to this switch for the specified subcommand.</td> |
| <td align="center" valign="top">No.</td> |
| </tr> |
| <tr> |
| <td valign="top">force</td> |
| <td valign="top">Forces a particular command or operation to run.</td> |
| <td align="center" valign="top">No, defaults to false.</td> |
| </tr> |
| <tr> |
| <td valign="top">recursive</td> |
| <td valign="top">Makes a subcommand recurse into |
| subdirectories. Most subcommands recurse by default.</td> |
| <td align="center" valign="top">No.</td> |
| </tr> |
| <tr> |
| <td valign="top">targets</td> |
| <td valign="top">Tells Subversion to get the list of files that you wish to |
| operate on from the filename you provide instead of listing all |
| the files on the command line.</td> |
| <td align="center" valign="top">No.</td> |
| </tr> |
| <tr> |
| <td valign="top">output</td> |
| <td valign="top">the file to direct standard output from the command.</td> |
| <td align="center" valign="top">No, default output to ANT Log as <code>MSG_INFO</code>.</td> |
| </tr> |
| <tr> |
| <td valign="top">error</td> |
| <td valign="top">the file to direct standard error from the command.</td> |
| <td align="center" valign="top">No, default error to ANT Log as <code>MSG_WARN</code>.</td> |
| </tr> |
| <tr> |
| <td valign="top">append</td> |
| <td valign="top">whether to append output/error when redirecting to a file.</td> |
| <td align="center" valign="top">No, default to "false".</td> |
| </tr> |
| <tr> |
| <td valign="top">failonerror</td> |
| <td valign="top">Stop the build process if the command exits with a |
| return code other than <code>0</code>. Defaults to "false"</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| </table> |
| <h3>Examples</h3> |
| <pre> <svn svnURL="http://svn.apache.org/repos/asf/httpd/httpd/trunk/" |
| dest="${ws.dir}" |
| /></pre> |
| <p>checks out the URL |
| "http://svn.apache.org/repos/asf/httpd/httpd/trunk/" and |
| stores the files in "<code>${ws.dir}</code>".</p> |
| <pre> <svn dest="${ws.dir}" command="update"/></pre> |
| <p>updates the working copy that has previously been checked out into |
| "<code>${ws.dir}</code>".</p> |
| |
| <pre> <svn subcommand="-q diff" output="patch.txt"/></pre> |
| |
| <p>silently (<code>-q</code>) creates a file called <code>patch.txt</code> which contains a unified diff which can be used as input to patch. |
| The equivalent, using <code><commandline></code> elements, is: |
| </p> |
| <pre> |
| <svn output="patch"> |
| <commandline> |
| <argument value="-q"/> |
| <argument value="diff"/> |
| </commandline> |
| </svn> |
| </pre> |
| or: |
| <pre> |
| <svn output="patch"> |
| <commandline> |
| <argument line="-q diff -u -N"/> |
| </commandline> |
| </svn> |
| </pre> |
| <p> |
| You may include as many <code><commandline></code> elements as you like. |
| Each will inherit the <code>failonerror</code> and other "global" parameters |
| from the <code><svn></code> element. |
| </p> |
| |
| <pre> <svn subcommand="update"/></pre> |
| <p>Updates from the head of repository creating any new directories as necessary.</p> |
| <p>See <a href="http://svnbook.red-bean.com/en/1.1/ch09.html#svn-ch-9-sect-1" target="_top">Version Control with Subversion</a> for details, |
| specifically the <a href="http://svnbook.red-bean.com/en/1.1/ch09.html#svn-ch-9-sect-1" target="_top">The Subversion Command Line Client: svn</a></p> |
| |
| |
| </body> |
| </html> |
| |