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.

cvstagdiff.html 9.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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>CvsTagDiff Task</title>
  20. </head>
  21. <body>
  22. <h2><a name="cvstagdiff">CvsTagDiff</a></h2>
  23. <h3>Description</h3>
  24. <p>Generates an XML-formatted report file of the changes between two tags or dates 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 executable 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 valign="top">startTag</td>
  43. <td valign="top">The earliest tag from which diffs are to be
  44. included in the report.</td>
  45. <td align="center" valign="top" rowspan="2">exactly one of the two.</td>
  46. </tr>
  47. <tr>
  48. <td valign="top">startDate</td>
  49. <td valign="top">The earliest date from which diffs are to be
  50. included in the report.<br>
  51. accepts all formats accepted by the cvs command for -D date_spec arguments</td>
  52. </tr>
  53. <tr>
  54. <td valign="top">endTag</td>
  55. <td valign="top">The latest tag from which diffs are to be
  56. included in the report.</td>
  57. <td align="center" valign="top" rowspan="2">exactly one of the two.</td>
  58. </tr>
  59. <tr>
  60. <td valign="top">endDate</td>
  61. <td valign="top">The latest date from which diffs are to be
  62. included in the report.<br>
  63. accepts all formats accepted by the cvs command for -D date_spec arguments</td>
  64. </tr>
  65. <tr>
  66. <td valign="top">destfile</td>
  67. <td valign="top">The file in which to write the diff report.</td>
  68. <td align="center" valign="top">Yes</td>
  69. </tr>
  70. <tr>
  71. <td valign="top">ignoreRemoved</td>
  72. <td valign="top">When set to true, the report will not include any
  73. removed files. <em>Since Apache Ant 1.8.0</em></td>
  74. <td align="center" valign="top">No, defaults to false.</td>
  75. </table>
  76. <h3>Parameters inherited from the <code>cvs</code> task</h3>
  77. <table border="1" cellpadding="2" cellspacing="0">
  78. <tr>
  79. <td valign="top"><b>Attribute</b></td>
  80. <td valign="top"><b>Description</b></td>
  81. <td align="center" valign="top"><b>Required</b></td>
  82. </tr>
  83. <tr>
  84. <td valign="top">compression</td>
  85. <td valign="top"><code>true</code>, <code>false</code>, or the number 1-9 (corresponding to possible values for CVS <code>-z#</code> argument). Any other value is treated as false</td>
  86. <td align="center" valign="top">No. Defaults to no compression. if passed <code>true</code>, level 3 compression is assumed.</td>
  87. </tr>
  88. <tr>
  89. <td valign="top">cvsRoot</td>
  90. <td valign="top">the CVSROOT variable.</td>
  91. <td align="center" valign="top">No</td>
  92. </tr>
  93. <tr>
  94. <td valign="top">cvsRsh</td>
  95. <td valign="top">the CVS_RSH variable.</td>
  96. <td align="center" valign="top">No</td>
  97. </tr>
  98. <tr>
  99. <td valign="top">package</td>
  100. <td valign="top">the package/module to analyze.<br>
  101. Since Ant 1.6
  102. multiple packages separated by spaces are possible.
  103. aliases corresponding to different modules are also possible
  104. Use a nested &lt;module&gt; element if you want to specify a module with
  105. spaces in its name.</td>
  106. <td align="center" valign="top">No</td>
  107. </tr>
  108. <td align="center" valign="top">Yes</td>
  109. </tr>
  110. <tr>
  111. <td valign="top">quiet</td>
  112. <td valign="top">suppress informational messages.</td>
  113. <td align="center" valign="top">No, default &quot;false&quot;</td>
  114. </tr>
  115. <tr>
  116. <td valign="top">port</td>
  117. <td valign="top">Port used by CVS to communicate with the server.</td>
  118. <td align="center" valign="top">No, default port 2401.</td>
  119. </tr>
  120. <tr>
  121. <td valign="top">passfile</td>
  122. <td valign="top">Password file to read passwords from.</td>
  123. <td align="center" valign="top">No, default file <code>~/.cvspass</code>.</td>
  124. </tr>
  125. <tr>
  126. <td valign="top">failonerror</td>
  127. <td valign="top">Stop the buildprocess if the command exits with a
  128. returncode other than 0. Defaults to false</td>
  129. <td align="center" valign="top">No</td>
  130. </tr>
  131. </table>
  132. <h3>Parameters specified as nested elements</h3>
  133. <h4>module</h4>
  134. <p>Specifies a package/module to work on, unlike the package attribute
  135. modules specified using this attribute can contain spaces in their
  136. name.</p>
  137. <table border="1" cellpadding="2" cellspacing="0">
  138. <tr>
  139. <td valign="top"><b>Attribute</b></td>
  140. <td valign="top"><b>Description</b></td>
  141. <td align="center" valign="top"><b>Required</b></td>
  142. </tr>
  143. <tr>
  144. <td valign="top">name</td>
  145. <td valign="top">The module's/package's name.</td>
  146. <td align="center" valign="top">Yes.</td>
  147. </tr>
  148. </table>
  149. <h3>Examples</h3>
  150. <pre> &lt;cvstagdiff cvsRoot=&quot;:pserver:anoncvs@cvs.apache.org:/home/cvspublic&quot;
  151. destfile=&quot;tagdiff.xml&quot;
  152. package=&quot;ant&quot;
  153. startTag=&quot;ANT_14&quot;
  154. endTag=&quot;ANT_141&quot;
  155. /&gt;</pre>
  156. <p>Generates a tagdiff report for all the changes that have been made
  157. in the <code>ant</code> module between the tags <code>ANT_14</code> and <code>ANT_141</code>.
  158. It writes these changes into the file <code>tagdiff.xml</code>.</p>
  159. <pre> &lt;cvstagdiff
  160. destfile=&quot;tagdiff.xml&quot;
  161. package=&quot;ant&quot;
  162. startDate=&quot;2002-01-01&quot;
  163. endDate=&quot;2002-31-01&quot;
  164. /&gt;</pre>
  165. <p>Generates a tagdiff report for all the changes that have been made
  166. in the <code>ant</code> module in january 2002. In this example <code>cvsRoot</code>
  167. has not been set. The current <code>cvsRoot</code> will be used (assuming the build is started
  168. from a folder stored in <code>cvs</code>.
  169. It writes these changes into the file <code>tagdiff.xml</code>.</p>
  170. <pre> &lt;cvstagdiff
  171. destfile=&quot;tagdiff.xml&quot;
  172. package=&quot;ant jakarta-gump&quot;
  173. startDate=&quot;2003-01-01&quot;
  174. endDate=&quot;2003-31-01&quot;
  175. /&gt;</pre>
  176. <p>Generates a tagdiff report for all the changes that have been made
  177. in the <code>ant</code> and <code>jakarta-gump</code> modules in january 2003.
  178. In this example <code>cvsRoot</code>
  179. has not been set. The current <code>cvsRoot</code> will be used (assuming the build is started
  180. from a folder stored in <code>cvs</code>.
  181. It writes these changes into the file <code>tagdiff.xml</code>.</p>
  182. <h4>Generate Report</h4>
  183. <p>Ant includes a basic XSLT stylesheet that you can use to generate
  184. a HTML report based on the xml output. The following example illustrates
  185. how to generate a HTML report from the XML report.</p>
  186. <pre>
  187. &lt;style in="tagdiff.xml"
  188. out="tagdiff.html"
  189. style="${ant.home}/etc/tagdiff.xsl"&gt;
  190. &lt;param name="title" expression="Ant Diff"/&gt;
  191. &lt;param name="module" expression="ant"/&gt;
  192. &lt;param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/&gt;
  193. &lt;/style&gt;
  194. </pre>
  195. <h4>Output</h4>
  196. <p>
  197. The cvsroot and package attributes of the tagdiff element are new in ant 1.6.<br>
  198. Notes on entry attributes :
  199. <table border="1">
  200. <tr><th>Attribute</th><th>Comment</th></tr>
  201. <tr><td>name</td><td>when reporting on one package, the package name is removed from the output</td></tr>
  202. <tr><td>revision</td><td>supplied for files which exist at the end of the reporting period</td></tr>
  203. <tr><td>prevrevision</td><td>supplied for files which exist at the beginning of the reporting period.<br>
  204. Old CVS servers do not supply it for deleted files. CVS 1.12.2 supplies it.</td></tr>
  205. </table>
  206. </p>
  207. <pre>
  208. &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  209. &lt;tagdiff startTag=&quot;ANT_14&quot; endTag=&quot;ANT_141&quot;
  210. cvsroot=&quot;:pserver:anoncvs@cvs.apache.org:/home/cvspublic&quot; package=&quot;ant&quot;&gt;
  211. &lt;entry&gt;
  212. &lt;file&gt;
  213. &lt;name&gt;src/main/org/apache/tools/ant/DirectoryScanner.java&lt;/name&gt;
  214. &lt;revision&gt;1.15.2.1&lt;/revision&gt;
  215. &lt;prevrevision&gt;1.15&lt;/prevrevision&gt;
  216. &lt;/file&gt;
  217. &lt;/entry&gt;
  218. &lt;/tagdiff&gt;
  219. </pre>
  220. </body>
  221. </html>