0

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?

JavaCake
  • 4,075
  • 14
  • 62
  • 125

1 Answers1

0

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).

DarkDust
  • 90,870
  • 19
  • 190
  • 224
  • unfortunately still no luck! Since SVN is running under Apache, i should assume that the user controlling the executions are www-data? I dont have a svnserve user. – JavaCake Jun 25 '11 at 12:55
  • @JavaCake: You can find out by adding a line like this: `whoami >/tmp/svn-user.txt` – DarkDust Jun 25 '11 at 12:57
  • still no luck, the file is totally empty `-rwxrwxrwx 1 www-data www-data 0 2011-06-25 15:02 svn-user.txt` – JavaCake Jun 25 '11 at 13:03
  • 1
    i just deleted the directory and created the svn again and it worked. Makes no sense, but im happy. – JavaCake Jun 25 '11 at 13:29