ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/proposal/sandbox/clearcase/src/main/org/apache/tools/ant/taskdefs/optional/clearcase CCUtils.java
Date Mon, 17 Jun 2002 14:22:01 GMT
sbailliez    2002/06/17 07:22:01

  Modified:    proposal/sandbox/clearcase/src/main/org/apache/tools/ant/taskdefs/optional/clearcase
                        CCUtils.java
  Log:
  Add mkdir feature (no comment only)
  
  Revision  Changes    Path
  1.3       +14 -3     jakarta-ant/proposal/sandbox/clearcase/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUtils.java
  
  Index: CCUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/clearcase/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCUtils.java	11 Jan 2002 20:49:37 -0000	1.2
  +++ CCUtils.java	17 Jun 2002 14:22:01 -0000	1.3
  @@ -67,7 +67,6 @@
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.util.regexp.RegexpMatcher;
   import org.apache.tools.ant.util.regexp.RegexpMatcherFactory;
  -import org.apache.tools.ant.util.StringUtils;
   import org.apache.tools.ant.util.FileUtils;
   import org.apache.tools.ant.taskdefs.Execute;
   import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
  @@ -117,7 +116,7 @@
        * @return the resolved link if it is a symbolic link, otherwise
        * return the original link.
        */
  -    public File resolveSymbolicLink(File toresolve) throws Exception {
  +    public File resolveSymbolicLink(File toresolve) throws BuildException {
           String[] args = { "ls", "-l", toresolve.getAbsolutePath() };
           CmdResult res = cleartool(args);
           if (res.getStatus() != 0 ){
  @@ -139,7 +138,7 @@
       /**
        * Move a file to another. (ie rename)
        */
  -    public void move(File from, File to) throws Exception {
  +    public void move(File from, File to) throws BuildException {
           String[] args = {"move", "-nc", from.getPath(), to.getPath()};
           CmdResult res = cleartool(args);
           if (res.getStatus() != 0) {
  @@ -238,6 +237,18 @@
   
       public void uncheckout(File file){
           String[] args = {"unco", "-rm", file.getAbsolutePath() };
  +        CmdResult res = cleartool(args);
  +        if (res.getStatus() != 0){
  +            throw new BuildException(res.getStdErr());
  +        }
  +    }
  +
  +    public void mkdir(File file, String comment) {
  +
  +    }
  +
  +    public void mkdir(File file){
  +        String[] args = {"mkdir", "-nc", file.getAbsolutePath() };
           CmdResult res = cleartool(args);
           if (res.getStatus() != 0){
               throw new BuildException(res.getStdErr());
  
  
  

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