cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam TreeBasedTask.java
peterreilly2005/07/08 06:49:53 Modified:src/main/org/apache/tools/ant/taskdefs/optional/starteam TreeBasedTask.java Log: mostly javadoc Revision ChangesPath 1.29 +9 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java Index: TreeBasedTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- TreeBasedTask.java22 Nov 2004 09:23:35 - 1.28 +++ TreeBasedTask.java8 Jul 2005 13:49:53 - 1.29 @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -555,7 +555,7 @@ * @exception BuildException * if the root folder cannot be found in the repository */ -private final Folder configureRootStarteamFolder() +private Folder configureRootStarteamFolder() throws BuildException { Folder starteamrootfolder = null; try { @@ -622,7 +622,7 @@ * @return the local folder corresponding to the root Starteam folder. * @see findRootStarteamFolder */ -private final java.io.File getLocalRootMapping(Folder starteamrootfolder) { +private java.io.File getLocalRootMapping(Folder starteamrootfolder) { // set the local folder. String localrootfolder; if (null != this.rootLocalFolder) { @@ -722,6 +722,11 @@ return -1; } +/** + * Get the id of the label in use. + * @return id of the label in use, if labelinuse is present, + * otherwise return null + */ protected int getIDofLabelInUse() { if (null != this.labelInUse) { return this.labelInUse.getID(); @@ -738,7 +743,7 @@ * @param rootLocalFolder * the local mapping of rootStarteamFolder * - * @exception BuildException + * @throws BuildException on error */ protected abstract void visit(Folder rootStarteamFolder, java.io.File rootLocalFolder) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam TreeBasedTask.java
bodewig 2003/03/27 00:02:15 Modified:.WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/starteam TreeBasedTask.java Log: Make starteam checkout handle deleted labels correctly. PR: 17646 Submitted by: Brian Brooks brian dot brooks at metavante dot com Reviewed by: Steve Cohen Revision ChangesPath 1.371 +2 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.370 retrieving revision 1.371 diff -u -r1.370 -r1.371 --- WHATSNEW 25 Mar 2003 09:30:59 - 1.370 +++ WHATSNEW 27 Mar 2003 08:02:15 - 1.371 @@ -70,6 +70,8 @@ StringIndexOutOfBoundsException on all OSes where os.name is shorter than seven characters. Bugzilla Report 18105. +* starteam checkout can now handle deleted labels. Bugzilla Report 17646. + Other changes: -- * The filesetmanifest attribute of jar has been reenabled. 1.16 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java Index: TreeBasedTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- TreeBasedTask.java11 Feb 2003 11:57:27 - 1.15 +++ TreeBasedTask.java27 Mar 2003 08:02:15 - 1.16 @@ -566,7 +566,7 @@ for (int i = 0; i allLabels.length; i++) { Label stLabel = allLabels[i]; log(checking label + stLabel.getName(), Project.MSG_DEBUG); -if (stLabel.getName().equals(this.label)) { +if (stLabel != null !stLabel.isDeleted() stLabel.getName().equals(this.label)) { if (!stLabel.isRevisionLabel() !stLabel.isViewLabel()) { throw new BuildException(Unexpected label type.); }
Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam TreeBasedTask.java
On 27 Mar 2003, [EMAIL PROTECTED] wrote: log(checking label + stLabel.getName(), Project.MSG_DEBUG); - if (stLabel.getName().equals(this.label)) { + if (stLabel != null !stLabel.isDeleted() stLabel.getName().equals(this.label)) { given that the log line will have thrown a NPE if the first test in the if statement fails, it looks a bit redundant 8-) I've kept it in anyway. Stefan