Dawes
Dawes

Reputation:

Automate SVN Adds Using NAnt

I want to automate SVN adds using NAnt. I want to add to SVN all new files in a given directory. The NAnt script will successfully execute the add command, however it displays the Tortoise SVN add dialog and this is not acceptable because it will execute on a build server running CruiseControl. The build server is running Windows Server 2003.

Any ideas?

<target name="addtest">
    <exec program="c:\program files\tortoisesvn\bin\tortoiseproc.exe" 
        commandline="/command:add * --force /path:C:\svn\test /notempfile /closeonend:1"
        basedir="C:\svn\test"
        failonerror="false"/>
</target>

Upvotes: 3

Views: 4288

Answers (3)

Scott Saad
Scott Saad

Reputation: 18362

Instead of using the exec task, there is a svn task which is provided by the NAntContrib set of tasks/tools.

<svn command="add" ... />

Of course doing this probably requires the command line version of subversion, so doing an exec on svn.exe is probably just as good.

<exec program="svn.exe" commandline="add..." />

Upvotes: 7

Sunny Milenov
Sunny Milenov

Reputation: 22310

Don't use tortoisesvn. Get a commandline svn client.

Upvotes: 5

Ben Scheirman
Ben Scheirman

Reputation: 40951

don't use tortoise!

just drop to command line svn.

c:\>svn add ...

Upvotes: 1

Related Questions