views:

141

answers:

2

I thought this would be a simple task, but I'm currently unable to get it to work. There are built in functions such as <svn-update> etc. But not for revert it seems?

I have tried using the following but get an error that I have no supplied enough parameters.

<svn command="revert" destination="${root}" uri="${build.repos}" username="${build.user}" password="${build.pwd}"></svn>

Any help would be appreciated. Thanks.

A: 

There is a generic svn command where you can specify any command including revert:

<svn command="revert" ... />
Superfilin
That is the one I have tried and noted in my question, but it seems to not be working? Can't seem to find any documentation that indicates what parameters I need to pass.
Adam Cobb
1) What exception/error do you get back? 2) Here is the link for documentation: http://nantcontrib.sourceforge.net/release/0.85-rc2/help/tasks/svn.html
Superfilin
"svn: Not enough arguments provided"I had previously found that documentation, thanks. But it only contains generic information for the SVN task, not it's usage for each command, i.e. revert.
Adam Cobb
This seems to be coming from SVN itself, not from the NANT task.
Superfilin
Which SVN version do you use?
Superfilin
Have you tried executing command line version of SVN to revert?
Superfilin
Using version 1.5 of subversion. Revert from the command line works fine.
Adam Cobb
+1  A: 

Got it working by using the following -

<svn command="revert" destination="${root}" uri="${build.repos}" username="${build.user}" password="${build.pwd}">
    <arg line="-R"/>
    <arg line="revert"/>
    <arg line="${root}"/>
</svn>
Adam Cobb