## CvsTagDiff

### Description

Generates an XML-formatted report file of the changes between two tags or dates recorded in a CVS repository.

Important: This task needs "cvs" on the path. If it isn't, you will get an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working.

### Parameters

Attribute | Description | Required
startTag | The earliest tag from which diffs are to be included in the report. | exactly one of the two.
startDate | The earliest date from which diffs are to be included in the report.
endTag | The latest tag from which diffs are to be included in the report. | exactly one of the two.
endDate | The latest date from which diffs are to be included in the report.
destfile | The file in which to write the diff report. | Yes
rootdir | Root directory for the package, if different from the package name. | No

### Parameters inherited from the `cvs` task

Attribute | Description | Required
compression | `true`, `false`, or the number 1-9 (corresponding to possible values for CVS `-z#` argument). Any other value is treated as false | No. Defaults to no compression. if passed `true`, level 3 compression is assumed.
cvsRoot | the CVSROOT variable. | No
cvsRsh | the CVS_RSH variable. | No
package | the package/module to analyze. | Yes
quiet | suppress informational messages. | No, default "false"
port | Port used by CVS to communicate with the server. | No, default port 2401.
passfile | Password file to read passwords from. | No, default file ~/.cvspass.
failonerror | Stop the buildprocess if the command exits with a returncode other than 0. Defaults to false | No

### Examples

      <cvstagdiff cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
                    destfile="tagdiff.xml"
                    package="ant"
                    startTag="ANT_14"
                    endTag="ANT_141"
      />

Generates a tagdiff report for all the changes that have been made in the `ant` module between the tags `ANT_14` and `ANT_141`. It writes these changes into the file `tagdiff.xml`.

      <cvstagdiff
                    destfile="tagdiff.xml"
                    package="ant"
                    startDate="2002-01-01"
                    endDate="2002-31-01"
      />

Generates a tagdiff report for all the changes that have been made in the `ant` module in january 2002. In this example `cvsRoot` has not been set. The current `cvsRoot` will be used (assuming the build is started from a folder stored in `cvs`. It writes these changes into the file `tagdiff.xml`.

      <cvstagdiff
                    destfile="tagdiff.xml"
                    package="ant"
                    rootdir="apache/ant"
                    startDate="2002-01-01"
                    endDate="2002-31-01"
      />

Generates a tagdiff report for all the changes that have been made in the `ant` module in january 2002, with `rootdir` indicating that the actual location of the `ant` module in cvs is `apache/ant` rather than `ant`. In this example `cvsRoot` has not been set. The current `cvsRoot` will be used (assuming the build is started from a folder stored in `cvs`. It writes these changes into the file `tagdiff.xml`.

#### Generate Report

Ant 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="tagdiff.xml"
                   out="tagdiff.html"
                   style="${ant.home}/etc/tagdiff.xsl">
              <param name="title" expression="Ant Diff"/>
              <param name="module" expression="ant"/>
              <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
            </style>

#### Sample Output

    <?xml version="1.0" encoding="UTF-8"?>
    <tagdiff startTag="ANT_14" endTag="ANT_141">
      <entry>
        <file>
          <name>src/main/org/apache/tools/ant/DirectoryScanner.java</name>
          <revision>1.15.2.1</revision>
          <prevrevision>1.15</prevrevision>
        </file>
      </entry>
    </tagdiff>

Copyright © 2002-2003 Apache Software Foundation. All rights Reserved.