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