source: release-kits/lirk3/bin/ant-installer/web/manual1.7.0/manual/CoreTasks/cvstagdiff.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 8.1 KB
Line 
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
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18<head>
19<meta http-equiv="Content-Language" content="en-us">
20<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
21<title>CvsTagDiff Task</title>
22</head>
23<body>
24<h2><a name="cvstagdiff">CvsTagDiff</a></h2>
25<h3>Description</h3>
26<p>Generates an XML-formatted report file of the changes between two tags or dates recorded in a
27<a href="http://www.nongnu.org/cvs/" target="_top">CVS</a> repository. </p>
28<p><b>Important:</b> This task needs "cvs" on the path. If it isn't, you will get
29an error (such as error 2 on windows). If <code>&lt;cvs&gt;</code> doesn't work, try to execute <code>cvs.exe</code>
30from the command line in the target directory in which you are working.
31<h3>Parameters</h3>
32<table border="1" cellpadding="2" cellspacing="0">
33 <tr>
34 <td valign="top"><b>Attribute</b></td>
35 <td valign="top"><b>Description</b></td>
36 <td align="center" valign="top"><b>Required</b></td>
37 </tr>
38 <tr>
39 <td valign="top">startTag</td>
40 <td valign="top">The earliest tag from which diffs are to be
41 included in the report.</td>
42 <td align="center" valign="top" rowspan="2">exactly one of the two.</td>
43 </tr>
44 <tr>
45 <td valign="top">startDate</td>
46 <td valign="top">The earliest date from which diffs are to be
47 included in the report.<br>
48 accepts all formats accepted by the cvs command for -D date_spec arguments</td>
49 </tr>
50 <tr>
51 <td valign="top">endTag</td>
52 <td valign="top">The latest tag from which diffs are to be
53 included in the report.</td>
54 <td align="center" valign="top" rowspan="2">exactly one of the two.</td>
55 </tr>
56 <tr>
57 <td valign="top">endDate</td>
58 <td valign="top">The latest date from which diffs are to be
59 included in the report.<br>
60 accepts all formats accepted by the cvs command for -D date_spec arguments</td>
61 </tr>
62 <tr>
63 <td valign="top">destfile</td>
64 <td valign="top">The file in which to write the diff report.</td>
65 <td align="center" valign="top">Yes</td>
66 </tr>
67</table>
68
69<h3>Parameters inherited from the <code>cvs</code> task</h3>
70<table border="1" cellpadding="2" cellspacing="0">
71 <tr>
72 <td valign="top"><b>Attribute</b></td>
73 <td valign="top"><b>Description</b></td>
74 <td align="center" valign="top"><b>Required</b></td>
75 </tr>
76 <tr>
77 <td valign="top">compression</td>
78 <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>
79 <td align="center" valign="top">No. Defaults to no compression. if passed <code>true</code>, level 3 compression is assumed.</td>
80 </tr>
81 <tr>
82 <td valign="top">cvsRoot</td>
83 <td valign="top">the CVSROOT variable.</td>
84 <td align="center" valign="top">No</td>
85 </tr>
86 <tr>
87 <td valign="top">cvsRsh</td>
88 <td valign="top">the CVS_RSH variable.</td>
89 <td align="center" valign="top">No</td>
90 </tr>
91 <tr>
92 <td valign="top">package</td>
93 <td valign="top">the package/module to analyze.<br>
94 Since ant 1.6
95 multiple packages separated by spaces are possible.
96 aliases corresponding to different modules are also possible</td>
97 <td align="center" valign="top">Yes</td>
98 </tr>
99 <tr>
100 <td valign="top">quiet</td>
101 <td valign="top">suppress informational messages.</td>
102 <td align="center" valign="top">No, default &quot;false&quot;</td>
103 </tr>
104 <tr>
105 <td valign="top">port</td>
106 <td valign="top">Port used by CVS to communicate with the server.</td>
107 <td align="center" valign="top">No, default port 2401.</td>
108 </tr>
109 <tr>
110 <td valign="top">passfile</td>
111 <td valign="top">Password file to read passwords from.</td>
112 <td align="center" valign="top">No, default file <code>~/.cvspass</code>.</td>
113 </tr>
114 <tr>
115 <td valign="top">failonerror</td>
116 <td valign="top">Stop the buildprocess if the command exits with a
117 returncode other than 0. Defaults to false</td>
118 <td align="center" valign="top">No</td>
119 </tr>
120</table>
121
122<h3>Examples</h3>
123<pre> &lt;cvstagdiff cvsRoot=&quot;:pserver:[email protected]:/home/cvspublic&quot;
124 destfile=&quot;tagdiff.xml&quot;
125 package=&quot;ant&quot;
126 startTag=&quot;ANT_14&quot;
127 endTag=&quot;ANT_141&quot;
128 /&gt;</pre>
129
130<p>Generates a tagdiff report for all the changes that have been made
131in the <code>ant</code> module between the tags <code>ANT_14</code> and <code>ANT_141</code>.
132It writes these changes into the file <code>tagdiff.xml</code>.</p>
133
134<pre> &lt;cvstagdiff
135 destfile=&quot;tagdiff.xml&quot;
136 package=&quot;ant&quot;
137 startDate=&quot;2002-01-01&quot;
138 endDate=&quot;2002-31-01&quot;
139 /&gt;</pre>
140
141<p>Generates a tagdiff report for all the changes that have been made
142in the <code>ant</code> module in january 2002. In this example <code>cvsRoot</code>
143has not been set. The current <code>cvsRoot</code> will be used (assuming the build is started
144from a folder stored in <code>cvs</code>.
145It writes these changes into the file <code>tagdiff.xml</code>.</p>
146
147<pre> &lt;cvstagdiff
148 destfile=&quot;tagdiff.xml&quot;
149 package=&quot;ant jakarta-gump&quot;
150 startDate=&quot;2003-01-01&quot;
151 endDate=&quot;2003-31-01&quot;
152 /&gt;</pre>
153
154<p>Generates a tagdiff report for all the changes that have been made
155in the <code>ant</code> and <code>jakarta-gump</code> modules in january 2003.
156In this example <code>cvsRoot</code>
157has not been set. The current <code>cvsRoot</code> will be used (assuming the build is started
158from a folder stored in <code>cvs</code>.
159It writes these changes into the file <code>tagdiff.xml</code>.</p>
160
161<h4>Generate Report</h4>
162<p>Ant includes a basic XSLT stylesheet that you can use to generate
163a HTML report based on the xml output. The following example illustrates
164how to generate a HTML report from the XML report.</p>
165
166<pre>
167 &lt;style in="tagdiff.xml"
168 out="tagdiff.html"
169 style="${ant.home}/etc/tagdiff.xsl"&gt;
170 &lt;param name="title" expression="Ant Diff"/&gt;
171 &lt;param name="module" expression="ant"/&gt;
172 &lt;param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/&gt;
173 &lt;/style&gt;
174</pre>
175
176<h4>Output</h4>
177<p>
178The cvsroot and package attributes of the tagdiff element are new in ant 1.6.<br>
179Notes on entry attributes :
180<table border="1">
181<tr><th>Attribute</th><th>Comment</th></tr>
182<tr><td>name</td><td>when reporting on one package, the package name is removed from the output</td></tr>
183<tr><td>revision</td><td>supplied for files which exist at the end of the reporting period</td></tr>
184<tr><td>prevrevision</td><td>supplied for files which exist at the beginning of the reporting period.<br>
185Old CVS servers do not supply it for deleted files. CVS 1.12.2 supplies it.</td></tr>
186</table>
187</p>
188<pre>
189&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
190&lt;tagdiff startTag=&quot;ANT_14&quot; endTag=&quot;ANT_141&quot;
191cvsroot=&quot;:pserver:[email protected]:/home/cvspublic&quot; package=&quot;ant&quot;&gt;
192 &lt;entry&gt;
193 &lt;file&gt;
194 &lt;name&gt;src/main/org/apache/tools/ant/DirectoryScanner.java&lt;/name&gt;
195 &lt;revision&gt;1.15.2.1&lt;/revision&gt;
196 &lt;prevrevision&gt;1.15&lt;/prevrevision&gt;
197 &lt;/file&gt;
198 &lt;/entry&gt;
199&lt;/tagdiff&gt;
200</pre>
201
202
203
204</body>
205</html>
206
Note: See TracBrowser for help on using the repository browser.