diff --git a/docs/manual/OptionalTasks/starteam.html b/docs/manual/OptionalTasks/starteam.html
index 6c531d2bb..76769a09e 100644
--- a/docs/manual/OptionalTasks/starteam.html
+++ b/docs/manual/OptionalTasks/starteam.html
@@ -14,11 +14,12 @@
-These tasks make use of functions from the StarTeam API. As a result
-they are only available to licensed users of StarTeam. You must have
+The StarTeam revision control system was recently acquired by Borland.
+These tasks make use of functions from the StarTeam API to work with that system.
+As a result they are only available to licensed users of StarTeam. You must have
starteam-sdk.jar
in your classpath to run these tasks.
For more information about the StarTeam API and how to license it, see
-the StarBase web site.
+the Borland web site.
@@ -166,6 +167,14 @@ false(default) means the checked out files will be timestamped at the time
of checkout. no |
+
+ preloadfileinformation |
+ The StarTeam server has the ability to preload file metadata for an
+ entire tree prior to beginning action on that tree. Doing so can in some instances
+ lead to substantially faster actions, particularly over large trees. Setting this
+ to "yes" (default) engages this functionality, setting it to "no" turns it off. |
+ yes |
+
@@ -348,7 +357,16 @@ that StarTeam is maintaining for the file. If false, checkins will use this sta
If true, file will be unlocked so that other users may
change it. If false (default) lock status will not change.
| no |
-
+
+
+ preloadfileinformation |
+ The StarTeam server has the ability to preload file metadata for an
+ entire tree prior to beginning action on that tree. Doing so can in some instances
+ lead to substantially faster actions, particularly over large trees. Setting this
+ to "yes" (default) engages this functionality, setting it to "no" turns it off. |
+ yes |
+
+
Examples
@@ -635,6 +653,15 @@ See also the required common StarTeam parameters.
no |
+
+
+ preloadfileinformation |
+ The StarTeam server has the ability to preload file metadata for an
+ entire tree prior to beginning action on that tree. Doing so can in some instances
+ lead to substantially faster actions, particularly over large trees. Setting this
+ to "yes" (default) engages this functionality, setting it to "no" turns it off. |
+ yes |
+
Examples
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
index bd003dbe7..3010427d3 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
@@ -55,6 +55,7 @@ package org.apache.tools.ant.taskdefs.optional.starteam;
import com.starbase.starteam.Folder;
import com.starbase.starteam.Label;
+import com.starbase.starteam.PropertyNames;
import com.starbase.starteam.StarTeamFinder;
import com.starbase.starteam.View;
import java.util.Hashtable;
@@ -64,7 +65,7 @@ import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
/**
- * FileBasedTask.java
+ * TreeBasedTask.java
* This abstract class is the base for any tasks that are tree-based, that
* is, for tasks which iterate over a tree of folders in StarTeam which
* is reflected in a tree of folder the local machine.
@@ -76,7 +77,7 @@ import org.apache.tools.ant.Project;
*
* Created: Sat Dec 15 16:55:19 2001
*
- * @author Steve Cohen
+ * @author Steve Cohen
* @version 1.0
* @see StarBase Web Site
*/
@@ -140,6 +141,12 @@ public abstract class TreeBasedTask extends StarTeamTask {
*/
private boolean recursive = true;
+ /**
+ * Set preloadFileInformation to true to load all file information from the server
+ * at once. Increases performance significantly for projects with many files and/or folders.
+ */
+ private boolean preloadFileInformation = true;
+
/**
* If forced set to true, files in the target directory will
* be processed regardless of status in the repository.
@@ -338,6 +345,25 @@ public abstract class TreeBasedTask extends StarTeamTask {
this.recursive = v;
}
+ /**
+ * Get the value of preloadFileInformation.
+ * @return value of preloadFileInformation.
+ */
+ public boolean isPreloadFileInformation() {
+ return this.preloadFileInformation;
+ }
+
+ /**
+ * Flag to set to preload file information from the server; optional,
+ * default true.
+ * Increases performance significantly for projects with many files
+ * and/or folders.
+ * @param v Value to assign to preloadFileInformation.
+ */
+ public void setPreloadFileInformation(boolean v) {
+ this.preloadFileInformation = v;
+ }
+
/**
* Get the value of forced.
* @return value of forced.
@@ -463,6 +489,19 @@ public abstract class TreeBasedTask extends StarTeamTask {
StarTeamFinder.findFolder(snapshot.getRootFolder(),
this.rootStarteamFolder);
+ if (this.isPreloadFileInformation()) {
+ PropertyNames pn = getServer().getPropertyNames();
+ String[] props = new String[] {pn.FILE_NAME, pn.FILE_PATH,
+ pn.FILE_STATUS, pn.MODIFIED_TIME,
+ pn.FILE_FILE_TIME_AT_CHECKIN,
+ pn.MODIFIED_USER_ID, pn.FILE_SIZE};
+
+ int depth = this.isRecursive() ? -1 : 0;
+ starteamrootfolder.populateNow(getServer().getTypeNames().FILE,
+ props, depth);
+ }
+
+
}
catch (BuildException e) {
throw e;
@@ -665,7 +704,7 @@ public abstract class TreeBasedTask extends StarTeamTask {
* whatever items left in the UnmatchedFileMap are uncontrolled items
* and can be processed as appropriate to the task. In the case of
* Checkouts, they can be optionally deleted from the local tree. In the
- * case of Checkins they can optionally be added to the resository.
+ * case of Checkins they can optionally be added to the repository.
*/
protected abstract class UnmatchedFileMap extends Hashtable {