How do I not display the dialog on SVN Tortoise Commit?

若如初见. 提交于 2020-01-02 03:49:27

问题


I have a process that modifies some files and I would like to commit them via command line tortoise SVN without having to click ok. The dialog comes up and my script is forced to wait until I click ok. Here are the arguments I am using:

TortoiseProc.exe /command:commit /path:"c:\svn\MyProject" /notempfile /logmsg:"Files Modified 2010-02-12" /closeonend:3

回答1:


Like @bmargulies said, just use svn.exe:

cd "c:\svn\MyProject"
svn commit -m "Files Modified 2010-02-12"

You cannot hide the TortoiseProc.exe dialog on commit:

Important

Remember that TortoiseSVN is a GUI client, and this automation guide shows you how to make the TortoiseSVN dialogs appear to collect user input. If you want to write a script which requires no input, you should use the official Subversion command line client instead.

(from http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html)

If you're relying on TortoiseProc's /closeonend:3 behavior to alert you when there's an error, conflict, or merge, you'll need to switch on SVN's exit codes.
I couldn't find a list of return code values beyond "0 is success, not 0 is error" in a quick Google search, though.




回答2:


I recommend using svn.exe instead of TortoiseProc.exe. It will be much easier.



来源:https://stackoverflow.com/questions/2252872/how-do-i-not-display-the-dialog-on-svn-tortoise-commit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!