bodewig     2005/02/16 04:44:57

  Modified:    proposal/sandbox/svn/src/main/org/apache/tools/ant/taskdefs/svn
                        AbstractSvnTask.java
               proposal/sandbox/svn/docs svn.html
  Log:
  Add some more common attributes
  
  Revision  Changes    Path
  1.3       +105 -0    
ant/proposal/sandbox/svn/src/main/org/apache/tools/ant/taskdefs/svn/AbstractSvnTask.java
  
  Index: AbstractSvnTask.java
  ===================================================================
  RCS file: 
/home/cvs/ant/proposal/sandbox/svn/src/main/org/apache/tools/ant/taskdefs/svn/AbstractSvnTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractSvnTask.java      14 Feb 2005 13:28:33 -0000      1.2
  +++ AbstractSvnTask.java      16 Feb 2005 12:44:57 -0000      1.3
  @@ -104,6 +104,29 @@
       private boolean failOnError = false;
   
       /**
  +     * Uses the contents of the file passed as an argument to this
  +     * switch for the specified subcommand.
  +     */
  +    private File file;
  +
  +    /**
  +     * Forces a particular command or operation to run.
  +     */
  +    private boolean force;
  +
  +    /**
  +     * Makes a subcommand recurse into subdirectories. 
  +     */
  +    private Boolean recursive = null;
  +
  +    /**
  +     * Tells Subversion to get the list of files that you wish to
  +     * operate on from the filename you provide instead of listing all
  +     * the files on the command line.
  +     */
  +    private File targets;
  +
  +    /**
        * Create accessors for the following, to allow different handling of
        * the output.
        */
  @@ -427,6 +450,70 @@
       }
   
       /**
  +     * Uses the contents of the file passed as an argument to this
  +     * switch for the specified subcommand.
  +     */
  +    public void setFile(File file) {
  +        this.file = file;
  +    }
  +
  +    /**
  +     * Uses the contents of the file passed as an argument to this
  +     * switch for the specified subcommand.
  +     */
  +    public File getFile() {
  +        return file;
  +    }
  +
  +    /**
  +     * Forces a particular command or operation to run.
  +     */
  +    public void setForce(boolean force) {
  +        this.force = force;
  +    }
  +
  +    /**
  +     * Forces a particular command or operation to run.
  +     */
  +    public boolean getForce() {
  +        return force;
  +    }
  +
  +    /**
  +     * Makes a subcommand recurse into subdirectories. Most
  +     * subcommands recurse by default.
  +     */
  +    public void setRecursive(Boolean recursive) {
  +        this.recursive = recursive;
  +    }
  +
  +    /**
  +     * Makes a subcommand recurse into subdirectories. Most
  +     * subcommands recurse by default.
  +     */
  +    public Boolean getRecursive() {
  +        return recursive;
  +    }
  +
  +    /**
  +     * Tells Subversion to get the list of files that you wish to
  +     * operate on from the filename you provide instead of listing all
  +     * the files on the command line.
  +     */
  +    public void setTargets(File targets) {
  +        this.targets = targets;
  +    }
  +
  +    /**
  +     * Tells Subversion to get the list of files that you wish to
  +     * operate on from the filename you provide instead of listing all
  +     * the files on the command line.
  +     */
  +    public File getTargets() {
  +        return targets;
  +    }
  +
  +    /**
        * This needs to be public to allow configuration
        *      of commands externally.
        * @param arg command argument
  @@ -554,6 +641,24 @@
           if (dryrun) {
               c.createArgument(true).setValue("--dry-run");
           }
  +        if (file != null) {
  +            c.createArgument(true).setValue("--file");
  +            c.createArgument(true).setFile(file);
  +        }
  +        if (force) {
  +            c.createArgument(true).setValue("--force");
  +        }
  +        if (recursive != null) {
  +            if (recursive.booleanValue()) {
  +                c.createArgument(true).setValue("--recursive");
  +            } else {
  +                c.createArgument(true).setValue("--non-recursive");
  +            }
  +        }
  +        if (targets != null) {
  +            c.createArgument(true).setValue("--targets");
  +            c.createArgument(true).setFile(targets);
  +        }
       }
   
       /**
  
  
  
  1.3       +24 -0     ant/proposal/sandbox/svn/docs/svn.html
  
  Index: svn.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/svn/docs/svn.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svn.html  15 Feb 2005 11:14:13 -0000      1.2
  +++ svn.html  16 Feb 2005 12:44:57 -0000      1.3
  @@ -61,6 +61,30 @@
       <td align="center" valign="top">No, default to &quot;false&quot;</td>
     </tr>
     <tr>
  +    <td valign="top">file</td>
  +    <td valign="top">Uses the contents of the file passed as an
  +    argument to this switch for the specified subcommand.</td>
  +    <td align="center" valign="top">No.</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">force</td>
  +    <td valign="top">Forces a particular command or operation to run.</td>
  +    <td align="center" valign="top">No, defaults to false.</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">recursive</td>
  +    <td valign="top">Makes a subcommand recurse into
  +    subdirectories. Most subcommands recurse by default.</td>
  +    <td align="center" valign="top">No.</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">targets</td>
  +    <td valign="top">Tells Subversion to get the list of files that you wish 
to
  +     operate on from the filename you provide instead of listing all
  +     the files on the command line.</td>
  +    <td align="center" valign="top">No.</td>
  +  </tr>
  +  <tr>
       <td valign="top">output</td>
       <td valign="top">the file to direct standard output from the 
command.</td>
       <td align="center" valign="top">No, default output to ANT Log as 
<code>MSG_INFO</code>.</td>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to