## 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. Also note that this task assumes that the cvs exceutable is compatible with the Unix version from cvshome.org, this is not completely true for certain other cvs clients - like CVSNT for example - and some operation may fail when using such an incompatible client.

### 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. accepts all formats accepted by the cvs command for -D date_spec arguments
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. accepts all formats accepted by the cvs command for -D date_spec arguments
destfile | The file in which to write the diff report. | Yes
ignoreRemoved | When set to true, the report will not include any removed files. Since Apache Ant 1.8.0 | No, defaults to false.

### 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. Since Ant 1.6 multiple packages separated by spaces are possible. aliases corresponding to different modules are also possible Use a nested <module> element if you want to specify a module with spaces in its name. | No
| 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

### Parameters specified as nested elements

#### module

Specifies a package/module to work on, unlike the package attribute modules specified using this attribute can contain spaces in their name.

Attribute | Description | Required
name | The module's/package's name. | Yes.

### 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 jakarta-gump"
                    startDate="2003-01-01"
                    endDate="2003-31-01"
      />

Generates a tagdiff report for all the changes that have been made in the `ant` and `jakarta-gump` modules in january 2003. 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>

#### Output

The cvsroot and package attributes of the tagdiff element are new in ant 1.6.
Notes on entry attributes :

Attribute | Comment
--- | ---
name | when reporting on one package, the package name is removed from the output
revision | supplied for files which exist at the end of the reporting period
prevrevision | supplied for files which exist at the beginning of the reporting period. Old CVS servers do not supply it for deleted files. CVS 1.12.2 supplies it.

    <?xml version="1.0" encoding="UTF-8"?>
    <tagdiff startTag="ANT_14" endTag="ANT_141"
    cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" package="ant">
      <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>