2014-09-29 39 views
0

我已經創建瞭如下的批處理文件籤bat文件:SVN錯誤

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 

當我運行這個文件,我得到以下錯誤:

Try svn help checkout for more information.

Not enough arguments provided.

我不知道哪些參數由於svn結帳的定義缺少說:

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

並根據這我的語法是正確的。

回答

3

Don't put spaces around the equal sign當使用set時。這將工作:

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% 

此外,如果你需要調試這一點,只是把echo的命令之前,你要執行:

echo %SVNExe% checkout %SVNURL% %checkOutLocation% 

有了您的原始文件,它輸出:

checkout 

與固定版本(沒有空格),其輸出:

"C:\Program Files\TortoiseSVN\bin\svn.exe" checkout "https://server.local/svn/MyProject/" "E:\Projects\MyProject"