source: revtreeplugin/0.11/hooks/svnstubs/post-commit

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: 581 bytes
RevLine 
[2638]1#!/bin/sh
2
3REPOS="$1"
4REV="$2"
5
[3581]6SELF=`readlink -f $0`
7CONF=`dirname ${SELF}`/hook.conf
8if [ -f ${CONF} ]; then
9    . ${CONF}
[2638]10else
[3581]11    echo "Missing hook configuration file" >&2
12    exit -1
[2638]13fi
14
[3581]15export PYTHONPATH=$TRACPATH:$GENSHIPATH
16export PYTHON_EGG_CACHE
17export PYTHON=`which python2.5`
[2638]18date >> "$LOGFILE"
19echo "Revision: $REV" >> "$LOGFILE"
[3581]20${PYTHON} ${HOOKPATH}/trac-commit-hook -d "$REPOS" -r "$REV" -p "$TRAC_ENV" \
21     2>> "$LOGFILE"
[2638]22if [ $? -ne 0 ]; then
[3581]23    tail -5 "$LOGFILE" | \
24      cat
25      #mail admin -s "[${REPOSNAME}] Unable to post-commit revision ${REV}"
[2638]26fi
[3581]27
Note: See TracBrowser for help on using the repository browser.