1

I am working witn an SVN project. Could anyone state the ways to execute an SVN pre-commit hook script using Cygwin with detailed procedures? Thank you in advance.

4
  • 1
    Why would you like to run the script under cygwin instead under windows batch/command ? That will make things more complicated than they are...In a HookScript there is no envrionment set... Commented Dec 12, 2011 at 16:29
  • i need to execute my hook script ,but i don't have rights to access server .is there any way to execute my script... Commented Dec 12, 2011 at 16:41
  • i have to execute an pre-commit hook script that i have modified ,could u tell me how to do it from client side....thanku in advance Commented Dec 12, 2011 at 16:45
  • TortoiseSVN has support for client side hooks - keep in mind that this is just your client (not the SVN Server): tortoisesvn.net/docs/release/TortoiseSVN_en/… Commented Apr 30, 2014 at 17:46

2 Answers 2

1

The is no possibility to run a SVN Hook on client side. SVN Hooks are intentially created to run only on the server side.

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

Comments

0

Some Subversion clients, like TortoiseSVN have hooks that can be executed upon checkout or commit, but this is not a standard Subversion client thing. The command line client has no such behavior.

Hook scripts are executed by the server and are stored on the server. If you have no access to the server, you can't create and execute a hook script. Other restrictions on hook scripts include being unable to modify a transaction being committed.

So, what are you trying to do with hooks? There maybe ways around your dilemma. For example, you could create aliases to the Subversion svn command itself. Your alias would run a script that could see what type of Subversion command the user wanted to run, then either run the required hook (if the command is svn commit, or simply pass the command through to the real svn command.

For your purposes, that would be like a private hook script just for you.

Comments

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.