2

I know how to enable Server side hooks in Tortoise SVN, but the problem is that I want to have hooks which are like "global", e.g. every repository on the server should use the global hooks.

I have a hook which has to be included in every repository - I could now copy the hook by hand in every repository, but I want to know if it's possible to declare something like a global hook, so that there is just one place where the hook exists.

Any suggestions? Is this even possible?

Infinite Recursion
  • 6,511
  • 28
  • 39
  • 51
fen89
  • 539
  • 4
  • 10

1 Answers1

2

Actually hooks can only be defined per repository.

What I do to handle the same thing that you want to achieve is the following:

  • I have a place where I store the hook scripts that I want global
  • I've then set up a scheduled task that will copy all these scripts to every repository if they are not there already

Using this solution, I can easily change a hook script and update it everywhere, and whenever I create a new repository all the needed hooks will be added to it.

I've used this indifferently on Linux or Windows server.

Yannick Blondeau
  • 9,465
  • 8
  • 52
  • 74
  • Thank you very much for letting me know that it is (sadly) not possible the global way! Scripting would have been my next step, too. ;-) Thanks! – fen89 Dec 18 '13 at 07:59
  • of course you could have a hook script in each repo that simply runs a script that is stored elsewhere.... – gbjbaanb Mar 17 '15 at 09:08