RE: [Subclipse-users] scope of revisionProperty from status in svn-ant task
From: Greg Irvine <greg.irvine_at_thalesatm.com>
Date: 2006-10-19 00:25:34 CEST
Should be. "update" not "second", sorry, missed changing that when I changed
<antcall target="update"/>
Confidentiality Notice: This e-mail may contain confidential and/or
_____
From: Greg Irvine [mailto:greg.irvine@thalesatm.com]
Hi Douglas.
Disclaimer: I learned this from the ant user lists so I had exactly the same
This is an issue with ant property visibility. It has nothing to do with
A property is usually only visible within the "target" it was created a-la a
However, if multiple targets are used in the starting call to ant, then all
Given the ant script:
<target name="build">
<antcall target="second"/>
<echo>${repos.version}</echo> <!-- will display blank! -->
</target>
<target name="update">
<svn .... property="repos.version"/>
</target>
If you instigate ant with "ant build", then repos.version is ONLY visible
However, if you instigate ant with "ant update build", then repos.revision
I had to change my starting scripts (in cruise control) to call "update
Hope it helps.
Regards,
Greg.
Confidentiality Notice: This e-mail may contain confidential and/or
-----Original Message-----
I wish to set an ant property with the number of the revision so I can later
use it in a propset. Weirdly, the scope of the variable only seems to be
_outside_ the <svn> element.
<svn username="user1" password="user1password" javahl="true">
<copy
message="Branch-${branch-number} created" />
<checkout url=""https://myserver/svn/repos/connectfour/trunk"
destPath="connectfour" />
<status path="connectfour/README.txt"
<propset path="connectfour" name="subclipse:tags"
value="${status.revision},connectfour-${branch-number},/connectfour-${branch
...
</svn>
<echo message="Status Revision: ${status.revision}" />
Now, in the propset, the ${status.revision} is evaluated as an empty string,
but once the echo is reached, the number is output. I then suspected this
weird inverse scope problem and changed the script to:
<svn username="user1" password="user1password" javahl="true">
<copy
message="Branch-${branch-number} created" />
<checkout url=""https://myserver/svn/repos/connectfour/trunk"
destPath="connectfour" />
<status path="connectfour" revisionProperty="status.revision" />
</svn>
<svn username="user1" password="user1password" javahl="true">
<propset path="connectfour" name="subclipse:tags"
value="${status.revision},connectfour-${branch-number},/connectfour-${branch
...
</svn>
<echo message="Status Revision: ${status.revision}" />
and in that case, the variable in the second svn block in propset get read
perfectly.
That seems....odd, to say the least. Any ideas? This seems like a bug to me.
CCing replies to me would be great, I promise, on my third svn ant problem
I'll join the list. :-)
Cheers.
Douglas
-- Douglas PW Russell Research Officer / Systems Administrator - GIMI Research Officer / Systems Administrator - NeuroGrid Oxford University Computing Laboratory Tel: +44 (0)1865 283519 email: douglas.russell@comlab.ox.ac.ukReceived on Thu Oct 19 00:28:09 2006 |
This is an archived mail posted to the Subclipse Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.