5 # The post-commit hook is invoked after a commit. Subversion runs
\r
6 # this hook by invoking a program (script, executable, binary, etc.)
\r
7 # named 'post-commit' (for which this file is a template) with the
\r
8 # following ordered arguments:
\r
10 # [1] REPOS-PATH (the path to this repository)
\r
11 # [2] REV (the number of the revision just committed)
\r
13 # The default working directory for the invocation is undefined, so
\r
14 # the program should set one explicitly if it cares.
\r
16 # Because the commit has already completed and cannot be undone,
\r
17 # the exit code of the hook program is ignored. The hook program
\r
18 # can use the 'svnlook' utility to help it examine the
\r
19 # newly-committed tree.
\r
21 # On a Unix system, the normal procedure is to have 'post-commit'
\r
22 # invoke other programs to do the real work, though it may do the
\r
25 # Note that 'post-commit' must be executable by the user(s) who will
\r
26 # invoke it (typically the user httpd runs as), and that user must
\r
27 # have filesystem-level permission to access the repository.
\r
29 # On a Windows system, you should name the hook program
\r
30 # 'post-commit.bat' or 'post-commit.exe',
\r
31 # but the basic idea is the same.
\r
33 # The hook program typically does not inherit the environment of
\r
34 # its parent process. For example, a common problem is for the
\r
35 # PATH environment variable to not be set to its usual value, so
\r
36 # that subprograms fail to launch unless invoked via absolute path.
\r
37 # If you're having unexpected problems with a hook program, the
\r
38 # culprit may be unusual (or missing) environment variables.
\r
40 # Here is an example hook script, for a Unix /bin/sh interpreter.
\r
41 # For more examples and pre-written hooks, see those in
\r
42 # the Subversion repository at
\r
43 # http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
\r
44 # http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
\r
50 mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
\r