Check if SVN checkout with SVNANT was successful or failed

345 Views Asked by At

I am not able to use something similar to resultproperty="checkout.res" while checkout from SVNANT, which can used in "exec".

Below is the snippet of my ant build file.

<target name="SVNCheckout">
  <svn username="${svn.username}" password="${svn.password}" failonerror="true" resultproperty="checkout.res" >
    <checkout url="${svn.base.url}/myproject" revision="HEAD" destPath="../../../../stubswds" />
  </svn>
</target>

Getting error as below :

Buildfile: /home/Workspace/Checkout/src/main/resources/buildandcheckout.xml
SVNCheckout:

BUILD FAILED
/home/Workspace/Checkout/src/main/resources/buildandcheckout.xml:113: svn doesn't support the "resultproperty" attribute

Total time: 1 second
1

There are 1 best solutions below

0
On

You can use the status task in svnAnt to assign the property name for the appropriate type. In your case, going on scant information, I'd imagine the line might be:

<status 
    path="foo"
    textStatusProperty="checkout.res"/>

From the page, I'd check for a value of incomplete if the svnant call didn't finish appropriately.