| 1 |
<!DOCTYPE html> |
| 2 |
<!-- |
| 3 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 |
contributor license agreements. See the NOTICE file distributed with |
| 5 |
this work for additional information regarding copyright ownership. |
| 6 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 |
(the "License"); you may not use this file except in compliance with |
| 8 |
the License. You may obtain a copy of the License at |
| 9 |
|
| 10 |
https://www.apache.org/licenses/LICENSE-2.0 |
| 11 |
|
| 12 |
Unless required by applicable law or agreed to in writing, software |
| 13 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 14 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 |
See the License for the specific language governing permissions and |
| 16 |
limitations under the License. |
| 17 |
--> |
| 18 |
<html lang="en"> |
| 19 |
|
| 20 |
<head> |
| 21 |
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> |
| 22 |
<title>ChangeLog Task</title> |
| 23 |
</head> |
| 24 |
|
| 25 |
<body> |
| 26 |
|
| 27 |
<h2 id="changelog">CvsChangeLog</h2> |
| 28 |
<h3>Description</h3> |
| 29 |
<p>Generates an XML-formatted report file of the change logs recorded in |
| 30 |
a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p> |
| 31 |
<p><strong>Important</strong>: This task needs <kbd>cvs</kbd> on the path. If it isn't, you will get |
| 32 |
an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, try to |
| 33 |
execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you are working. |
| 34 |
Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with the Unix |
| 35 |
version, this is not completely true for certain other CVS clients—like CVSNT for |
| 36 |
example—and some operation may fail when using such an incompatible client.</p> |
| 37 |
<h3>Parameters</h3> |
| 38 |
<table class="attr"> |
| 39 |
<tr> |
| 40 |
<th scope="col">Attribute</th> |
| 41 |
<th scope="col">Description</th> |
| 42 |
<th scope="col">Required</th> |
| 43 |
</tr> |
| 44 |
<tr> |
| 45 |
<td colspan="3" class="left">Attributes from parent <code><cvs></code> task which are |
| 46 |
meaningful here<br/><em>Since Apache Ant 1.6.1</em></td> |
| 47 |
</tr> |
| 48 |
<tr> |
| 49 |
<td>cvsRoot</td> |
| 50 |
<td>the <code>CVSROOT</code> variable.</td> |
| 51 |
<td>No</td> |
| 52 |
</tr> |
| 53 |
<tr> |
| 54 |
<td>cvsRsh</td> |
| 55 |
<td>the <code>CVS_RSH</code> variable.</td> |
| 56 |
<td>No</td> |
| 57 |
</tr> |
| 58 |
<tr> |
| 59 |
<td>package</td> |
| 60 |
<td>the package/module to check out. <strong>Note</strong>: multiple attributes can be split |
| 61 |
using spaces. Use a nested <code><module></code> element if you want to specify a |
| 62 |
module with spaces in its name.</td> |
| 63 |
<td>No</td> |
| 64 |
</tr> |
| 65 |
<tr> |
| 66 |
<td>port</td> |
| 67 |
<td>Port used by CVS to communicate with the server.</td> |
| 68 |
<td>No; defaults to <q>2401</q></td> |
| 69 |
</tr> |
| 70 |
<tr> |
| 71 |
<td>passfile</td> |
| 72 |
<td>Password file to read passwords from.</td> |
| 73 |
<td>No; defaults to <q>~/.cvspass</q></td> |
| 74 |
</tr> |
| 75 |
<tr> |
| 76 |
<td>failonerror</td> |
| 77 |
<td>Stop the build process if the command exits with a return code other than <q>0</q></td> |
| 78 |
<td>No; defaults to <q>false</q></td> |
| 79 |
</tr> |
| 80 |
<tr> |
| 81 |
<td>tag</td> |
| 82 |
<td>query the changelog for a specific branch.</td> |
| 83 |
<td>No</td> |
| 84 |
</tr> |
| 85 |
<tr> |
| 86 |
<td colspan="3" class="left">Specific attributes</td> |
| 87 |
</tr> |
| 88 |
<tr> |
| 89 |
<td>dir</td> |
| 90 |
<td>The directory from which to run the <kbd>cvs log</kbd> command.</td> |
| 91 |
<td>No; defaults to <q>${basedir}</q></td> |
| 92 |
</tr> |
| 93 |
<tr> |
| 94 |
<td>destfile</td> |
| 95 |
<td>The file in which to write the change log report.</td> |
| 96 |
<td>Yes</td> |
| 97 |
</tr> |
| 98 |
<tr> |
| 99 |
<td>usersfile</td> |
| 100 |
<td>Property file that contains name-value pairs mapping user IDs and names that should be used |
| 101 |
in the report in place of the user ID.</td> |
| 102 |
<td>No</td> |
| 103 |
</tr> |
| 104 |
<tr> |
| 105 |
<td>daysinpast</td> |
| 106 |
<td>Sets the number of days into the past for which the change log information should be |
| 107 |
retrieved.</td> |
| 108 |
<td>No</td> |
| 109 |
</tr> |
| 110 |
<tr> |
| 111 |
<td>start</td> |
| 112 |
<td>The earliest date from which change logs are to be included in the report.</td> |
| 113 |
<td>No</td> |
| 114 |
</tr> |
| 115 |
<tr> |
| 116 |
<td>end</td> |
| 117 |
<td>The latest date to which change logs are to be included in the report.</td> |
| 118 |
<td>No</td> |
| 119 |
</tr> |
| 120 |
<tr> |
| 121 |
<td>remote</td> |
| 122 |
<td>If set to true, works against the repository (using <kbd>cvs rlog</kbd>) without a working |
| 123 |
copy. <em>Since Ant 1.8.0</em></td> |
| 124 |
<td>No; default is <q>false</q></td> |
| 125 |
</tr> |
| 126 |
<tr> |
| 127 |
<td>startTag</td> |
| 128 |
<td>The start of a tag range. If <var>endTag</var> is also specified, they must both be on the |
| 129 |
same branch. If <var>endTag</var> is not specified, the end of the range will be the latest on |
| 130 |
the same branch on which <var>startTag</var> lives. <em>Since Ant 1.8.0</em></td> |
| 131 |
<td>No</td> |
| 132 |
</tr> |
| 133 |
<tr> |
| 134 |
<td>endTag</td> |
| 135 |
<td>The end of a tag range. If <var>startTag</var> is also specified, they must both be on the |
| 136 |
same branch. If <var>startTag</var> is not specified, the start of the range will be the top |
| 137 |
of the branch on which <var>endTag</var> lives. <em>Since Ant 1.8.0</em></td> |
| 138 |
<td>No</td> |
| 139 |
</tr> |
| 140 |
</table> |
| 141 |
|
| 142 |
<h3>Parameters specified as nested elements</h3> |
| 143 |
<h4 id="user">user</h4> |
| 144 |
<p>The nested <code><user></code> element allows you to specify a mapping between a user ID as |
| 145 |
it appears on the CVS server and a name to include in the formatted report. Anytime the specified |
| 146 |
user ID has made a change in the repository, the <code><author></code> tag in the report file |
| 147 |
will include the name specified in <var>displayname</var> rather than the user ID.</p> |
| 148 |
|
| 149 |
<table class="attr"> |
| 150 |
<tr> |
| 151 |
<th scope="col">Attribute</th> |
| 152 |
<th scope="col">Description</th> |
| 153 |
<th scope="col">Required</th> |
| 154 |
</tr> |
| 155 |
<tr> |
| 156 |
<td>displayname</td> |
| 157 |
<td>The name to be used in the CVS change log report.</td> |
| 158 |
<td>Yes</td> |
| 159 |
</tr> |
| 160 |
<tr> |
| 161 |
<td>userid</td> |
| 162 |
<td>The user ID of the person as it exists on the CVS server. |
| 163 |
</td> |
| 164 |
<td>Yes</td> |
| 165 |
</tr> |
| 166 |
</table> |
| 167 |
|
| 168 |
<h4>module</h4> |
| 169 |
|
| 170 |
<p>Specifies a package/module to work on, unlike the package attribute modules specified using this |
| 171 |
attribute can contain spaces in their name.</p> |
| 172 |
|
| 173 |
<table class="attr"> |
| 174 |
<tr> |
| 175 |
<th scope="col">Attribute</th> |
| 176 |
<th scope="col">Description</th> |
| 177 |
<th scope="col">Required</th> |
| 178 |
</tr> |
| 179 |
<tr> |
| 180 |
<td>name</td> |
| 181 |
<td>The module's/package's name.</td> |
| 182 |
<td>Yes</td> |
| 183 |
</tr> |
| 184 |
</table> |
| 185 |
|
| 186 |
<h3>Examples</h3> |
| 187 |
<p>Generate a change log report for all the changes that have been made under |
| 188 |
the <samp>dve/network</samp> directory. Write these changes into the |
| 189 |
file <samp>changelog.xml</samp>.</p> |
| 190 |
<pre> |
| 191 |
<cvschangelog dir="dve/network" |
| 192 |
destfile="changelog.xml"/></pre> |
| 193 |
|
| 194 |
<p>Generate a change log report for any changes that were made under the <samp>dve/network</samp> |
| 195 |
directory in the past 10 days. Write these changes into the file <samp>changelog.xml</samp>.</p> |
| 196 |
<pre> |
| 197 |
<cvschangelog dir="dve/network" |
| 198 |
destfile="changelog.xml" |
| 199 |
daysinpast="10"/></pre> |
| 200 |
|
| 201 |
<p>Generate a change log report for any changes that were made between February 20, 2002 and March |
| 202 |
20, 2002 under the <samp>dve/network</samp> directory. Write these changes into the |
| 203 |
file <samp>changelog.xml</samp>.</p> |
| 204 |
<pre> |
| 205 |
<cvschangelog dir="dve/network" |
| 206 |
destfile="changelog.xml" |
| 207 |
start="20 Feb 2002" |
| 208 |
end="20 Mar 2002"/></pre> |
| 209 |
|
| 210 |
<p>Generate a change log report for any changes that were made after February 20, 2002 under |
| 211 |
the <samp>dve/network</samp> directory. Write these changes into the |
| 212 |
file <samp>changelog.xml</samp>.</p> |
| 213 |
<pre> |
| 214 |
<cvschangelog dir="dve/network" |
| 215 |
destfile="changelog.xml" |
| 216 |
start="20 Feb 2002"/></pre> |
| 217 |
|
| 218 |
<p>Generate a change log report for all the changes that were made under |
| 219 |
the <code>dve/network</code> directory, substituting the name <samp>Peter Donald</samp> in |
| 220 |
the <code><author></code> tags anytime a change made by the user ID <samp>donaldp</samp> is |
| 221 |
encountered. Write these changes into the file <samp>changelog.xml</samp>.</p> |
| 222 |
<pre> |
| 223 |
<cvschangelog dir="dve/network" |
| 224 |
destfile="changelog.xml"> |
| 225 |
<user displayname="Peter Donald" userid="donaldp"/> |
| 226 |
</cvschangelog></pre> |
| 227 |
|
| 228 |
<p>Generate a change log report on the <code>ANT_16_BRANCH</code>.</p> |
| 229 |
<pre> |
| 230 |
<cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass" |
| 231 |
destfile="changelogant.xml" tag="ANT_16_BRANCH"/></pre> |
| 232 |
<h4>Generate Report</h4> |
| 233 |
<p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the XML |
| 234 |
output. The following example illustrates how to generate a HTML report from the XML report.</p> |
| 235 |
|
| 236 |
<pre> |
| 237 |
<style in="changelog.xml" |
| 238 |
out="changelog.html" |
| 239 |
style="${ant.home}/etc/changelog.xsl"> |
| 240 |
<param name="title" expression="Ant ChangeLog"/> |
| 241 |
<param name="module" expression="ant"/> |
| 242 |
<param name="cvsweb" expression="https://cvs.apache.org/viewcvs/"/> |
| 243 |
</style></pre> |
| 244 |
|
| 245 |
<h4>Sample Output</h4> |
| 246 |
<pre> |
| 247 |
<changelog> |
| 248 |
<entry> |
| 249 |
<date>2002-03-06</date> |
| 250 |
<time>12:00</time> |
| 251 |
<author>Peter Donald</author> |
| 252 |
<file> |
| 253 |
<name>org/apache/myrmidon/build/AntlibDescriptorTask.java</name> |
| 254 |
<revision>1.3</revision> |
| 255 |
<prevrevision>1.2</prevrevision> |
| 256 |
</file> |
| 257 |
<msg><![CDATA[Use URLs directly rather than go via a File. |
| 258 |
|
| 259 |
This allows templates to be stored inside jar]]></msg> |
| 260 |
</entry> |
| 261 |
</changelog></pre> |
| 262 |
|
| 263 |
</body> |
| 264 |
</html> |