1 |
#!/bin/sh |
2 |
|
3 |
# $MidnightBSD$ |
4 |
|
5 |
# POST-UNLOCK HOOK |
6 |
# |
7 |
# The post-unlock hook runs after a path is unlocked. Subversion runs |
8 |
# this hook by invoking a program (script, executable, binary, etc.) |
9 |
# named 'post-unlock' (for which this file is a template) with the |
10 |
# following ordered arguments: |
11 |
# |
12 |
# [1] REPOS-PATH (the path to this repository) |
13 |
# [2] USER (the user who destroyed the lock) |
14 |
# |
15 |
# The paths that were just unlocked are passed to the hook via STDIN |
16 |
# (as of Subversion 1.2, only one path is passed per invocation, but |
17 |
# the plan is to pass all unlocked paths at once, so the hook program |
18 |
# should be written accordingly). |
19 |
# |
20 |
# The default working directory for the invocation is undefined, so |
21 |
# the program should set one explicitly if it cares. |
22 |
# |
23 |
# Because the lock has already been destroyed and cannot be undone, |
24 |
# the exit code of the hook program is ignored. |
25 |
# |
26 |
# On a Unix system, the normal procedure is to have 'post-unlock' |
27 |
# invoke other programs to do the real work, though it may do the |
28 |
# work itself too. |
29 |
# |
30 |
# Note that 'post-unlock' must be executable by the user(s) who will |
31 |
# invoke it (typically the user httpd runs as), and that user must |
32 |
# have filesystem-level permission to access the repository. |
33 |
# |
34 |
# On a Windows system, you should name the hook program |
35 |
# 'post-unlock.bat' or 'post-unlock.exe', |
36 |
# but the basic idea is the same. |
37 |
# |
38 |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
39 |
|
40 |
#REPOS="$1" |
41 |
#USER="$2" |
42 |
|
43 |
# Send email to interested parties, let them know a lock was removed: |
44 |
#mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf |