问题
I am working on a SVN project, and I need to execute my pre-commit hook script from the client side. Is there any way to execute them?
回答1:
The only possible solution is to use TortoiseSVN which has the opportunity to execute special Hook Script (only from TortoiseSVN) on the client side. Otherwise it's not possible to run Hook Scripts, cause they run allways on the server side.
回答2:
Create a script file that is an alias for the svn
command if you are using the command-line as this post suggests: http://top-frog.com/2009/04/23/client-side-pre-and-post-svn-hooks-with-unix-aliases/
You just need to put the directory containing the script file in your system's path environment variable before the directory containing the SVN executable.
来源:https://stackoverflow.com/questions/8484611/hook-script-execution-on-client-side