Hi,
I have observed some behavioral changed of the StarTeam checkout task stcheckout between Ant 1.5.1 and Ant 1.5.3.
I'm using the task this way: <target name="checkout"> <stcheckout username="me" password="mysecret" url="myserver:49201/myproject/myproject" rootstarteamfolder="java" createworkingdirs="true" includes="*" excludes="*Src.jar" deleteuncontrolled="true"/> </target>
I switched from using Ant 1.5.1 to Ant 1.5.3 last week, and experienced two changes of behavior:
1. An empty set of working directories is created in the directory where I run the build. Although the actual checked out files are in the correct place (the StarTeam default working folder as setup in the StarTeam GUI).
2. The stcheckout task doesn't seem to delete all the files that are NOT in StarTeam anymore, even though I have set deleteuncontolled to true.
Both were working properly in Ant 1.5.1 but not in 1.5.3.
We are using StarTeam 5.2.118 and the StarGate Runtime 5.2.
I have tracked it down to this line of code in org.apache.tools.ant.tasfdef.optional.starteam.TreeBasedTask.getLocalRootMapping(Folder starteamrootfolder):
localrootfolder = starteamrootfolder.getPathFragment();
On my system, this returns the final portion of my starteamrootfolder rather than the full path of the default working folder, which was what we want.
For my build file, I have
starteamroolfolder="aaaa/bbbb/cccc"
and the localrootfolder gets set to "cccc" after this line.The correct value should be "C:/myproject/aaaa/bbbb/cccc", which can be gotten by calling getPath() instead of getPathFragment() on starteanrootfolder.
A patch is attached.
--- TreeBasedTask.java.orig 2003-07-08 16:22:10.000000000 -0500
+++ TreeBasedTask.java 2003-07-08 16:50:27.000000000 -0500
@@ -545,7 +545,7 @@
else {
// either use default path or root local mapping,
// which is now embedded in the root folder
- localrootfolder = starteamrootfolder.getPathFragment();
+ localrootfolder = starteamrootfolder.getPath();
}
return new java.io.File(localrootfolder);
2003-07-08 Weiqi Gao <[EMAIL PROTECTED]>
* Fixed a bug in the StarTeam optional tasks that caused them to
be unable to find the correct local root folder.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
