8

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?

2
  • Why do you need to run that hook script on client side ? What would you like to achieve? Commented Dec 13, 2011 at 14:29
  • @khmarbaise I also want to know how to execute hook script on client side. I want to install a pre-commit hook to check my commit however I don't have the permission to install the script on the svn server. Based on the answers I can use TortoiseSVN to do this. Commented May 25, 2016 at 1:50

2 Answers 2

7

Create a script file that is an alias for the svn command if you are using the command-line as this post suggests: https://web.archive.org/web/20221127195259/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.

Sign up to request clarification or add additional context in comments.

2 Comments

Please don't link to external solutions since they can disappear. This is now 404!
5

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 Comments

How does TortoiseSVN implement client-side hooks? I'm just thinking that if TortoiseSVN does it, it is possible in another way, even if this "other way" is to copy the exact code TortoiseSVN uses. That would make this answer technically invalid, by a technical technicality.
@trysis Since Tortoise SVN is the one that ultimately runs the svn commit command, I guess it simply runs any pre-commit "hooks" you have defined, and then decides, depending on the result, whether the commit has to be performed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.