ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiqi Gao <weiqi....@nisc.cc>
Subject [Patch] Re: StarTeam checkout task behavior changes between 1.5.1 and 1.5.3
Date Tue, 08 Jul 2003 21:58:24 GMT
Weiqi Gao wrote:
> 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.

Mime
View raw message