source: trunk/test/repo/hooks/post-commit.tmpl @ 292

Last change on this file since 292 was 248, checked in by Peter Johansson, 16 years ago

fixes #125

File size: 1.4 KB
Line 
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, etc.)
7# named 'post-commit' (for which this file is a template) with the
8# 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# The default working directory for the invocation is undefined, so
14# the program should set one explicitly if it cares.
15#
16# Because the commit has already completed and cannot be undone,
17# the exit code of the hook program is ignored.  The hook program
18# can use the 'svnlook' utility to help it examine the
19# newly-committed tree.
20#
21# On a Unix system, the normal procedure is to have 'post-commit'
22# invoke other programs to do the real work, though it may do the
23# work itself too.
24#
25# Note that 'post-commit' must be executable by the user(s) who will
26# invoke it (typically the user httpd runs as), and that user must
27# have filesystem-level permission to access the repository.
28#
29# On a Windows system, you should name the hook program
30# 'post-commit.bat' or 'post-commit.exe',
31# but the basic idea is the same.
32#
33# Here is an example hook script, for a Unix /bin/sh interpreter:
34
35REPOS="$1"
36REV="$2"
37
38commit-email.pl "$REPOS" "$REV" commit-watchers@example.org
39log-commit.py --repository "$REPOS" --revision "$REV"
Note: See TracBrowser for help on using the repository browser.