2001-02-13 12:32:01 +00:00
< html >
< head >
< meta http-equiv = "Content-Language" content = "en-us" >
2002-02-03 22:00:42 +00:00
< title > CVS Task< / title >
2001-02-13 12:32:01 +00:00
< / head >
< body >
< h2 > < a name = "cvs" > Cvs< / a > < / h2 >
< h3 > Description< / h3 >
2001-12-29 19:46:45 +00:00
< p > Handles packages/modules retrieved from a
2001-02-13 12:32:01 +00:00
< a href = "http://www.cvshome.org/" target = "_top" > CVS< / a > repository.< / p >
< p > When doing automated builds, the < a href = "get.html" > get task< / a > should be
preferred over the < i > checkout< / i > command, because of speed.< / p >
2003-09-02 14:38:19 +00:00
< p > < b > Important:< / b > This task needs " < code > cvs< / code > " on the path. If it isn't, you will get
an error (such as error < code > 2< / code > on windows). If < code > < cvs> < / code > doesn't work, try to execute < code > cvs.exe< / code >
2003-04-22 15:31:03 +00:00
from the command line in the target directory in which you are working.
2001-02-13 12:32:01 +00:00
< h3 > Parameters< / h3 >
< table border = "1" cellpadding = "2" cellspacing = "0" >
< tr >
< td valign = "top" > < b > Attribute< / b > < / td >
< td valign = "top" > < b > Description< / b > < / td >
< td align = "center" valign = "top" > < b > Required< / b > < / td >
< / tr >
< tr >
< td valign = "top" > command< / td >
< td valign = "top" > the CVS command to execute.< / td >
2002-04-04 10:34:22 +00:00
< td align = "center" valign = "top" > No, default " checkout" .< / td >
2001-02-13 12:32:01 +00:00
< / tr >
2002-04-04 10:34:22 +00:00
< tr >
2002-04-18 14:56:37 +00:00
< td valign = "top" > compression< / td >
2002-04-11 09:52:48 +00:00
< td valign = "top" > < code > true< / code > or < code > false< / code > - if set
2003-09-02 14:38:19 +00:00
to true, this is the same as < code > compressionlevel=" 3" < / code > < / td >
2002-04-11 09:52:48 +00:00
< td align = "center" valign = "top" > No. Defaults to false.< / td >
< / tr >
< tr >
2002-04-18 14:56:37 +00:00
< td valign = "top" > compressionlevel< / td >
2002-04-11 09:52:48 +00:00
< td valign = "top" > A number between 1 and 9 (corresponding to
2003-09-02 14:38:19 +00:00
possible values for CVS' < code > -z#< / code > argument). Any
other value is treated as < code > compression=" false" < / code > < / td >
2002-04-11 09:52:48 +00:00
< td align = "center" valign = "top" > No. Defaults to no compression.< / td >
2002-04-04 10:34:22 +00:00
< / tr >
2001-02-13 12:32:01 +00:00
< tr >
< td valign = "top" > cvsRoot< / td >
2003-09-02 14:38:19 +00:00
< td valign = "top" > the < code > CVSROOT< / code > variable.< / td >
2001-02-13 12:32:01 +00:00
< td align = "center" valign = "top" > No< / td >
< / tr >
2001-11-19 10:54:50 +00:00
< tr >
< td valign = "top" > cvsRsh< / td >
2003-09-02 14:38:19 +00:00
< td valign = "top" > the < code > CVS_RSH< / code > variable.< / td >
2001-11-19 10:54:50 +00:00
< td align = "center" valign = "top" > No< / td >
< / tr >
2001-02-13 12:32:01 +00:00
< tr >
< td valign = "top" > dest< / td >
2003-09-22 15:41:44 +00:00
< td valign = "top" > the directory where the checked out files should
be placed. Note that this is different from CVS's -d command line
switch as Ant will never shorten pathnames to avoid empty
directories.< / td >
2001-02-13 12:32:01 +00:00
< td align = "center" valign = "top" > No, default is project's basedir.< / td >
< / tr >
< tr >
< td valign = "top" > package< / td >
< td valign = "top" > the package/module to check out.< / td >
< td align = "center" valign = "top" > No< / td >
< / tr >
< tr >
< td valign = "top" > tag< / td >
< td valign = "top" > the tag of the package/module to check out.< / td >
< td align = "center" valign = "top" > No< / td >
< / tr >
< tr >
< td valign = "top" > date< / td >
< td valign = "top" > Use the most recent revision no later than the given date< / td >
< td align = "center" valign = "top" > No< / td >
< / tr >
< tr >
< td valign = "top" > quiet< / td >
2003-09-02 14:38:19 +00:00
< td valign = "top" > suppress informational messages. This is the same as < code > -q< / code > on the command line.< / td >
< td align = "center" valign = "top" > No, default " false" < / td >
< / tr >
< tr >
< td valign = "top" > reallyquiet< / td >
< td valign = "top" > suppress all messages. This is the same as
< code > -Q< / code > on the command line. < em > since Ant 1.6< / em > .< / td >
2001-02-13 12:32:01 +00:00
< td align = "center" valign = "top" > No, default " false" < / td >
< / tr >
< tr >
< td valign = "top" > noexec< / td >
< td valign = "top" > report only, don't change any files.< / td >
2001-12-29 19:46:45 +00:00
< td align = "center" valign = "top" > No, default to " false" < / td >
2001-02-13 12:32:01 +00:00
< / tr >
< tr >
< td valign = "top" > output< / td >
< td valign = "top" > the file to direct standard output from the command.< / td >
< td align = "center" valign = "top" > No, default output to ANT Log as MSG_INFO.< / td >
< / tr >
< tr >
< td valign = "top" > error< / td >
< td valign = "top" > the file to direct standard error from the command.< / td >
< td align = "center" valign = "top" > No, default error to ANT Log as MSG_WARN.< / td >
< / tr >
2001-12-29 19:46:45 +00:00
< tr >
< td valign = "top" > append< / td >
< td valign = "top" > whether to append output/error when redirecting to a file.< / td >
< td align = "center" valign = "top" > No, default to " false" .< / td >
< / tr >
2001-04-27 11:52:55 +00:00
< tr >
< td valign = "top" > port< / td >
< td valign = "top" > Port used by CVS to communicate with the server.< / td >
< td align = "center" valign = "top" > No, default port 2401.< / td >
< / tr >
< tr >
< td valign = "top" > passfile< / td >
< td valign = "top" > Password file to read passwords from.< / td >
< td align = "center" valign = "top" > No, default file ~/.cvspass.< / td >
< / tr >
2001-10-19 08:47:14 +00:00
< tr >
< td valign = "top" > failonerror< / td >
2002-04-18 14:56:37 +00:00
< td valign = "top" > Stop the build process if the command exits with a
2003-09-02 14:38:19 +00:00
return code other than < code > 0< / code > . Defaults to false< / td >
2001-10-19 08:47:14 +00:00
< td align = "center" valign = "top" > No< / td >
< / tr >
2001-02-13 12:32:01 +00:00
< / table >
< h3 > Examples< / h3 >
2002-04-04 07:43:36 +00:00
< pre > < cvs cvsRoot=" :pserver:anoncvs@cvs.apache.org:/home/cvspublic"
2003-02-19 09:23:20 +00:00
package=" ant"
2001-02-13 12:32:01 +00:00
dest=" ${ws.dir}"
/> < / pre >
2003-02-19 09:23:20 +00:00
< p > checks out the package/module " ant" from the CVS
2003-09-02 14:38:19 +00:00
repository pointed to by the < code > cvsRoot< / code > attribute, and stores the files in " < code > ${ws.dir}< / code > " .< / p >
2001-02-13 12:32:01 +00:00
< pre > < cvs dest=" ${ws.dir}" command=" update" /> < / pre >
< p > updates the package/module that has previously been checked out into
2003-09-02 14:38:19 +00:00
" < code > ${ws.dir}< / code > " .< / p >
2002-04-04 10:34:22 +00:00
2001-02-13 12:32:01 +00:00
< pre > < cvs command=" -q diff -u -N" output=" patch.txt" /> < / pre >
2002-04-04 10:34:22 +00:00
2003-09-02 14:38:19 +00:00
< 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 " cvs add" (< code > -N< / code > ) and can be used as input to patch.
The equivalent, using < code > < commandline> < / code > elements, is:
2002-04-04 10:34:22 +00:00
< / p >
< pre >
2003-09-02 14:38:19 +00:00
< cvs output=" patch" >
2002-04-04 10:34:22 +00:00
< commandline>
2003-09-02 14:38:19 +00:00
< argument value=" -q" />
< argument value=" diff" />
< argument value=" -u" />
< argument value=" -N" />
2002-04-04 10:34:22 +00:00
< /commandline>
< /cvs>
< / pre >
or:
< pre >
2003-09-02 14:38:19 +00:00
< cvs output=" patch" >
2002-04-04 10:34:22 +00:00
< commandline>
2003-09-02 14:38:19 +00:00
< argument line=" -q diff -u -N" />
2002-04-04 10:34:22 +00:00
< /commandline>
< /cvs>
< / pre >
< p >
You may include as many < commandline> elements as you like.
Each will inherit the < code > failonerror< / code > , < code > compression< / code > , and other " global" parameters
from the < code > < cvs> < / code > element.
< / p >
2001-02-13 12:32:01 +00:00
< pre > < cvs command=" update -A -d" /> < / pre >
2003-09-02 14:38:19 +00:00
< p > Updates from the head of repository ignoring sticky bits (< code > -A< / code > ) and creating any new directories as necessary (< code > -d< / code > ).< / p >
2001-12-29 19:46:45 +00:00
< p > Note: the text of the command is passed to cvs " as-is" so any cvs options should appear
before the command, and any command options should appear after the command as in the diff example
2003-09-02 14:38:19 +00:00
above. See < a href = "http://www.cvshome.org/docs/manual/cvs-1.11.6/cvs.html" target = "_top" > the cvs manual< / a > for details,
specifically the < a href = "http://www.cvshome.org/docs/manual/cvs-1.11.6/cvs_16.html" target = "_top" > Guide to CVS commands< / a > < / p >
2002-04-04 07:43:36 +00:00
< hr >
2003-02-19 09:23:20 +00:00
< p align = "center" > Copyright © 2000-2003 Apache Software
2002-04-04 07:43:36 +00:00
Foundation. All rights Reserved.< / p >
2001-02-13 12:32:01 +00:00
< / body >
< / html >