source: branches/test-suite/test/repo/hooks/pre-revprop-change.tmpl @ 242

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

initial ci of test repo refs #125

File size: 1.9 KB
Line 
1#!/bin/sh
2
3# PRE-REVPROP-CHANGE HOOK
4#
5# The pre-revprop-change hook is invoked before a revision property
6# is modified.  Subversion runs this hook by invoking a program
7# (script, executable, binary, etc.) named 'pre-revprop-change' (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] REVISION     (the revision being tweaked)
12#   [3] USER         (the username of the person tweaking the property)
13#   [4] PROPNAME     (the property being set on the revision)
14#
15#   [STDIN] PROPVAL  ** the property value is passed via STDIN.
16#
17# If the hook program exits with success, the propchange happens; but
18# if it exits with failure (non-zero), the propchange doesn't happen.
19# The hook program can use the 'svnlook' utility to examine the
20# existing value of the revision property.
21#
22# WARNING: unlike other hooks, this hook MUST exist for revision
23# properties to be changed.  If the hook does not exist, Subversion
24# will behave as if the hook were present, but failed.  The reason
25# for this is that revision properties are UNVERSIONED, meaning that
26# a successful propchange is destructive;  the old value is gone
27# forever.  We recommend the hook back up the old value somewhere.
28#
29# On a Unix system, the normal procedure is to have 'pre-revprop-change'
30# invoke other programs to do the real work, though it may do the
31# work itself too.
32#
33# Note that 'pre-revprop-change' must be executable by the user(s) who will
34# invoke it (typically the user httpd runs as), and that user must
35# have filesystem-level permission to access the repository.
36#
37# On a Windows system, you should name the hook program
38# 'pre-revprop-change.bat' or 'pre-revprop-change.exe',
39# but the basic idea is the same.
40#
41# Here is an example hook script, for a Unix /bin/sh interpreter:
42
43REPOS="$1"
44REV="$2"
45USER="$3"
46PROPNAME="$4"
47
48if [ "$PROPNAME" = "svn:log" ]; then exit 0; fi
49exit 1
Note: See TracBrowser for help on using the repository browser.