|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <html>
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
- <title>CvsTagDiff Task</title>
- </head>
- <body>
- <h2 id="cvstagdiff">CvsTagDiff</h2>
- <h3>Description</h3>
- <p>Generates an XML-formatted report file of the changes between two tags or dates recorded in
- a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p>
- <p><strong>Important</strong>: This task needs <kbd>cvs</kbd> on the path. If it isn't, you will get
- an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, try to
- execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you are working.
- Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with the Unix
- version, this is not completely true for certain other CVS clients—like CVSNT for
- example—and some operation may fail when using such an incompatible client.</p>
- <h3>Parameters</h3>
- <table class="attr">
- <tr>
- <th>Attribute</th>
- <th>Description</th>
- <th>Required</th>
- </tr>
- <tr>
- <td>startTag</td>
- <td>The earliest tag from which diffs are to be included in the report.</td>
- <td rowspan="2">Exactly one of the two</td>
- </tr>
- <tr>
- <td>startDate</td>
- <td class="left">The earliest date from which diffs are to be included in the
- report.<br/>Accepts all formats accepted by the <kbd>cvs</kbd> command for <kbd>-D
- date_spec</kbd> arguments.</td>
- </tr>
- <tr>
- <td>endTag</td>
- <td>The latest tag from which diffs are to be included in the report.</td>
- <td rowspan="2">Exactly one of the two</td>
- </tr>
- <tr>
- <td>endDate</td>
- <td class="left">The latest date from which diffs are to be included in the report.<br/>Accepts
- all formats accepted by the <kbd>cvs</kbd> command for <kbd>-D date_spec</kbd>
- arguments.</td>
- </tr>
- <tr>
- <td>destfile</td>
- <td>The file in which to write the diff report.</td>
- <td>Yes</td>
- </tr>
- <tr>
- <td>ignoreRemoved</td>
- <td>When set to <q>true</q>, the report will not include any removed files. <em>Since Apache
- Ant 1.8.0</em></td>
- <td>No; defaults to <q>false</q></td>
- </table>
-
- <h3>Parameters inherited from the <code>cvs</code> task</h3>
- <table class="attr">
- <tr>
- <th>Attribute</th>
- <th>Description</th>
- <th>Required</th>
- </tr>
- <tr>
- <td>compression</td>
- <td><q>true</q> (equivalent to <q>3</q>), <q>false</q>, or a number between <q>1</q>
- and <q>9</q> (corresponding to possible values for CVS <kbd>-z#</kbd> argument). Any other
- value is treated as <q>false</q></td>
- <td>No; defaults to no compression</td>
- </tr>
- <tr>
- <td>cvsRoot</td>
- <td>the <code>CVSROOT</code> variable.</td>
- <td>No</td>
- </tr>
- <tr>
- <td>cvsRsh</td>
- <td>the <code>CVS_RSH</code> variable.</td>
- <td>No</td>
- </tr>
- <tr>
- <td>package</td>
- <td>the package/module to analyze.<br/><em>Since Ant 1.6</em> multiple packages separated by
- spaces are possible. aliases corresponding to different modules are also possible. Use a
- nested <code><module></code> element if you want to specify a module with spaces in its
- name.</td>
- <td>No</td>
- </tr>
- <tr>
- <td>quiet</td>
- <td>suppress informational messages.</td>
- <td>No; default <q>false</q></td>
- </tr>
- <tr>
- <td>port</td>
- <td>Port used by CVS to communicate with the server.</td>
- <td>No; default <q>2401</q></td>
- </tr>
- <tr>
- <td>passfile</td>
- <td>Password file to read passwords from.</td>
- <td>No; default <q>~/.cvspass</q></td>
- </tr>
- <tr>
- <td>failonerror</td>
- <td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
- <td>No; defaults to <q>false</q></td>
- </tr>
- </table>
-
- <h3>Parameters specified as nested elements</h3>
-
- <h4>module</h4>
-
- <p>Specifies a package/module to work on, unlike the package attribute modules specified using this
- attribute can contain spaces in their name.</p>
-
- <table class="attr">
- <tr>
- <th>Attribute</th>
- <th>Description</th>
- <th>Required</th>
- </tr>
- <tr>
- <td>name</td>
- <td>Name of the module/package.</td>
- <td>Yes</td>
- </tr>
- </table>
-
- <h3>Examples</h3>
- <pre>
- <cvstagdiff cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
- destfile="tagdiff.xml"
- package="ant"
- startTag="ANT_14"
- endTag="ANT_141"/></pre>
-
- <p>Generates a <code>tagdiff</code> report for all the changes that have been made in
- the <code>ant</code> module between the tags <samp>ANT_14</samp> and <samp>ANT_141</samp>. It
- writes these changes into the file <samp>tagdiff.xml</samp>.</p>
-
- <pre>
- <cvstagdiff destfile="tagdiff.xml"
- package="ant"
- startDate="2002-01-01"
- endDate="2002-31-01"/></pre>
-
- <p>Generates a <code>tagdiff</code> report for all the changes that have been made in
- the <samp>ant</samp> module in January 2002. In this example <var>cvsRoot</var> has not been
- set. The current <var>cvsRoot</var> will be used (assuming the build is started from a folder stored
- in <samp>cvs</samp>. It writes these changes into the file <samp>tagdiff.xml</samp>.</p>
-
- <pre>
- <cvstagdiff destfile="tagdiff.xml"
- package="ant jakarta-gump"
- startDate="2003-01-01"
- endDate="2003-31-01"/></pre>
-
- <p>Generates a <code>tagdiff</code> report for all the changes that have been made in
- the <samp>ant</samp> and <samp>jakarta-gump</samp> modules in January 2003. In this
- example <var>cvsRoot</var> has not been set. The current <var>cvsRoot</var> will be used (assuming
- the build is started from a folder stored in <samp>cvs</samp>. It writes these changes into the
- file <samp>tagdiff.xml</samp>.</p>
-
- <h4>Generate Report</h4>
- <p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the xml
- output. The following example illustrates how to generate a HTML report from the XML report.</p>
-
- <pre>
- <style in="tagdiff.xml"
- out="tagdiff.html"
- style="${ant.home}/etc/tagdiff.xsl">
- <param name="title" expression="Ant Diff"/>
- <param name="module" expression="ant"/>
- <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
- </style></pre>
-
- <h4>Output</h4>
- <p>The <var>cvsroot</var> and <var>package</var> attributes of the <code>tagdiff</code> element are
- new in Ant 1.6.<br/> Notes on <code>entry</code> attributes:</p>
- <table>
- <tr>
- <th>Attribute</th>
- <th>Comment</th>
- </tr>
- <tr>
- <td>name</td>
- <td>when reporting on one package, the package name is removed from the output</td>
- </tr>
- <tr>
- <td>revision</td>
- <td>supplied for files which exist at the end of the reporting period</td>
- </tr>
- <tr>
- <td>prevrevision</td>
- <td>supplied for files which exist at the beginning of the reporting period.<br/>Old CVS servers
- do not supply it for deleted files. CVS 1.12.2 supplies it.</td>
- </tr>
- </table>
- <pre>
- <?xml version="1.0" encoding="UTF-8"?>
- <tagdiff startTag="ANT_14" endTag="ANT_141"
- cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" package="ant">
- <entry>
- <file>
- <name>src/main/org/apache/tools/ant/DirectoryScanner.java</name>
- <revision>1.15.2.1</revision>
- <prevrevision>1.15</prevrevision>
- </file>
- </entry>
- </tagdiff>
- </pre>
-
- </body>
- </html>
|