You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

changelog.html 11 KiB

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