Search code examples
svnpost-commit-hook

Subversion post-commit failing!


I have just got subversion up running, but my post-commit.tmpl is failing.

I want to update my live directory at every trunk commit, so i always can see the new working code. Although this seems to work when i lunch the update by ssh, but not in the template file.

This is what i got in my post-commit.tmpl:

REPOS="$1"
REV="$2"

/usr/share/subversion/hook-scripts/commit-email.pl \
  "$REPOS" "$REV" commit-watchers@example.org

svn update /var/www/vhosts/mysite.nu/devlive >> /var/www/vhosts/mysite.nu/log/log-dev-live

Furthermore i get nothing in the log.

I have changed all permissions to the directories towards my webserver user (www-data) and chmod 777.

What am i doing wrong?


Solution

  • Since the PATH variable may not be set you need to use the full path to svn here (like /usr/bin/svn).

    Also, IIRC the file should be named post-commit, not post-commit.tmpl (which is just a template, an example on how you can do it).