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.
-
1Why 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...khmarbaise– khmarbaise2011-12-12 16:29:50 +00:00Commented 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...priya– priya2011-12-12 16:41:42 +00:00Commented 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 advancepriya– priya2011-12-12 16:45:06 +00:00Commented 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/…Brian– Brian2014-04-30 17:46:55 +00:00Commented Apr 30, 2014 at 17:46
2 Answers
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.