7ec59e1e1593422bc97e3c3d1e93772f50295d3a
[hooke.git] / hooke --username marcobrucale / hooks / post-commit.tmpl
1 #!/bin/sh\r
2 \r
3 # POST-COMMIT HOOK\r
4 #\r
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
9 #\r
10 #   [1] REPOS-PATH   (the path to this repository)\r
11 #   [2] REV          (the number of the revision just committed)\r
12 #\r
13 # The default working directory for the invocation is undefined, so\r
14 # the program should set one explicitly if it cares.\r
15 #\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
20 #\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
23 # work itself too.\r
24 #\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
28 #\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
32\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
39\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
45 \r
46 \r
47 REPOS="$1"\r
48 REV="$2"\r
49 \r
50 mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf\r