<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>RevisionDiff Task</title>
</head>
<body>
<h2><a name="revisiondiff">RevisionDiff</a></h2>
<h3>Description</h3>

<p>Generates an XML-formatted report file of the changes between two
revisions 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>

<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">start</td>
    <td valign="top">The earliest revision from which diffs are to be
     included in the report.</td>
    <td align="center" valign="top">Yes.</td>
  </tr>
  <tr>
    <td valign="top">end</td>
    <td valign="top">The latest revision from which diffs are to be
     included in the report.</td>
    <td align="center" valign="top">Yes.</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>
</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">svnURL</td>
    <td valign="top">the svn URL to diff.</td>
    <td align="center" valign="top">No</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;revisiondiff
                svnURL=&quot;http://svn.apache.org/repos/asf/jakarta/bcel/trunk&quot;
                destfile=&quot;diff.xml&quot;
                start=&quot;152904&quot;
                end=&quot;153682&quot;
  /&gt;</pre>

<p>Generates a revisiondiff report for all the changes that have been
made in the <code>Apache BCEL</code> module between the revisions
<code>152904</code> and <code>153682</code>.  It writes these changes
into the file <code>diff.xml</code>.</p>

<pre>  &lt;revisiondiff
                destfile=&quot;diff.xml&quot;
                package=&quot;ant&quot;
                start=&quot;{2002-01-01}&quot;
                end=&quot;{2002-02-01}&quot;
                dest=&quot;my-working-copy-of-BCEL&quot;
  /&gt;</pre>

<p>Generates a diff report for all the changes that have been made in
the <code>Apache BCEL</code> module in january 2002. In this example
<code>svnURL</code> has not been set, it is assumed that
<code>my-working-copy-of-BCEL</code> contains a checked out copy of
the BCEL module.  It writes these changes into the file
<code>diff.xml</code>.</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;revisiondiff start="153872" end="152873" svnurl="http://svn.apache.org/repos/asf/jakarta/bcel/trunk" &gt;
  &lt;path&gt;
    &lt;name&gt;&lt;![CDATA[LICENSE.txt]]&gt;&lt;/name&gt;
    &lt;action&gt;modified&lt;/action&gt;
  &lt;/path&gt;
  &lt;path&gt;
    &lt;name&gt;&lt;![CDATA[NOTICE.txt]]&gt;&lt;/name&gt;
    &lt;action&gt;deleted&lt;/action&gt;
  &lt;/path&gt;
&lt;/revisiondiff&gt;
</pre>

<hr><p align="center">Copyright &copy; 2005 The Apache Software Foundation. All rights
Reserved.</p>

</body>
</html>