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