blob: 222c25304eead2931eb1fab5b56e2804013c05cb [file] [log] [blame]
<!--
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>RevisionDiff Task</title>
</head>
<body>
<h2><a name="tagdiff">TagDiff</a></h2>
<h3>Description</h3>
<p>Generates an XML-formatted report file of the changes between two
tags recorded in a <a href="http://subversion.tigris.org/"
target="_top">Subversion</a> repository. </p>
<p><b>Important:</b> This task needs "svn" on the path. If it isn't,
you will get an error (such as error 2 on windows). If
<code>&lt;svn&gt;</code> doesn't work, try to execute
<code>svn.exe</code> from the command line in the target directory in
which you are working.</p>
<p>This task assumes that your repository follows the best-practice
layout of</p>
<pre>
BASEURL
|
|
-----&gt; trunk
-----&gt; tags
|
|
----------&gt; fromTag
----------&gt; toTag
-----&gt; branches
|
|
----------&gt; fromBranch
----------&gt; toBranch
</pre>
<p>It is possible to compare two branches, two tags or tags and
branches. The magic name "trunk" can be used in as from* or to* in
order to compare a tag/branch to trunk.</p>
<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">fromTag</td>
<td valign="top">The first tag.</td>
<td align="center" valign="top" rowspan="3">One of the three.</td>
</tr>
<tr>
<td valign="top">fromBranch</td>
<td valign="top">The first branch.</td>
</tr>
<tr>
<td valign="top">tag1</td>
<td valign="top"><b>Deprecated.</b> Equivalent to fromTag.</td>
</tr>
<tr>
<td valign="top">toTag</td>
<td valign="top">The second tag.</td>
<td align="center" valign="top" rowspan="3">No, default is "trunk/"</td>
</tr>
<tr>
<td valign="top">toBranch</td>
<td valign="top">The second branch.</td>
</tr>
<tr>
<td valign="top">tag2</td>
<td valign="top"><b>Deprecated.</b> Equivalent to toTag.</td>
</tr>
<tr>
<td valign="top">destfile</td>
<td valign="top">The file in which to write the diff report.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">baseURL</td>
<td valign="top">The baseURL of the repository, used to calculate
the two URLs to compare.</td>
<td align="center" valign="top">Yes</td>
</tr>
</table>
<h3>Parameters inherited from the <code>svn</code> task</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">failonerror</td>
<td valign="top">Stop the buildprocess if the command exits with a
returncode other than 0. Defaults to false</td>
<td align="center" valign="top">No</td>
</tr>
</table>
<h3>Examples</h3>
<pre>
&lt;tagdiff failonerror="true"
baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/"
destfile="diff.xml"
fromTag="initial"
toTag="BCEL_5_0"
/&gt;
</pre>
<p>Generates a tagdiff report for all the changes that have been
made in the <code>Apache BCEL</code> module between the tags
<code>initial</code> and <code>BCEL_5_0</code>. It writes these changes
into the file <code>diff.xml</code>.</p>
<pre>
&lt;tagdiff failonerror="true"
baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/"
destfile="diff.xml"
fromTag="BCEL_5_0"
toBranch="trunk"
/&gt;
</pre>
<p>Generates a tagdiff report for all the changes that have been made
in the <code>Apache BCEL</code> module between the tag
<code>BCEL_5_0</code> and the <code>trunk</code>. It writes these
changes into the file <code>diff.xml</code>.</p>
<pre>
&lt;tagdiff failonerror="true"
baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/"
destfile="diff.xml"
fromTag="BCEL_5_0"
/&gt;
</pre>
<p>Does the same, using <code>trunk</code> as <code>to*</code>
implicitly.</p>
<h4>Generate Report</h4>
<p>This antlib includes a basic XSLT stylesheet that you can use to
generate a HTML report based on the xml output. The following example
illustrates how to generate a HTML report from the XML report.</p>
<pre>
&lt;style in="diff.xml"
out="diff.html"
style="your-path-to/etc/diff.xsl"&gt;
&lt;param name="title" expression="Jakarta BCEL diff"/&gt;
&lt;param name="repo" expression="http://svn.apache.org/repos/asf/jakarta/bcel/trunk"/&gt;
&lt;/style&gt;
</pre>
<h4>(Shortened) Example Output</h4>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;tagdiff fromTag="BCEL_5_0" svnurl="http://svn.apache.org/repos/asf/jakarta/bcel/" &gt;
&lt;path&gt;
&lt;name&gt;&lt;![CDATA[default.properties]]&gt;&lt;/name&gt;
&lt;action&gt;added&lt;/action&gt;
&lt;/path&gt;
&lt;path&gt;
&lt;name&gt;&lt;![CDATA[xdocs/images/classloader.gif]]&gt;&lt;/name&gt;
&lt;action&gt;modified&lt;/action&gt;
&lt;/path&gt;
&lt;path&gt;
&lt;name&gt;&lt;![CDATA[README]]&gt;&lt;/name&gt;
&lt;action&gt;deleted&lt;/action&gt;
&lt;/path&gt;
&lt;/tagdiff&gt;
</pre>
</body>
</html>