source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/cvs.html@ 14982

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

initial import of LiRK3

File size: 7.4 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>CVS Task</title>
6</head>
7
8<body>
9
10<h2><a name="cvs">Cvs</a></h2>
11<h3>Description</h3>
12<p>Handles packages/modules retrieved from a
13<a href="http://www.cvshome.org/" target="_top">CVS</a> repository.</p>
14<p><b>Important:</b> This task needs &quot;<code>cvs</code>&quot; on the path. If it isn't, you will get
15an 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>
16from the command line in the target directory in which you are working.
17
18<p><b>CVSNT Note</b>: CVSNT prefers users to store the passwords
19inside the registry. If the <a href="cvspass.html">cvspass task</a>
20and the passfile attribute don't seem to work for you, the most likely
21reason is that CVSNT ignores your .cvspass file completely. See <a
22href="http://issues.apache.org/bugzilla/show_bug.cgi?id=21657#c5">bug
23zilla report 21657</a> for recommended workarounds.</p>
24
25<h3>Parameters</h3>
26<table border="1" cellpadding="2" cellspacing="0">
27 <tr>
28 <td valign="top"><b>Attribute</b></td>
29 <td valign="top"><b>Description</b></td>
30 <td align="center" valign="top"><b>Required</b></td>
31 </tr>
32 <tr>
33 <td valign="top">command</td>
34 <td valign="top">the CVS command to execute.</td>
35 <td align="center" valign="top">No, default &quot;checkout&quot;.</td>
36 </tr>
37 <tr>
38 <td valign="top">compression</td>
39 <td valign="top"><code>true</code> or <code>false</code> - if set
40 to true, this is the same as <code>compressionlevel=&quot;3&quot;</code></td>
41 <td align="center" valign="top">No. Defaults to false.</td>
42 </tr>
43 <tr>
44 <td valign="top">compressionlevel</td>
45 <td valign="top">A number between 1 and 9 (corresponding to
46 possible values for CVS' <code>-z#</code> argument). Any
47 other value is treated as <code>compression=&quot;false&quot;</code></td>
48 <td align="center" valign="top">No. Defaults to no compression.</td>
49 </tr>
50
51 <tr>
52 <td valign="top">cvsRoot</td>
53 <td valign="top">the <code>CVSROOT</code> variable.</td>
54 <td align="center" valign="top">No</td>
55 </tr>
56 <tr>
57 <td valign="top">cvsRsh</td>
58 <td valign="top">the <code>CVS_RSH</code> variable.</td>
59 <td align="center" valign="top">No</td>
60 </tr>
61 <tr>
62 <td valign="top">dest</td>
63 <td valign="top">the directory where the checked out files should
64 be placed. Note that this is different from CVS's <code>-d</code> command line
65 switch as Ant will never shorten pathnames to avoid empty
66 directories.</td>
67 <td align="center" valign="top">No, default is project's basedir.</td>
68 </tr>
69 <tr>
70 <td valign="top">package</td>
71 <td valign="top">the package/module to check out.</td>
72 <td align="center" valign="top">No</td>
73 </tr>
74 <tr>
75 <td valign="top">tag</td>
76 <td valign="top">the tag of the package/module to check out.</td>
77 <td align="center" valign="top">No</td>
78 </tr>
79 <tr>
80 <td valign="top">date</td>
81 <td valign="top">Use the most recent revision no later than the given date</td>
82 <td align="center" valign="top">No</td>
83 </tr>
84 <tr>
85 <td valign="top">quiet</td>
86 <td valign="top">suppress informational messages. This is the same as <code>-q</code> on the command line.</td>
87 <td align="center" valign="top">No, default &quot;false&quot;</td>
88 </tr>
89 <tr>
90 <td valign="top">reallyquiet</td>
91 <td valign="top">suppress all messages. This is the same as
92 <code>-Q</code> on the command line. <em>since Ant 1.6</em>.</td>
93 <td align="center" valign="top">No, default &quot;false&quot;</td>
94 </tr>
95 <tr>
96 <td valign="top">noexec</td>
97 <td valign="top">report only, don't change any files.</td>
98 <td align="center" valign="top">No, default to &quot;false&quot;</td>
99 </tr>
100 <tr>
101 <td valign="top">output</td>
102 <td valign="top">the file to direct standard output from the command.</td>
103 <td align="center" valign="top">No, default output to ANT Log as <code>MSG_INFO</code>.</td>
104 </tr>
105 <tr>
106 <td valign="top">error</td>
107 <td valign="top">the file to direct standard error from the command.</td>
108 <td align="center" valign="top">No, default error to ANT Log as <code>MSG_WARN</code>.</td>
109 </tr>
110 <tr>
111 <td valign="top">append</td>
112 <td valign="top">whether to append output/error when redirecting to a file.</td>
113 <td align="center" valign="top">No, default to &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 <code>2401</code>.</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 build process if the command exits with a
128 return code other than <code>0</code>. Defaults to &quot;false&quot;</td>
129 <td align="center" valign="top">No</td>
130 </tr>
131</table>
132<h3>Examples</h3>
133<pre> &lt;cvs cvsRoot=&quot;:pserver:[email protected]:/home/cvspublic&quot;
134 package=&quot;ant&quot;
135 dest=&quot;${ws.dir}&quot;
136 /&gt;</pre>
137<p>checks out the package/module &quot;ant&quot; from the CVS
138repository pointed to by the <code>cvsRoot</code> attribute, and stores the files in &quot;<code>${ws.dir}</code>&quot;.</p>
139<pre> &lt;cvs dest=&quot;${ws.dir}&quot; command=&quot;update&quot;/&gt;</pre>
140<p>updates the package/module that has previously been checked out into
141&quot;<code>${ws.dir}</code>&quot;.</p>
142
143<pre> &lt;cvs command=&quot;-q diff -u -N&quot; output=&quot;patch.txt&quot;/&gt;</pre>
144
145<p>silently (<code>-q</code>) creates a file called <code>patch.txt</code> which contains a unified (<code>-u</code>) diff which includes new files added via &quot;cvs add&quot; (<code>-N</code>) and can be used as input to patch.
146The equivalent, using <code>&lt;commandline&gt;</code> elements, is:
147</p>
148<pre>
149&lt;cvs output=&quot;patch&quot;&gt;
150 &lt;commandline&gt;
151 &lt;argument value=&quot;-q&quot;/&gt;
152 &lt;argument value=&quot;diff&quot;/&gt;
153 &lt;argument value=&quot;-u&quot;/&gt;
154 &lt;argument value=&quot;-N&quot;/&gt;
155 &lt;/commandline&gt;
156&lt;/cvs&gt;
157</pre>
158or:
159<pre>
160&lt;cvs output=&quot;patch&quot;&gt;
161 &lt;commandline&gt;
162 &lt;argument line=&quot;-q diff -u -N&quot;/&gt;
163 &lt;/commandline&gt;
164&lt;/cvs&gt;
165</pre>
166<p>
167You may include as many <code>&lt;commandline&gt;</code> elements as you like.
168Each will inherit the <code>failonerror</code>, <code>compression</code>, and other &quot;global&quot; parameters
169from the <code>&lt;cvs&gt;</code> element.
170</p>
171
172
173<pre> &lt;cvs command=&quot;update -A -d&quot;/&gt;</pre>
174<p>Updates from the head of repository ignoring sticky bits (<code>-A</code>) and creating any new directories as necessary (<code>-d</code>).</p>
175<p>Note: the text of the command is passed to cvs &quot;as-is&quot; so any cvs options should appear
176before the command, and any command options should appear after the command as in the diff example
177above. See <a href="http://www.cvshome.org/docs/manual/cvs-1.11.13/cvs.html" target="_top">the cvs manual</a> for details,
178specifically the <a href="http://www.cvshome.org/docs/manual/cvs-1.11.13/cvs_16.html" target="_top">Guide to CVS commands</a></p>
179<hr>
180<p align="center">Copyright &copy; 2000-2005 The Apache Software
181Foundation. All rights Reserved.</p>
182
183</body>
184</html>
185
Note: See TracBrowser for help on using the repository browser.