views:

1538

answers:

3

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>
A: 

don't use tortoise!

just drop to command line svn.

c:\>svn add ...
Ben Scheirman
+5  A: 

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

Sunny
If you just want to add a link to an existing answer, then add a comment. Your answer is duplicating what was already posted.
Ben Scheirman
Ben, Sunny posted before you.
Alphager
+5  A: 

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..." />
Scott Saad