source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/changelog.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 8.1 KB
Line 
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
16an error (such as error 2 on windows). If <code>&lt;cvs&gt;</code> doesn't work, try to execute cvs.exe
17from 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>&lt;user&gt;</code> element allows you to specify a
109mapping between a user ID as it appears on the CVS server and a name to
110include in the formatted report.
111Anytime the specified user ID has made a change in the repository, the
112<code>&lt;author&gt;</code> tag in the report file will include
113the 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> &lt;cvschangelog dir=&quot;dve/network&quot;
138 destfile=&quot;changelog.xml&quot;
139 /&gt;</pre>
140
141<p>Generates a change log report for all the changes that have been made
142under the <code>dve/network</code> directory.
143It writes these changes into the file <code>changelog.xml</code>.</p>
144
145<pre> &lt;cvschangelog dir=&quot;dve/network&quot;
146 destfile=&quot;changelog.xml&quot;
147 daysinpast=&quot;10&quot;
148 /&gt;</pre>
149
150<p>Generates a change log report for any changes that were made
151under the <code>dve/network</code> directory in the past 10 days.
152It writes these changes into the file <code>changelog.xml</code>.</p>
153
154<pre> &lt;cvschangelog dir=&quot;dve/network&quot;
155 destfile=&quot;changelog.xml&quot;
156 start=&quot;20 Feb 2002&quot;
157 end=&quot;20 Mar 2002&quot;
158 /&gt;</pre>
159
160<p>Generates a change log report for any changes that were made
161between February 20, 2002 and March 20, 2002
162under the <code>dve/network</code> directory.
163It writes these changes into the file <code>changelog.xml</code>.</p>
164
165<pre> &lt;cvschangelog dir=&quot;dve/network&quot;
166 destfile=&quot;changelog.xml&quot;
167 start=&quot;20 Feb 2002&quot;
168 /&gt;</pre>
169
170<p>Generates a change log report for any changes that were made
171after February 20, 2002 under the <code>dve/network</code> directory.
172It writes these changes into the file <code>changelog.xml</code>.</p>
173
174<pre> &lt;cvschangelog dir=&quot;dve/network&quot;
175 destfile=&quot;changelog.xml&quot;&gt;
176 &lt;user displayname=&quot;Peter Donald&quot; userid=&quot;donaldp&quot;/&gt;
177 &lt;/cvschangelog&gt;</pre>
178
179<p>Generates a change log report for all the changes that were made
180under the <code>dve/network</code> directory, substituting the name
181&quot;Peter Donald&quot; in the <code>&lt;author&gt;</code> tags
182anytime it encounters a change made by the user ID &quot;donaldp&quot;.
183It 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 &lt;cvschangelog dir=&quot;c:/dev/asf/ant.head&quot; passfile=&quot;c:/home/myself/.cvspass&quot;
188 destfile=&quot;changelogant.xml&quot; tag=&quot;ANT_16_BRANCH&quot;/&gt;
189</pre>
190<h4>Generate Report</h4>
191<p>Ant includes a basic XSLT stylesheet that you can use to generate
192a HTML report based on the xml output. The following example illustrates
193how to generate a HTML report from the XML report.</p>
194
195<pre>
196 &lt;style in="changelog.xml"
197 out="changelog.html"
198 style="${ant.home}/etc/changelog.xsl"&gt;
199 &lt;param name="title" expression="Ant ChangeLog"/&gt;
200 &lt;param name="module" expression="ant"/&gt;
201 &lt;param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/&gt;
202 &lt;/style&gt;
203</pre>
204
205<h4>Sample Output</h4>
206<pre>
207&lt;changelog&gt;
208 &lt;entry&gt;
209 &lt;date&gt;2002-03-06&lt;/date&gt;
210 &lt;time&gt;12:00&lt;/time&gt;
211 &lt;author&gt;Peter Donald&lt;/author&gt;
212 &lt;file&gt;
213 &lt;name&gt;org/apache/myrmidon/build/AntlibDescriptorTask.java&lt;/name&gt;
214 &lt;revision&gt;1.3&lt;/revision&gt;
215 &lt;prevrevision&gt;1.2&lt;/prevrevision&gt;
216 &lt;/file&gt;
217 &lt;msg&gt;&lt;![CDATA[Use URLs directly rather than go via a File.
218
219This allows templates to be stored inside jar]]&gt;&lt;/msg&gt;
220 &lt;/entry&gt;
221&lt;/changelog&gt;
222</pre>
223
224<hr><p align="center">Copyright &copy; 2002-2004 The Apache Software Foundation. All rights
225Reserved.</p>
226
227</body>
228</html>
229
Note: See TracBrowser for help on using the repository browser.