[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-users] scope of revisionProperty from status in svn-ant task

From: Douglas Russell <douglas.russell_at_comlab.ox.ac.uk>
Date: 2006-10-18 19:34:44 CEST

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 srcUrl="https://myserver/svn/repos/connectfour/trunk"
                destUrl="https://myserver/svn/repos/connectfour/branch-${branch-number}"
                message="Branch-${branch-number} created" />

        <checkout url=""https://myserver/svn/repos/connectfour/trunk"
                destPath="connectfour" />
                        
        <status path="connectfour/README.txt" revisionProperty="status.revision" />
<propset path="connectfour" name="subclipse:tags"
value="${status.revision},connectfour-${branch-number},/connectfour-${branch-number},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 srcUrl="https://myserver/svn/repos/connectfour/trunk"
                destUrl="https://myserver/svn/repos/connectfour/branch-${branch-number}"
                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-number},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.uk

  • application/pgp-signature attachment: stored
Received on Wed Oct 18 19:34:58 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.