Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2227 - 1
#!/bin/sh
2
 
3
# POST-REVPROP-CHANGE HOOK
4
#
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:
10
#
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)
16
#
17
#   [STDIN] PROPVAL  ** the old property value is passed via STDIN.
18
#
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.
23
#
24
# The default working directory for the invocation is undefined, so
25
# the program should set one explicitly if it cares.
26
#
27
# On a Unix system, the normal procedure is to have 'post-revprop-change'
28
# invoke other programs to do the real work, though it may do the
29
# work itself too.
30
#
31
# Note that 'post-revprop-change' must be executable by the user(s) who will
32
# invoke it (typically the user httpd runs as), and that user must
33
# have filesystem-level permission to access the repository.
34
#
35
# On a Windows system, you should name the hook program
36
# 'post-revprop-change.bat' or 'post-revprop-change.exe',
37
# but the basic idea is the same.
38
#
39
# The hook program runs in an empty environment, unless the server is
40
# explicitly configured otherwise.  For example, a common problem is for
41
# the PATH environment variable to not be set to its usual value, so
42
# that subprograms fail to launch unless invoked via absolute path.
43
# If you're having unexpected problems with a hook program, the
44
# culprit may be unusual (or missing) environment variables.
45
#
46
# CAUTION:
47
# For security reasons, you MUST always properly quote arguments when
48
# you use them, as those arguments could contain whitespace or other
49
# problematic characters. Additionally, you should delimit the list
50
# of options with "--" before passing the arguments, so malicious
51
# clients cannot bootleg unexpected options to the commands your
52
# script aims to execute.
53
# For similar reasons, you should also add a trailing @ to URLs which
54
# are passed to SVN commands accepting URLs with peg revisions.
55
#
56
# Here is an example hook script, for a Unix /bin/sh interpreter.
57
# For more examples and pre-written hooks, see those in
58
# the Subversion repository at
59
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
60
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
61
 
62
 
63
REPOS="$1"
64
REV="$2"
65
USER="$3"
66
PROPNAME="$4"
67
ACTION="$5"
68
 
69
mailer.py propchange2 "$REPOS" "$REV" "$USER" "$PROPNAME" "$ACTION" /path/to/mailer.conf