From 468d6cb9f438fecbfe4b3c170d829e27e1d090b8 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 2 Sep 2003 14:38:19 +0000 Subject: [PATCH] Add a reallyquiet attribute to . PR: 22774 Submitted by: Larry Shatzer git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275167 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/cvs.html | 52 +++++++++++-------- .../tools/ant/taskdefs/AbstractCvsTask.java | 22 +++++++- 2 files changed, 49 insertions(+), 25 deletions(-) diff --git a/docs/manual/CoreTasks/cvs.html b/docs/manual/CoreTasks/cvs.html index 2089fff11..8612f0874 100644 --- a/docs/manual/CoreTasks/cvs.html +++ b/docs/manual/CoreTasks/cvs.html @@ -13,8 +13,8 @@ CVS repository.

When doing automated builds, the get task should be preferred over the checkout command, because of speed.

-

Important: This task needs "cvs" on the path. If it isn't, you will get -an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe +

Important: This task needs "cvs" on the path. If it isn't, you will get +an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working.

Parameters

@@ -31,25 +31,25 @@ from the command line in the target directory in which you are working. + to true, this is the same as compressionlevel="3" + possible values for CVS' -z# argument). Any + other value is treated as compression="false" - + - + @@ -74,7 +74,13 @@ from the command line in the target directory in which you are working. - + + + + + + @@ -110,7 +116,7 @@ from the command line in the target directory in which you are working. + return code other than 0. Defaults to false
compression true or false - if set - to true, this is the same as compressionlevel="3" No. Defaults to false.
compressionlevel A number between 1 and 9 (corresponding to - possible values for CVS' -z# argument). Any - other value is treated as compression="false" No. Defaults to no compression.
cvsRootthe CVSROOT variable.the CVSROOT variable. No
cvsRshthe CVS_RSH variable.the CVS_RSH variable. No
quietsuppress informational messages.suppress informational messages. This is the same as -q on the command line.No, default "false"
reallyquietsuppress all messages. This is the same as + -Q on the command line. since Ant 1.6. No, default "false"
failonerror Stop the build process if the command exits with a - return code other than 0. Defaults to false No
@@ -120,31 +126,31 @@ from the command line in the target directory in which you are working. dest="${ws.dir}" />

checks out the package/module "ant" from the CVS -repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}".

+repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}".

  <cvs dest="${ws.dir}" command="update"/>

updates the package/module that has previously been checked out into -"${ws.dir}".

+"${ws.dir}".

  <cvs command="-q diff -u -N" output="patch.txt"/>
-

silently (-q) creates a file called patch.txt which contains a unified (-u) diff which includes new files added via "cvs add" (-N) and can be used as input to patch. -The equivalent, using <commandline> elements, is: +

silently (-q) creates a file called patch.txt which contains a unified (-u) diff which includes new files added via "cvs add" (-N) and can be used as input to patch. +The equivalent, using <commandline> elements, is:

-<cvs output="patch">
+<cvs output="patch">
     <commandline>
-        <argument value="-q"/>
-        <argument value="diff"/>
-        <argument value="-u"/>
-        <argument value="-N"/>
+        <argument value="-q"/>
+        <argument value="diff"/>
+        <argument value="-u"/>
+        <argument value="-N"/>
     </commandline>
 </cvs>
 
or:
-<cvs output="patch">
+<cvs output="patch">
     <commandline>
-        <argument line="-q diff -u -N"/>
+        <argument line="-q diff -u -N"/>
     </commandline>
 </cvs>
 
@@ -156,11 +162,11 @@ from the <cvs> element.
  <cvs command="update -A -d"/>
-

Updates from the head of repository ignoring sticky bits (-A) and creating any new directories as necessary (-d).

+

Updates from the head of repository ignoring sticky bits (-A) and creating any new directories as necessary (-d).

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 -above. See the cvs manual for details, -specifically the Guide to CVS commands

+above. See the cvs manual for details, +specifically the Guide to CVS commands


Copyright © 2000-2003 Apache Software Foundation. All rights Reserved.

diff --git a/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java b/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java index 55440512f..d81665117 100644 --- a/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java @@ -126,6 +126,11 @@ public abstract class AbstractCvsTask extends Task { */ private boolean quiet = false; + /** + * suppress all messages. + */ + private boolean reallyquiet = false; + /** * compression level to use. */ @@ -680,6 +685,16 @@ public abstract class AbstractCvsTask extends Task { quiet = q; } + /** + * If true, suppress all messages. + * @param q if true, suppress all messages + * @since Ant 1.6 + */ + public void setReallyquiet(boolean q) { + reallyquiet = q; + } + + /** * If true, report only and don't change any files. * @@ -738,7 +753,7 @@ public abstract class AbstractCvsTask extends Task { * compression * *
  • - * quiet + * quiet or reallyquiet *
  • *
  • cvsroot
  • *
  • noexec
  • @@ -755,9 +770,12 @@ public abstract class AbstractCvsTask extends Task { if (this.compression > 0 && this.compression <= MAXIMUM_COMRESSION_LEVEL) { c.createArgument(true).setValue("-z" + this.compression); } - if (quiet) { + if (quiet && !reallyquiet) { c.createArgument(true).setValue("-q"); } + if (reallyquiet) { + c.createArgument(true).setValue("-Q"); + } if (noexec) { c.createArgument(true).setValue("-n"); }