In my build process, I need to checkout various modules into differently
named directories. The current version of the Cvs task doesn't do this
but this patch should allow this functionality.
josh
Index: Cvs.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Cvs.java,v
retrieving revision 1.12
diff -u -r1.12 Cvs.java
--- Cvs.java 2000/10/06 07:40:16 1.12
+++ Cvs.java 2000/11/04 03:15:15
@@ -110,6 +110,12 @@
*/
private File error;
+ /**
+ * the directory name which the working copy will be named
+ */
+ private String destDirName;
+
+
public void execute() throws BuildException {
// XXX: we should use JCVS (www.ice.com/JCVS) instead of command line
@@ -130,8 +136,14 @@
}
if (quiet) {
toExecute.createArgument().setValue("-q");
+ }
+ if ( (destDirName != null) && (command.equals("checkout")) ) {
+ toExecute.createArgument().setValue(command);
+ toExecute.createArgument().setValue("-d");
+ toExecute.createArgument().setValue(destDirName);
}
- toExecute.createArgument().setLine(command);
+ else
+ toExecute.createArgument().setLine(command);
toExecute.addArguments(cmd.getCommandline());
if (pack != null) {
@@ -247,6 +259,10 @@
public void setError(File error) {
this.error = error;
+ }
+
+ public void setDestDirName(String d) {
+ this.destDirName = d;
}
}