Section 6.6. Finding Changes Between Versions


6.6. Finding Changes Between Versions

The cvstagdiff task generates an XML-formatted report file of the changes between two tags or dates recorded in a CVS repository. Here's an example that creates a report, datediff.xml, for all the changes that have been made in the GreetingApp module in January 2005:

<cvstagdiff     destfile="datediff.xml"     package="GreetingApp"     startDate="2005-01-01"     endDate="2005-31-01" />

You can see the attributes of this task in Table 6-8.

Table 6-8. The cvstagdiff task's attributes

Attribute

Description

Required

Default

compression

Specifies the compression you want to use. Set to true, false, or a number (1-9) for compression level.

No

No compression

cvsroot

Specifies the

CVSROOT

variable you want to use.

No

 

cvsrsh

Specifies the

CVS_RSH

variable you want to use.

No

 

destfile

Specifies the file where the report should be stored.

Yes

 

enddate

Sets the latest date for differences to still be included in the report.

One of the endtag or enddate

 

endtag

Sets the latest tag for differences to still be included in the report.

One of the endtag or enddate

 

failonerror

Makes the build fail if this task encounters an error.

No

false

package

Specifies the module you want to analyze. Since Ant 1.6, multiple modules can be separated by spaces.

Yes

 

passfile

Specifies the password file you want the task to read passwords from.

No

~/.cvspass

port

Specifies the port used to communicate with the CVS server.

No

port 2401

quiet

Specifies that you want to suppress displayed messages.

No

false

startdate

Sets the earliest date for differences to still be included in the report.

One of starttag or startdate

 

starttag

Sets the earliest tag for differences to still be included in the report.

One of starttag or startdate

 


Here's something useful to know: Ant comes with an XSLT stylesheet, ${ant.home}/etc/tagdiff.xsl, that you can use to generate a HTML report based on this task's XML output. Here's an example:

<style in="datediff.xml"      out="datediff.html"      style="${ant.home}/etc/tagdiff.xsl">   <param name="title" expression="Date Differences"/>   <param name="module" expression="GreetingApp"/> </style>




    Ant. The Definitive Guide
    Ant: The Definitive Guide, 2nd Edition
    ISBN: 0596006098
    EAN: 2147483647
    Year: 2003
    Pages: 115
    Authors: Steve Holzner

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net