Hello Will, the patch looks useful. can you create an issue in Bugzilla http://issues.apache.org/bugzilla and attach your patch to the issue.
Cheers, Antoine > Hi, this is my first attempt to submit a fix to a open source project. > I've search thru the archive but could not find anything related. Please > forgive me if I'm missing anything. > > I have a custom task (CvsMergeTask) extending AbstractCvsTask. It reads > thru the entries in changlog.xml (from ChangeLogTask) and generates a series > of cvs commands and insert them into vecCommandlines using > addConfiguredCommandline(Commandline). > > The problem was with output of the commands. When directing output of the > commands to a file using the "output" and "error" attributes, only the > output of the 1st command executed was redirected - the output from the rest > of the cvs commands are lost. The reason is because for each cvs commands > in vecCommandlines, runCommand(Commandline) is executed and outputStream and > errorStream are closed in the finally block in runCommand(Commandline). > Thus, right after runCommand(Commandline) is called for the 1st command in > vecCommandlines, the outputStream and errorStream are closed and never > re-opened, and therefore unavaliable to the subsequent commands when > runCommand(Commandline) is called. > > The solution I have is to moved the close() call of both outputStream and > errorStream to the finally block execute() method. (Patch attached). The > reason is that "only close the outputStream and errorStream after all > commands are executed." Let me know what you think! :) > > Thanks, > Will > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]