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.

bahrep
  • 29,961
  • 12
  • 103
  • 150
priya
  • 115
  • 2
  • 9
  • 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... – khmarbaise Dec 12 '11 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 Dec 12 '11 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 – priya Dec 12 '11 at 16:45
  • TortoiseSVN has support for client side hooks - keep in mind that this is just your client (not the SVN Server): http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks – Brian Apr 30 '14 at 17:46

2 Answers2

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.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
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.

David W.
  • 105,218
  • 39
  • 216
  • 337