w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to find the hook in https svn server

Subversion hook scripts are stored in the hooks directory of a repository. To learn how it works it's good to create a local repository to play with:

svnadmin create /tmp/testrepo

All hooks are disabled by default, if you look inside /tmp/testrepo/hooks you will see a bunch of files with a .tmpl extension, for example post-commit.tmpl. When a hook script is enabled, it should not have such extension, and it should be executable.

From a client, you cannot access to these hook scripts, or check that they exist. You need shell access on the system hosting the repository, in this case the /tmp/testrepo dir.

You can play with hook scripts using this local repository, its URL is file:///tmp/testrepo, for example:

$ svn co file:///tmp/testrepo /tmp/checkout
Checked out revision 0.
$ cd /tmp/checkout/
$ date > date.txt
$ svn add date.txt 
A         date.txt
$ svn ci -m 'first commit'
Adding         date.txt
Transmitting file data .
Committed revision 1.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.