| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
# POST-COMMIT HOOK
|
| 4 |
#
|
| 5 |
# The post-commit hook is invoked after a commit. Subversion runs
|
| 6 |
# this hook by invoking a program (script, executable, binary,
|
| 7 |
# etc.) named 'post-commit' (for which
|
| 8 |
# this file is a template) with the following ordered arguments:
|
| 9 |
#
|
| 10 |
# [1] REPOS-PATH (the path to this repository)
|
| 11 |
# [2] REV (the number of the revision just committed)
|
| 12 |
#
|
| 13 |
# Because the commit has already completed and cannot be undone,
|
| 14 |
# the exit code of the hook program is ignored. The hook program
|
| 15 |
# can use the 'svnlook' utility to help it examine the
|
| 16 |
# newly-committed tree.
|
| 17 |
#
|
| 18 |
# On a Unix system, the normal procedure is to have 'post-commit'
|
| 19 |
# invoke other programs to do the real work, though it may do the
|
| 20 |
# work itself too.
|
| 21 |
#
|
| 22 |
# Note that 'post-commit' must be executable by the user(s) who will
|
| 23 |
# invoke it (typically the user httpd runs as), and that user must
|
| 24 |
# have filesystem-level permission to access the repository.
|
| 25 |
#
|
| 26 |
# On a Windows system, you should name the hook program
|
| 27 |
# 'post-commit.bat' or 'post-commit.exe',
|
| 28 |
# but the basic idea is the same.
|
| 29 |
#
|
| 30 |
# Here is an example hook script, for a Unix /bin/sh interpreter:
|
| 31 |
|
| 32 |
REPOS="$1"
|
| 33 |
REV="$2"
|
| 34 |
|
| 35 |
/svn/pkg-subversion/hooks/commit-email.pl "$REPOS" "$REV" \
|
| 36 |
-h users.alioth.debian.org \
|
| 37 |
-s "subversion Debian ci:" \
|
| 38 |
subversion_cvs@packages.qa.debian.org
|