source: hooks/post-revprop-change.tmpl@ 202

Last change on this file since 202 was 202, checked in by luciano, 10 years ago
File size: 2.3 KB
Line 
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# 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.
27#
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.
31#
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.
35#
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.
42#
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# /usr/share/subversion/hook-scripts, and in the repository at
46# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
47# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
48
49
50REPOS="$1"
51REV="$2"
52USER="$3"
53PROPNAME="$4"
54ACTION="$5"
55
56"$REPOS"/hooks/mailer.py propchange2 "$REPOS" $REV \
57 "$USER" "$PROPNAME" "$ACTION" "$REPOS"/hooks/mailer.conf
Note: See TracBrowser for help on using the repository browser.