[14982] | 1 | <html>
|
---|
| 2 |
|
---|
| 3 | <head>
|
---|
| 4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
| 5 | <title>ChangeLog Task</title>
|
---|
| 6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
| 7 | </head>
|
---|
| 8 |
|
---|
| 9 | <body>
|
---|
| 10 |
|
---|
| 11 | <h2><a name="changelog">CvsChangeLog</a></h2>
|
---|
| 12 | <h3>Description</h3>
|
---|
| 13 | <p>Generates an XML-formatted report file of the change logs recorded in a
|
---|
| 14 | <a href="http://www.cvshome.org/" target="_top">CVS</a> repository. </p>
|
---|
| 15 | <p><b>Important:</b> This task needs "cvs" on the path. If it isn't, you will get
|
---|
| 16 | an error (such as error 2 on windows). If <code><cvs></code> doesn't work, try to execute cvs.exe
|
---|
| 17 | from the command line in the target directory in which you are working.
|
---|
| 18 | <h3>Parameters</h3>
|
---|
| 19 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
| 20 | <tr>
|
---|
| 21 | <td valign="top"><b>Attribute</b></td>
|
---|
| 22 | <td valign="top"><b>Description</b></td>
|
---|
| 23 | <td align="center" valign="top"><b>Required</b></td>
|
---|
| 24 | </tr>
|
---|
| 25 | <tr>
|
---|
| 26 | <td colspan="3">Attributes from parent Cvs task which are meaningful here<br/>
|
---|
| 27 | Since ant 1.6.1</td>
|
---|
| 28 | </tr>
|
---|
| 29 | <tr>
|
---|
| 30 | <td valign="top">cvsRoot</td>
|
---|
| 31 | <td valign="top">the <code>CVSROOT</code> variable.</td>
|
---|
| 32 | <td align="center" valign="top">No</td>
|
---|
| 33 | </tr>
|
---|
| 34 | <tr>
|
---|
| 35 | <td valign="top">cvsRsh</td>
|
---|
| 36 | <td valign="top">the <code>CVS_RSH</code> variable.</td>
|
---|
| 37 | <td align="center" valign="top">No</td>
|
---|
| 38 | </tr>
|
---|
| 39 | <tr>
|
---|
| 40 | <td valign="top">package</td>
|
---|
| 41 | <td valign="top">the package/module to check out.</td>
|
---|
| 42 | <td align="center" valign="top">No</td>
|
---|
| 43 | </tr>
|
---|
| 44 | <tr>
|
---|
| 45 | <td valign="top">port</td>
|
---|
| 46 | <td valign="top">Port used by CVS to communicate with the server.</td>
|
---|
| 47 | <td align="center" valign="top">No, default port 2401.</td>
|
---|
| 48 | </tr>
|
---|
| 49 | <tr>
|
---|
| 50 | <td valign="top">passfile</td>
|
---|
| 51 | <td valign="top">Password file to read passwords from.</td>
|
---|
| 52 | <td align="center" valign="top">No, default file <code>~/.cvspass</code>.</td>
|
---|
| 53 | </tr>
|
---|
| 54 | <tr>
|
---|
| 55 | <td valign="top">failonerror</td>
|
---|
| 56 | <td valign="top">Stop the build process if the command exits with a
|
---|
| 57 | return code other than <code>0</code>. Defaults to false</td>
|
---|
| 58 | <td align="center" valign="top">No</td>
|
---|
| 59 | </tr>
|
---|
| 60 | <tr>
|
---|
| 61 | <td valign="top">tag</td>
|
---|
| 62 | <td valign="top">query the changelog for a specific branch.</td>
|
---|
| 63 | <td align="center" valign="top">No</td>
|
---|
| 64 | </tr>
|
---|
| 65 | <tr>
|
---|
| 66 | <td colspan="3">Specific attributes</td>
|
---|
| 67 | </tr>
|
---|
| 68 | <tr>
|
---|
| 69 | <td valign="top">dir</td>
|
---|
| 70 | <td valign="top">The directory from which to run the CVS <em>log</em>
|
---|
| 71 | command.</td>
|
---|
| 72 | <td align="center" valign="top">No; defaults to ${basedir}.</td>
|
---|
| 73 | </tr>
|
---|
| 74 | <tr>
|
---|
| 75 | <td valign="top">destfile</td>
|
---|
| 76 | <td valign="top">The file in which to write the change log report.</td>
|
---|
| 77 | <td align="center" valign="top">Yes</td>
|
---|
| 78 | </tr>
|
---|
| 79 | <tr>
|
---|
| 80 | <td valign="top">usersfile</td>
|
---|
| 81 | <td valign="top">Property file that contains name-value pairs mapping
|
---|
| 82 | user IDs and names that should be used in the report in place of
|
---|
| 83 | the user ID.</td>
|
---|
| 84 | <td align="center" valign="top">No</td>
|
---|
| 85 | </tr>
|
---|
| 86 | <tr>
|
---|
| 87 | <td valign="top">daysinpast</td>
|
---|
| 88 | <td valign="top">Sets the number of days into the past for which the
|
---|
| 89 | change log information should be retrieved.</td>
|
---|
| 90 | <td align="center" valign="top">No</td>
|
---|
| 91 | </tr>
|
---|
| 92 | <tr>
|
---|
| 93 | <td valign="top">start</td>
|
---|
| 94 | <td valign="top">The earliest date from which change logs are to be
|
---|
| 95 | included in the report.</td>
|
---|
| 96 | <td align="center" valign="top">No</td>
|
---|
| 97 | </tr>
|
---|
| 98 | <tr>
|
---|
| 99 | <td valign="top">end</td>
|
---|
| 100 | <td valign="top">The latest date to which change logs are to be
|
---|
| 101 | included in the report.</td>
|
---|
| 102 | <td align="center" valign="top">No</td>
|
---|
| 103 | </tr>
|
---|
| 104 | </table>
|
---|
| 105 |
|
---|
| 106 | <h3>Parameters specified as nested elements</h3>
|
---|
| 107 | <h4><a name="user">user</a></h4>
|
---|
| 108 | <p>The nested <code><user></code> element allows you to specify a
|
---|
| 109 | mapping between a user ID as it appears on the CVS server and a name to
|
---|
| 110 | include in the formatted report.
|
---|
| 111 | Anytime the specified user ID has made a change in the repository, the
|
---|
| 112 | <code><author></code> tag in the report file will include
|
---|
| 113 | the name specified in <code>displayname</code> rather than the user ID.
|
---|
| 114 | </p>
|
---|
| 115 |
|
---|
| 116 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
| 117 | <tr>
|
---|
| 118 | <td valign="top"><b>Attribute</b></td>
|
---|
| 119 | <td valign="top"><b>Description</b></td>
|
---|
| 120 | <td align="center" valign="top"><b>Required</b></td>
|
---|
| 121 | </tr>
|
---|
| 122 | <tr>
|
---|
| 123 | <td valign="top">displayname</td>
|
---|
| 124 | <td valign="top">The name to be used in the CVS change log report.</td>
|
---|
| 125 | <td valign="top" align="center">Yes</td>
|
---|
| 126 | </tr>
|
---|
| 127 | <tr>
|
---|
| 128 | <td valign="top">userid</td>
|
---|
| 129 | <td valign="top">The userid of the person as it exists on the CVS server.
|
---|
| 130 | </td>
|
---|
| 131 | <td valign="top" align="center">Yes</td>
|
---|
| 132 | </tr>
|
---|
| 133 | </table>
|
---|
| 134 |
|
---|
| 135 |
|
---|
| 136 | <h3>Examples</h3>
|
---|
| 137 | <pre> <cvschangelog dir="dve/network"
|
---|
| 138 | destfile="changelog.xml"
|
---|
| 139 | /></pre>
|
---|
| 140 |
|
---|
| 141 | <p>Generates a change log report for all the changes that have been made
|
---|
| 142 | under the <code>dve/network</code> directory.
|
---|
| 143 | It writes these changes into the file <code>changelog.xml</code>.</p>
|
---|
| 144 |
|
---|
| 145 | <pre> <cvschangelog dir="dve/network"
|
---|
| 146 | destfile="changelog.xml"
|
---|
| 147 | daysinpast="10"
|
---|
| 148 | /></pre>
|
---|
| 149 |
|
---|
| 150 | <p>Generates a change log report for any changes that were made
|
---|
| 151 | under the <code>dve/network</code> directory in the past 10 days.
|
---|
| 152 | It writes these changes into the file <code>changelog.xml</code>.</p>
|
---|
| 153 |
|
---|
| 154 | <pre> <cvschangelog dir="dve/network"
|
---|
| 155 | destfile="changelog.xml"
|
---|
| 156 | start="20 Feb 2002"
|
---|
| 157 | end="20 Mar 2002"
|
---|
| 158 | /></pre>
|
---|
| 159 |
|
---|
| 160 | <p>Generates a change log report for any changes that were made
|
---|
| 161 | between February 20, 2002 and March 20, 2002
|
---|
| 162 | under the <code>dve/network</code> directory.
|
---|
| 163 | It writes these changes into the file <code>changelog.xml</code>.</p>
|
---|
| 164 |
|
---|
| 165 | <pre> <cvschangelog dir="dve/network"
|
---|
| 166 | destfile="changelog.xml"
|
---|
| 167 | start="20 Feb 2002"
|
---|
| 168 | /></pre>
|
---|
| 169 |
|
---|
| 170 | <p>Generates a change log report for any changes that were made
|
---|
| 171 | after February 20, 2002 under the <code>dve/network</code> directory.
|
---|
| 172 | It writes these changes into the file <code>changelog.xml</code>.</p>
|
---|
| 173 |
|
---|
| 174 | <pre> <cvschangelog dir="dve/network"
|
---|
| 175 | destfile="changelog.xml">
|
---|
| 176 | <user displayname="Peter Donald" userid="donaldp"/>
|
---|
| 177 | </cvschangelog></pre>
|
---|
| 178 |
|
---|
| 179 | <p>Generates a change log report for all the changes that were made
|
---|
| 180 | under the <code>dve/network</code> directory, substituting the name
|
---|
| 181 | "Peter Donald" in the <code><author></code> tags
|
---|
| 182 | anytime it encounters a change made by the user ID "donaldp".
|
---|
| 183 | It writes these changes into the file <code>changelog.xml</code>.</p>
|
---|
| 184 |
|
---|
| 185 | <p>Generates a change log report on the <code>ANT_16_BRANCH</code>.</p>
|
---|
| 186 | <pre>
|
---|
| 187 | <cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass"
|
---|
| 188 | destfile="changelogant.xml" tag="ANT_16_BRANCH"/>
|
---|
| 189 | </pre>
|
---|
| 190 | <h4>Generate Report</h4>
|
---|
| 191 | <p>Ant includes a basic XSLT stylesheet that you can use to generate
|
---|
| 192 | a HTML report based on the xml output. The following example illustrates
|
---|
| 193 | how to generate a HTML report from the XML report.</p>
|
---|
| 194 |
|
---|
| 195 | <pre>
|
---|
| 196 | <style in="changelog.xml"
|
---|
| 197 | out="changelog.html"
|
---|
| 198 | style="${ant.home}/etc/changelog.xsl">
|
---|
| 199 | <param name="title" expression="Ant ChangeLog"/>
|
---|
| 200 | <param name="module" expression="ant"/>
|
---|
| 201 | <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
|
---|
| 202 | </style>
|
---|
| 203 | </pre>
|
---|
| 204 |
|
---|
| 205 | <h4>Sample Output</h4>
|
---|
| 206 | <pre>
|
---|
| 207 | <changelog>
|
---|
| 208 | <entry>
|
---|
| 209 | <date>2002-03-06</date>
|
---|
| 210 | <time>12:00</time>
|
---|
| 211 | <author>Peter Donald</author>
|
---|
| 212 | <file>
|
---|
| 213 | <name>org/apache/myrmidon/build/AntlibDescriptorTask.java</name>
|
---|
| 214 | <revision>1.3</revision>
|
---|
| 215 | <prevrevision>1.2</prevrevision>
|
---|
| 216 | </file>
|
---|
| 217 | <msg><![CDATA[Use URLs directly rather than go via a File.
|
---|
| 218 |
|
---|
| 219 | This allows templates to be stored inside jar]]></msg>
|
---|
| 220 | </entry>
|
---|
| 221 | </changelog>
|
---|
| 222 | </pre>
|
---|
| 223 |
|
---|
| 224 | <hr><p align="center">Copyright © 2002-2004 The Apache Software Foundation. All rights
|
---|
| 225 | Reserved.</p>
|
---|
| 226 |
|
---|
| 227 | </body>
|
---|
| 228 | </html>
|
---|
| 229 |
|
---|