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

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