source: revtreeplugin/0.11/hooks/svnstubs/pre-revprop-change

Last change on this file was 3581, checked in by Emmanuel Blot, 15 years ago

Update hook scripts for the RevtreePlugin/LogEnhancer

  • Property svn:eol-style set to native
File size: 919 bytes
Line 
1#!/bin/sh
2
3# PRE-REVPROP-CHANGE HOOK
4#
5#   [1] REPOS-PATH   (the path to this repository)
6#   [2] REVISION     (the revision being tweaked)
7#   [3] USER         (the username of the person tweaking the property)
8#   [4] PROPNAME     (the property being set on the revision)
9#
10#   [STDIN] PROPVAL  ** the new property value is passed via STDIN.
11
12REPOS="$1"
13REV="$2"
14USER="$3"
15PROPNAME="$4"
16ACTION="$5"
17
18SELF=`readlink -f $0`
19CONF=`dirname ${SELF}`/hook.conf
20if [ -f ${CONF} ]; then
21    . ${CONF}
22else
23    echo "Missing hook configuration file" >&2
24    exit -1
25fi
26
27export PYTHONPATH=$TRACPATH:$GENSHIPATH
28export PYTHON_EGG_CACHE
29export PYTHON=`which python2.5`
30echo "Revprop: $REV $PROPNAME action:$ACTION" >> $LOGFILE
31${PYTHON} ${HOOKPATH}/trac-revprop-hook -p "$TRAC_ENV" -u "$USER" \
32    -n "$PROPNAME" -d "$REPOS" -r "$REV" -a "$ACTION" pre 2>> "$LOGFILE"
33RC=$?
34echo "RESULT $RC" >>  $LOGFILE
35[ $RC == 0 ] || exit 1
36
Note: See TracBrowser for help on using the repository browser.