| <html> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <title>ChangeLog Task</title> |
| <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css"> |
| </head> |
| |
| <body> |
| |
| <h2><a name="changelog">CvsChangeLog</a></h2> |
| <h3>Description</h3> |
| <p>Generates an XML-formatted report file of the change logs recorded in a |
| <a href="http://www.cvshome.org/" target="_top">CVS</a> repository. </p> |
| <p><b>Important:</b> 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. |
| <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 colspan="3">Attributes from parent Cvs task which are meaningful here<br/> |
| Since ant 1.6.1</td> |
| </tr> |
| <tr> |
| <td valign="top">cvsRoot</td> |
| <td valign="top">the <code>CVSROOT</code> variable.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">cvsRsh</td> |
| <td valign="top">the <code>CVS_RSH</code> variable.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">package</td> |
| <td valign="top">the package/module to check out.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">port</td> |
| <td valign="top">Port used by CVS to communicate with the server.</td> |
| <td align="center" valign="top">No, default port 2401.</td> |
| </tr> |
| <tr> |
| <td valign="top">passfile</td> |
| <td valign="top">Password file to read passwords from.</td> |
| <td align="center" valign="top">No, default file ~/.cvspass.</td> |
| </tr> |
| <tr> |
| <td valign="top">failonerror</td> |
| <td valign="top">Stop the build process if the command exits with a |
| return code other than <code>0</code>. Defaults to false</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">tag</td> |
| <td valign="top">query the changelog for a specific branch.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td colspan="3">Specific attributes</td> |
| </tr> |
| <tr> |
| <td valign="top">dir</td> |
| <td valign="top">The directory from which to run the CVS <em>log</em> |
| command.</td> |
| <td align="center" valign="top">No; defaults to ${basedir}.</td> |
| </tr> |
| <tr> |
| <td valign="top">destfile</td> |
| <td valign="top">The file in which to write the change log report.</td> |
| <td align="center" valign="top">Yes</td> |
| </tr> |
| <tr> |
| <td valign="top">usersfile</td> |
| <td valign="top">Property file that contains name-value pairs mapping |
| user IDs and names that should be used in the report in place of |
| the user ID.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">daysinpast</td> |
| <td valign="top">Sets the number of days into the past for which the |
| change log information should be retrieved.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">start</td> |
| <td valign="top">The earliest date from which change logs are to be |
| included in the report.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| <tr> |
| <td valign="top">end</td> |
| <td valign="top">The latest date to which change logs are to be |
| included in the report.</td> |
| <td align="center" valign="top">No</td> |
| </tr> |
| </table> |
| |
| <h3>Parameters specified as nested elements</h3> |
| <h4><a name="user">user</a></h4> |
| <p>The nested <code><user></code> element allows you to specify a |
| mapping between a user ID as it appears on the CVS server and a name to |
| include in the formatted report. |
| Anytime the specified user ID has made a change in the repository, the |
| <code><author></code> tag in the report file will include |
| the name specified in <code>displayname</code> rather than the user ID. |
| </p> |
| |
| <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">displayname</td> |
| <td valign="top">The name to be used in the CVS change log report.</td> |
| <td valign="top" align="center">Yes</td> |
| </tr> |
| <tr> |
| <td valign="top">userid</td> |
| <td valign="top">The userid of the person as it exists on the CVS server. |
| </td> |
| <td valign="top" align="center">Yes</td> |
| </tr> |
| </table> |
| |
| |
| <h3>Examples</h3> |
| <pre> <cvschangelog dir="dve/network" |
| destfile="changelog.xml" |
| /></pre> |
| |
| <p>Generates a change log report for all the changes that have been made |
| under the <code>dve/network</code> directory. |
| It writes these changes into the file <code>changelog.xml</code>.</p> |
| |
| <pre> <cvschangelog dir="dve/network" |
| destfile="changelog.xml" |
| daysinpast="10" |
| /></pre> |
| |
| <p>Generates a change log report for any changes that were made |
| under the <code>dve/network</code> directory in the past 10 days. |
| It writes these changes into the file <code>changelog.xml</code>.</p> |
| |
| <pre> <cvschangelog dir="dve/network" |
| destfile="changelog.xml" |
| start="20 Feb 2002" |
| end="20 Mar 2002" |
| /></pre> |
| |
| <p>Generates a change log report for any changes that were made |
| between February 20, 2002 and March 20, 2002 |
| under the <code>dve/network</code> directory. |
| It writes these changes into the file <code>changelog.xml</code>.</p> |
| |
| <pre> <cvschangelog dir="dve/network" |
| destfile="changelog.xml" |
| start="20 Feb 2002" |
| /></pre> |
| |
| <p>Generates a change log report for any changes that were made |
| after February 20, 2002 under the <code>dve/network</code> directory. |
| It writes these changes into the file <code>changelog.xml</code>.</p> |
| |
| <pre> <cvschangelog dir="dve/network" |
| destfile="changelog.xml"> |
| <user displayname="Peter Donald" userid="donaldp"/> |
| </cvschangelog></pre> |
| |
| <p>Generates a change log report for all the changes that were made |
| under the <code>dve/network</code> directory, substituting the name |
| "Peter Donald" in the <code><author></code> tags |
| anytime it encounters a change made by the user ID "donaldp". |
| It writes these changes into the file <code>changelog.xml</code>.</p> |
| |
| <p>Generates a change log report on the <code>ANT_16_BRANCH</code>.</p> |
| <pre> |
| <cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass" |
| destfile="changelogant.xml" tag="ANT_16_BRANCH" /> |
| </pre> |
| <h4>Generate Report</h4> |
| <p>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.</p> |
| |
| <pre> |
| <style in="changelog.xml" |
| out="changelog.html" |
| style="${ant.home}/etc/changelog.xsl"> |
| <param name="title" expression="Ant ChangeLog"/> |
| <param name="module" expression="ant"/> |
| <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/> |
| </style> |
| </pre> |
| |
| <h4>Sample Output</h4> |
| <pre> |
| <changelog> |
| <entry> |
| <date>2002-03-06</date> |
| <time>12:00</time> |
| <author>Peter Donald</author> |
| <file> |
| <name>org/apache/myrmidon/build/AntlibDescriptorTask.java</name> |
| <revision>1.3</revision> |
| <prevrevision>1.2</prevrevision> |
| </file> |
| <msg><![CDATA[Use URLs directly rather than go via a FIle. |
| |
| This allows temp[lates to be stored inside jar]]></msg> |
| </entry> |
| </changelog> |
| </pre> |
| |
| <hr><p align="center">Copyright © 2002-2004 Apache Software Foundation. All rights |
| Reserved.</p> |
| |
| </body> |
| </html> |
| |