5 # The start-commit hook is invoked before a Subversion txn is created
6 # in the process of doing a commit. Subversion runs this hook
7 # by invoking a program (script, executable, binary, etc.) named
8 # 'start-commit' (for which this file is a template)
9 # with the following ordered arguments:
11 # [1] REPOS-PATH (the path to this repository)
12 # [2] USER (the authenticated user attempting to commit)
14 # The default working directory for the invocation is undefined, so
15 # the program should set one explicitly if it cares.
17 # If the hook program exits with success, the commit continues; but
18 # if it exits with failure (non-zero), the commit is stopped before
19 # a Subversion txn is created, and STDERR is returned to the client.
21 # On a Unix system, the normal procedure is to have 'start-commit'
22 # invoke other programs to do the real work, though it may do the
25 # Note that 'start-commit' must be executable by the user(s) who will
26 # invoke it (typically the user httpd runs as), and that user must
27 # have filesystem-level permission to access the repository.
29 # On a Windows system, you should name the hook program
30 # 'start-commit.bat' or 'start-commit.exe',
31 # but the basic idea is the same.
33 # The hook program typically does not inherit the environment of
34 # its parent process. For example, a common problem is for the
35 # PATH environment variable to not be set to its usual value, so
36 # that subprograms fail to launch unless invoked via absolute path.
37 # If you're having unexpected problems with a hook program, the
38 # culprit may be unusual (or missing) environment variables.
40 # Here is an example hook script, for a Unix /bin/sh interpreter.
41 # For more examples and pre-written hooks, see those in
42 # the Subversion repository at
43 # http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
44 # http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
50 commit-allower.pl
--repository "$REPOS" --user "$USER" ||
exit 1
51 special-auth-check.py
--user "$USER" --auth-level 3 ||
exit 1
53 # All checks passed, so allow the commit.