git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6550 2b7e53f0-3cfb-0310-b3e9-8179ed...
[coreboot.git] / hooks / post-revprop-change.tmpl
1 #!/bin/sh\r
2 \r
3 # POST-REVPROP-CHANGE HOOK\r
4 #\r
5 # The post-revprop-change hook is invoked after a revision property\r
6 # has been added, modified or deleted.  Subversion runs this hook by\r
7 # invoking a program (script, executable, binary, etc.) named\r
8 # 'post-revprop-change' (for which this file is a template), with the\r
9 # following ordered arguments:\r
10 #\r
11 #   [1] REPOS-PATH   (the path to this repository)\r
12 #   [2] REV          (the revision that was tweaked)\r
13 #   [3] USER         (the username of the person tweaking the property)\r
14 #   [4] PROPNAME     (the property that was changed)\r
15 #   [5] ACTION       (the property was 'A'dded, 'M'odified, or 'D'eleted)\r
16 #\r
17 #   [STDIN] PROPVAL  ** the old property value is passed via STDIN.\r
18 #\r
19 # Because the propchange has already completed and cannot be undone,\r
20 # the exit code of the hook program is ignored.  The hook program\r
21 # can use the 'svnlook' utility to help it examine the\r
22 # new property value.\r
23 #\r
24 # On a Unix system, the normal procedure is to have 'post-revprop-change'\r
25 # invoke other programs to do the real work, though it may do the\r
26 # work itself too.\r
27 #\r
28 # Note that 'post-revprop-change' must be executable by the user(s) who will\r
29 # invoke it (typically the user httpd runs as), and that user must\r
30 # have filesystem-level permission to access the repository.\r
31 #\r
32 # On a Windows system, you should name the hook program\r
33 # 'post-revprop-change.bat' or 'post-revprop-change.exe',\r
34 # but the basic idea is the same.\r
35\r
36 # The hook program typically does not inherit the environment of\r
37 # its parent process.  For example, a common problem is for the\r
38 # PATH environment variable to not be set to its usual value, so\r
39 # that subprograms fail to launch unless invoked via absolute path.\r
40 # If you're having unexpected problems with a hook program, the\r
41 # culprit may be unusual (or missing) environment variables.\r
42\r
43 # Here is an example hook script, for a Unix /bin/sh interpreter.\r
44 # For more examples and pre-written hooks, see those in\r
45 # the Subversion repository at\r
46 # http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and\r
47 # http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/\r
48 \r
49 \r
50 REPOS="$1"\r
51 REV="$2"\r
52 USER="$3"\r
53 PROPNAME="$4"\r
54 ACTION="$5"\r
55 \r
56 mailer.py propchange2 "$REPOS" "$REV" "$USER" "$PROPNAME" "$ACTION" /path/to/mailer.conf\r