Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hook script execution on client side

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?

like image 394
priya Avatar asked Dec 13 '11 05:12

priya


People also ask

Are hooks client side?

There are two groups of hooks, client-side and server-side. Client-side hooks are triggered by operations such as committing and merging, while server-side hooks run on network operations such as receiving pushed commits.

Are Git hooks committed?

It's important to note that Git hooks aren't committed to a Git repository themselves. They're local, untracked files. When you write an important hook that you want to keep around, copy it into a directory managed by Git!

How do you do a pre-commit hook?

Open a terminal window by using option + T in GitKraken Client. Once the terminal windows is open, change directory to . git/hooks . Then use the command chmod +x pre-commit to make the pre-commit file executable.


2 Answers

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.

like image 79
khmarbaise Avatar answered Oct 08 '22 03:10

khmarbaise


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.

like image 38
rstackhouse Avatar answered Oct 08 '22 01:10

rstackhouse