diff --git a/docs/manual/CoreTasks/cvs.html b/docs/manual/CoreTasks/cvs.html index 5c389d400..3261ce7b6 100644 --- a/docs/manual/CoreTasks/cvs.html +++ b/docs/manual/CoreTasks/cvs.html @@ -9,7 +9,7 @@

Cvs

Description

-

Handles packages/modules retrieved from a +

Handles packages/modules retrieved from a CVS repository.

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

@@ -63,7 +63,7 @@ preferred over the checkout command, because of speed.

noexec report only, don't change any files. - No, default "false" + No, default to "false" output @@ -75,6 +75,11 @@ preferred over the checkout command, because of speed.

the file to direct standard error from the command. No, default error to ANT Log as MSG_WARN. + + append + whether to append output/error when redirecting to a file. + No, default to "false". + port Port used by CVS to communicate with the server. @@ -106,9 +111,9 @@ repository pointed to by the cvsRoot attribute, and stores the files in "${

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.

  <cvs command="update -A -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, +

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


Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.

diff --git a/src/main/org/apache/tools/ant/taskdefs/Cvs.java b/src/main/org/apache/tools/ant/taskdefs/Cvs.java index 04d348d98..068b4a558 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Cvs.java +++ b/src/main/org/apache/tools/ant/taskdefs/Cvs.java @@ -123,6 +123,9 @@ public class Cvs extends Task { */ private File dest; + /** whether or not to append stdout/stderr to existing files */ + private boolean append = false; + /** * the file to direct standard output from the command. */ @@ -201,7 +204,7 @@ public class Cvs extends Task { else { if (output != null) { try { - outputstream = new PrintStream(new BufferedOutputStream(new FileOutputStream(output))); + outputstream = new PrintStream(new BufferedOutputStream(new FileOutputStream(output.getPath(), append))); } catch (IOException e) { throw new BuildException(e, location); } @@ -211,7 +214,7 @@ public class Cvs extends Task { } if (error != null) { try { - errorstream = new PrintStream(new BufferedOutputStream(new FileOutputStream(error))); + errorstream = new PrintStream(new BufferedOutputStream(new FileOutputStream(error.getPath(), append))); } catch (IOException e) { throw new BuildException(e, location); } @@ -324,6 +327,10 @@ public class Cvs extends Task { this.error = error; } + public void setAppend(boolean value){ + this.append = value; + } + public void setFailOnError(boolean failOnError) { this.failOnError = failOnError; }