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 8.7 KiB

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