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.1 KiB

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