source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.6.2/manual/CoreTasks/cvs.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

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