ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian M. Savage" <jsav...@fisci.com>
Subject Re: [PATCH] Cvs task: adding co -d functionality
Date Mon, 06 Nov 2000 01:54:00 GMT
I discovered that you can actually pass any options to the cvs command
directly, so your patch isn't really necessary (although perhaps if the cvs
task itself were better documented/more intuitive you would have realised
this).

<cvs command="update -d"/>

Would probably work.

Julian.
----- Original Message -----
From: "Josh Lucas" <josh@stonecottage.com>
To: <ant-dev@jakarta.apache.org>
Sent: Saturday, November 04, 2000 12:20 PM
Subject: [PATCH] Cvs task: adding co -d functionality


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


Mime
View raw message