I've decided to break backwards compatibility with the way I've overridden runS. The "proper" way would have been to call the one-arg version from the two-arg version so that subclasses overriding runS would still get their method called. But I figured it to be extremely unlikely that such subclasses exist.master
@@ -1,6 +1,13 @@ | |||||
Changes from Ant 1.9.13 TO Ant 1.9.14 | Changes from Ant 1.9.13 TO Ant 1.9.14 | ||||
===================================== | ===================================== | ||||
Changes that could break older environments: | |||||
------------------------------------------- | |||||
* ClearCase#runS has been augmented by a two arg-version and the | |||||
one-arg version will no longer be called. This may affect | |||||
subclasses that have overridden runS. | |||||
Fixed bugs: | Fixed bugs: | ||||
----------- | ----------- | ||||
@@ -16,6 +23,10 @@ Fixed bugs: | |||||
an incorrect compression level for a zip entry. This is now fixed. | an incorrect compression level for a zip entry. This is now fixed. | ||||
Bugzilla Report 62686 | Bugzilla Report 62686 | ||||
* cccheckout would ignore an error of the "ls checkout" command even | |||||
if failOnError was set to false. | |||||
Bugzilla Report 63071 | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
* generatekey task now supports SubjectAlternativeName during key | * generatekey task now supports SubjectAlternativeName during key | ||||
@@ -168,7 +168,7 @@ public class CCCheckout extends ClearCase { | |||||
// viewpath | // viewpath | ||||
cmdl.createArgument().setValue(getViewPath()); | cmdl.createArgument().setValue(getViewPath()); | ||||
result = runS(cmdl); | |||||
result = runS(cmdl, getFailOnErr()); | |||||
// System.out.println( "lsCheckout: " + result ); | // System.out.println( "lsCheckout: " + result ); | ||||
@@ -144,8 +144,21 @@ public abstract class ClearCase extends Task { | |||||
* Execute the given command, and return it's output | * Execute the given command, and return it's output | ||||
* @param cmdline command line to execute | * @param cmdline command line to execute | ||||
* @return output of the command line | * @return output of the command line | ||||
* @deprecated use the two arg version instead | |||||
*/ | */ | ||||
@Deprecated | |||||
protected String runS(Commandline cmdline) { | protected String runS(Commandline cmdline) { | ||||
return runS(cmdline, false); | |||||
} | |||||
/** | |||||
* Execute the given command, and return it's output | |||||
* @param cmdline command line to execute | |||||
* @param failOnError whether to fail the build if the command fails | |||||
* @return output of the command line | |||||
* @since Ant 1.9.14 | |||||
*/ | |||||
protected String runS(Commandline cmdline, boolean failOnError) { | |||||
String outV = "opts.cc.runS.output" + pcnt++; | String outV = "opts.cc.runS.output" + pcnt++; | ||||
ExecTask exe = new ExecTask(this); | ExecTask exe = new ExecTask(this); | ||||
Commandline.Argument arg = exe.createArg(); | Commandline.Argument arg = exe.createArg(); | ||||
@@ -153,6 +166,7 @@ public abstract class ClearCase extends Task { | |||||
exe.setExecutable(cmdline.getExecutable()); | exe.setExecutable(cmdline.getExecutable()); | ||||
arg.setLine(Commandline.toString(cmdline.getArguments())); | arg.setLine(Commandline.toString(cmdline.getArguments())); | ||||
exe.setOutputproperty(outV); | exe.setOutputproperty(outV); | ||||
exe.setFailonerror(failOnError); | |||||
exe.execute(); | exe.execute(); | ||||
return getProject().getProperty(outV); | return getProject().getProperty(outV); | ||||