Generates an XML-formatted report file of the changes between two tags recorded in a Subversion repository.
Important: This task needs "svn" on the path. If it isn't,
you will get an error (such as error 2 on windows). If
<svn>
doesn't work, try to execute
svn.exe
from the command line in the target directory in
which you are working.
This task assumes that your repository follows the best-practice layout of
BASEURL | | -----> trunk -----> tags | | ----------> fromTag ----------> toTag -----> branches | | ----------> fromBranch ----------> toBranch
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.
Attribute | Description | Required |
fromTag | The first tag. | One of the three. |
fromBranch | The first branch. | |
tag1 | Deprecated. Equivalent to fromTag. | |
toTag | The second tag. | No, default is "trunk/" |
toBranch | The second branch. | |
tag2 | Deprecated. Equivalent to toTag. | |
destfile | The file in which to write the diff report. | Yes |
baseURL | The baseURL of the repository, used to calculate the two URLs to compare. | Yes |
svn
taskAttribute | Description | Required |
failonerror | Stop the buildprocess if the command exits with a returncode other than 0. Defaults to false | No |
<tagdiff failonerror="true" baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/" destfile="diff.xml" fromTag="initial" toTag="BCEL_5_0" />
Generates a tagdiff report for all the changes that have been
made in the Apache BCEL
module between the tags
initial
and BCEL_5_0
. It writes these changes
into the file diff.xml
.
<tagdiff failonerror="true" baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/" destfile="diff.xml" fromTag="BCEL_5_0" toBranch="trunk" />
Generates a tagdiff report for all the changes that have been made
in the Apache BCEL
module between the tag
BCEL_5_0
and the trunk
. It writes these
changes into the file diff.xml
.
<tagdiff failonerror="true" baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/" destfile="diff.xml" fromTag="BCEL_5_0" />
Does the same, using trunk
as to*
implicitly.
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.
<style in="diff.xml" out="diff.html" style="your-path-to/etc/diff.xsl"> <param name="title" expression="Jakarta BCEL diff"/> <param name="repo" expression="http://svn.apache.org/repos/asf/jakarta/bcel/trunk"/> </style>
<?xml version="1.0" encoding="UTF-8"?> <tagdiff fromTag="BCEL_5_0" svnurl="http://svn.apache.org/repos/asf/jakarta/bcel/" > <path> <name><![CDATA[default.properties]]></name> <action>added</action> </path> <path> <name><![CDATA[xdocs/images/classloader.gif]]></name> <action>modified</action> </path> <path> <name><![CDATA[README]]></name> <action>deleted</action> </path> </tagdiff>