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