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

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