[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Changing the way the server looks for hooks

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-11-12 21:43:39 CET

Before I sign off for today, I'd like to share this in case I forget...

Currently our repository hooks system is very Unixy, and in fact only
works in Unix. That's because libsvn_repos tries to run specific files
in the hooks/ directory, and on Windows, for example, those files don't
have the right extension to be "executable".

I'd like to change this: instead of looking for hard-coded file names, I
propose the server should load a config file that defines the hook
programs to run, e.g.:

...repo/hooks/config:
    [global]
    pre_commit_hooks = access-check
    post_commit_hooks = commit-mail hot-backup

    [access-check]
    # the hook program
    hook_cmd = /usr/local/Python2.2/bin/python

    # number of args to hook program, without standard hook args
    hook_args = 2

    # args before the standard hook arguments
    hook_arg_1 = --verbose
    hook_arg_2 = access-check.py

    [commit-mail]
    # ...

and so on, you get the idea.

The hooks would be run in the order they're defined in the [glohal]
section, and cwd of hook programs would always be the repo/hooks
directory (or maybe that could be configurable, too). For backward
compatibility, we'd still try to run the files that are used now, but I
propose we deprecate that behaviour and remove it before Beta.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 12 21:44:28 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.