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 @@
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.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; }