ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam StarTeamCheckout.java
Date Fri, 02 May 2003 08:18:37 GMT
bodewig     2003/05/02 01:18:37

  Modified:    .        WHATSNEW
               docs/manual/OptionalTasks starteam.html
               src/main/org/apache/tools/ant/taskdefs/optional/starteam
                        StarTeamCheckout.java
  Log:
  Provide control over EOL conversion via a new attribute.
  
  PR: 18884
  Submitted by:	Steve Cohen <scohen at apache dot org>
                  Aaron DeForest <aaron underscore deforest at rosettabio dot com>
  
  Revision  Changes    Path
  1.407     +4 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.406
  retrieving revision 1.407
  diff -u -r1.406 -r1.407
  --- WHATSNEW	29 Apr 2003 13:16:22 -0000	1.406
  +++ WHATSNEW	2 May 2003 08:18:36 -0000	1.407
  @@ -279,6 +279,10 @@
   * <unzip> will now detect and successfully extract self-extracting
     archives.  Bugzilla Report 16213.
   
  +* <stcheckout> has a new attribute "converteol" that can be used to
  +  control the automatic line-end conversion performed on ASCII files.
  +  Bugzilla Report 18884.
  +
   Changes from Ant 1.5.2 to Ant 1.5.3
   ===================================
   
  
  
  
  1.19      +10 -0     ant/docs/manual/OptionalTasks/starteam.html
  
  Index: starteam.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/starteam.html,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- starteam.html	22 Apr 2003 07:35:15 -0000	1.18
  +++ starteam.html	2 May 2003 08:18:36 -0000	1.19
  @@ -176,6 +176,16 @@
       <td align="center" valign="top">yes</td>
     </tr>
       
  +  <tr>
  +    <td valign="top">convertEOL</td>
  +    <td valign="top">If true, (default) all ascii files will have their end-of-line

  +    characters adjusted to that of the local machine on checkout.  This is normally
  +    what you'd want but if for some reason you don't want that to happen, set it to false
  +    and the files will be checked out with whatever end-of-line characters are used on
  +    the server. </td>    
  +    <td align="center" valign="top">yes</td>
  +  </tr>
  +
   </table>
   
   <h3>Examples</h3>
  
  
  
  1.18      +28 -4     ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
  
  Index: StarTeamCheckout.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- StarTeamCheckout.java	18 Apr 2003 23:40:28 -0000	1.17
  +++ StarTeamCheckout.java	2 May 2003 08:18:36 -0000	1.18
  @@ -99,6 +99,14 @@
       private boolean deleteUncontrolled = true;
   
       /**
  +     * holder for the deleteUncontrolled attribute.  If true,
  +     * (default) local non-binary files will be checked out using the local 
  +     * platform's EOL convention.  If false, checkouts will preserve the
  +     * server's EOL convention.
  +     */
  +    private boolean convertEOL = true;
  +
  +    /**
        * flag (defaults to true) to create all directories
        * that are in the Starteam repository even if they are empty.
        *
  @@ -118,6 +126,16 @@
       }
   
       /**
  +     * Set whether or not files should be checked out using the
  +     * local machine's EOL convention.
  +     * Optional, defaults to <code>true</code>.
  +     * @param value  the value to set the attribute to.
  +     */
  +    public void setConvertEOL(boolean value) {
  +        this.convertEOL = value;
  +    }
  +    
  +    /**
        * Sets the label StarTeam is to use for checkout; defaults to the most recent file.
        * The label must exist in starteam or an exception will be thrown. 
        * @param label the label to be used
  @@ -277,7 +295,8 @@
               log("  Items will be checked out with Exclusive locks.");
           }
           else if (this.lockStatus == Item.LockType.UNLOCKED) {
  -            log("  Items will be checked out unlocked (even if presently locked).");
  +            log("  Items will be checked out unlocked "
  +                 +"(even if presently locked).");
           } 
           else {
               log("  Items will be checked out with no change in lock status.");
  @@ -291,9 +310,14 @@
           if (this.deleteUncontrolled) {
               log("  Local items not found in the repository will be deleted.");
           }
  +        log("  Items will be checked out " +
  +            (this.convertEOL 
  +             ? "using the local machine's EOL convention"
  +             : "without changing the EOL convention used on the server"));
           log("  Directories will be created"+
  -            (this.createDirs ? " wherever they exist in the repository, even if empty."

  -                             : " only where needed to check out files."));
  +            (this.createDirs 
  +             ? " wherever they exist in the repository, even if empty." 
  +             : " only where needed to check out files."));
           
       }
       /**
  @@ -520,7 +544,7 @@
                       }
                   }
                   eachFile.checkout(this.lockStatus, 
  -                                 !this.useRepositoryTimeStamp, true, true);
  +                                 !this.useRepositoryTimeStamp, this.convertEOL, true);
               }
           }
       }
  
  
  

Mime
View raw message