diff --git a/misc/scripts/svn/hooks/post-commit b/misc/scripts/svn/hooks/post-commit index 5ae364c36c..eedfd431b5 100755 --- a/misc/scripts/svn/hooks/post-commit +++ b/misc/scripts/svn/hooks/post-commit @@ -71,16 +71,9 @@ fi #$REPOS/hooks/ciabot_svn.py "$REPOS" $REV & -# Trigger Trac syncronization -TRACBASE=/home/wxsite/domains/trac.wxwidgets.org -source $TRACBASE/.setenv -$TRACBASE/python/bin/trac-admin $TRAC_ENV changeset added "$1" "$2" & +# Trigger Trac syncronization, must run as Trac's user +sudo -u wxsite $REPOS/hooks/trac-post-commit.sh "$REPOS" "$REV" -## Check for keywords that Trac can use -#export PYTHONPATH=/home/wxsite/domains/trac.wxwidgets.org/htdocs/lib/python -#export PYTHON_EGG_CACHE=/tmp/.python-eggs -#/usr/bin/python2.5 $REPOS/hooks/trac-post-commit-hook \ -# -p /home/wxsite/domains/trac.wxwidgets.org/htdocs/wxtrac -r $REV & diff --git a/misc/scripts/svn/hooks/post-revprop-change b/misc/scripts/svn/hooks/post-revprop-change index caab177e72..667db13b93 100755 --- a/misc/scripts/svn/hooks/post-revprop-change +++ b/misc/scripts/svn/hooks/post-revprop-change @@ -53,7 +53,6 @@ USER="$3" PROPNAME="$4" ACTION="$5" -# Trigger Trac syncronization -TRACBASE=/home/wxsite/domains/trac.wxwidgets.org -source $TRACBASE/.setenv -$TRACBASE/python/bin/trac-admin $TRAC_ENV changeset modified "$1" "$2" & +# Trigger Trac syncronization, must run as Trac's user +sudo -u wxsite $REPOS/hooks/trac-post-revprop-change.sh "$REPOS" "$REV" + diff --git a/misc/scripts/svn/hooks/trac-post-commit.sh b/misc/scripts/svn/hooks/trac-post-commit.sh new file mode 100755 index 0000000000..988c5977ba --- /dev/null +++ b/misc/scripts/svn/hooks/trac-post-commit.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +TRACHOST=/home/wxsite/domains/trac.wxwidgets.org +source $TRACHOST/.setenv +$TRACHOST/python/bin/trac-admin $TRAC_ENV changeset added "$1" "$2" + diff --git a/misc/scripts/svn/hooks/trac-post-revprop-change.sh b/misc/scripts/svn/hooks/trac-post-revprop-change.sh new file mode 100755 index 0000000000..2835d9bc60 --- /dev/null +++ b/misc/scripts/svn/hooks/trac-post-revprop-change.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +TRACHOST=/home/wxsite/domains/trac.wxwidgets.org +source $TRACHOST/.setenv +$TRACHOST/python/bin/trac-admin $TRAC_ENV changeset modified "$1" "$2" +