0

I have created a batch file as below:

set SVNExe = "C:\Program Files\TortoiseSVN\bin\svn.exe"
set SVNURL = "https://server.local/svn/MyProject/"
set CheckOutLocation = "E:\Projects\MyProject"
%SVNExe% checkout %SVNURL% %checkOutLocation%
@pause

When I run this file, I get the following error:

Try svn help checkout for more information.

Not enough arguments provided.

I don't know which arguments are missing as the definition of svn checkout says:

svn checkout URL[@REV]... [PATH]

And per this my syntax is correct.

Community
  • 1
  • 1
pratik
  • 4,419
  • 8
  • 41
  • 65

1 Answers1

3

Don't put spaces around the equal sign when using set. This will work:

set SVNExe="C:\Program Files\TortoiseSVN\bin\svn.exe" 
set SVNURL="https://server.local/svn/MyProject/" 
set CheckOutLocation="E:\Projects\MyProject" 
%SVNExe% checkout %SVNURL% %checkOutLocation%

Also if you need to debug this, just put echo before the command you're trying to execute:

echo %SVNExe% checkout %SVNURL% %checkOutLocation%

With your original file, it outputs:

 checkout  

With the fixed version (no spaces), it outputs:

"C:\Program Files\TortoiseSVN\bin\svn.exe"  checkout "https://server.local/svn/MyProject/"  "E:\Projects\MyProject"
Community
  • 1
  • 1
Patrick Quirk
  • 23,334
  • 2
  • 57
  • 88