ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs Pvcs.java
Date Mon, 20 Jan 2003 12:42:42 GMT
conor       2003/01/20 04:42:42

  Modified:    .        Tag: ANT_15_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/optional/pvcs Tag:
                        ANT_15_BRANCH Pvcs.java
  Log:
  Merge from HEAD
  
  PR:	3219
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.263.2.114 +2 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.263.2.113
  retrieving revision 1.263.2.114
  diff -u -w -u -r1.263.2.113 -r1.263.2.114
  --- WHATSNEW	20 Jan 2003 08:20:43 -0000	1.263.2.113
  +++ WHATSNEW	20 Jan 2003 12:42:42 -0000	1.263.2.114
  @@ -65,6 +65,8 @@
   
   * <jar update="true"> would remove the original manifest.
   
  +* fix up folder creation in PVCS task
  +
   Other changes:
   --------------
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.14.2.5  +36 -32    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
  
  Index: Pvcs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java,v
  retrieving revision 1.14.2.4
  retrieving revision 1.14.2.5
  diff -u -w -u -r1.14.2.4 -r1.14.2.5
  --- Pvcs.java	4 Jul 2002 11:36:51 -0000	1.14.2.4
  +++ Pvcs.java	20 Jan 2003 12:42:42 -0000	1.14.2.5
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -53,26 +53,26 @@
    */
   package org.apache.tools.ant.taskdefs.optional.pvcs;
   
  +import java.io.BufferedReader;
  +import java.io.BufferedWriter;
   import java.io.File;
  -import java.io.FileOutputStream;
  -import java.io.IOException;
   import java.io.FileNotFoundException;
  -import java.io.BufferedReader;
  +import java.io.FileOutputStream;
   import java.io.FileReader;
  -import java.io.BufferedWriter;
   import java.io.FileWriter;
  -import java.util.Enumeration;
  -import java.util.Vector;
  -import java.text.ParseException;
  +import java.io.IOException;
   import java.text.MessageFormat;
  +import java.text.ParseException;
  +import java.util.Enumeration;
   import java.util.Random;
  +import java.util.Vector;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.Execute;
  +import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
   import org.apache.tools.ant.taskdefs.LogOutputStream;
   import org.apache.tools.ant.taskdefs.LogStreamHandler;
   import org.apache.tools.ant.taskdefs.PumpStreamHandler;
  -import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
   import org.apache.tools.ant.types.Commandline;
   
   /**
  @@ -122,10 +122,10 @@
        */
       private static final String PCLI_EXE = "pcli";
   
  -    /**
  +    /*
        * Constant for the PCLI listversionedfiles recursive i a format "get" understands
        */
  -    private static final String PCLI_LVF_ARGS = "lvf -z -aw";
  +    // private static final String PCLI_LVF_ARGS = "lvf -z -aw";
   
       /**
        * Constant for the thing to execute
  @@ -144,7 +144,7 @@
           } catch (java.io.IOException e) {
               String msg = "Failed executing: " + cmd.toString() 
                   + ". Exception: " + e.getMessage();
  -            throw new BuildException(msg, location);
  +            throw new BuildException(msg, getLocation());
           }
       }
   
  @@ -164,7 +164,6 @@
        * @exception org.apache.tools.ant.BuildException Something is stopping the build...
        */
       public void execute() throws org.apache.tools.ant.BuildException {
  -        Project aProj = getProject();
           int result = 0;
   
           if (repository == null || repository.trim().equals("")) {
  @@ -231,7 +230,7 @@
               
               if (result != 0 && !ignorerc) {
                   String msg = "Failed executing: " + commandLine.toString();
  -                throw new BuildException(msg, location);
  +                throw new BuildException(msg, getLocation());
               }
   
               if (!tmp.exists()) {
  @@ -278,21 +277,21 @@
               if (result != 0 && !ignorerc) {
                   String msg = "Failed executing: " + commandLine.toString() 
                       + ". Return code was " + result;
  -                throw new BuildException(msg, location);
  +                throw new BuildException(msg, getLocation());
               }
   
           } catch (FileNotFoundException e) {
               String msg = "Failed executing: " + commandLine.toString() 
                   + ". Exception: " + e.getMessage();
  -            throw new BuildException(msg, location);
  +            throw new BuildException(msg, getLocation());
           } catch (IOException e) {
               String msg = "Failed executing: " + commandLine.toString() 
                   + ". Exception: " + e.getMessage();
  -            throw new BuildException(msg, location);
  +            throw new BuildException(msg, getLocation());
           } catch (ParseException e) {
               String msg = "Failed executing: " + commandLine.toString() 
                   + ". Exception: " + e.getMessage();
  -            throw new BuildException(msg, location);
  +            throw new BuildException(msg, getLocation());
           } finally {
               if (tmp != null) {
                   tmp.delete();
  @@ -316,7 +315,11 @@
                   log("Considering \"" + line + "\"", Project.MSG_VERBOSE);
                   if (line.startsWith("\"\\") ||
                       line.startsWith("\"/") ||
  -                    line.startsWith(getLineStart())) {
  +                    (line.length() >3 &&
  +                     line.startsWith("\"") &&
  +                     Character.isLetter(line.charAt(1)) &&
  +                     String.valueOf(line.charAt(2)).equals(":") &&
  +                     String.valueOf(line.charAt(3)).equals("\\"))) {
                       Object[] objs = mf.parse(line);
                       String f = (String) objs[1];
                       // Extract the name of the directory from the filename
  @@ -637,3 +640,4 @@
           filenameFormat = "{0}-arc({1})";
       }
   }
  +
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message