[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Trouble with automating svn update

From: James Riordon <hosting_at_outofcontrol.ca>
Date: 2006-09-27 18:26:27 CEST


        This is my first post to the list. I have been using subversion for
a little over a year now but have just learnt about the hooks
recently. I have post-commit working currently very well with the
commit-email.pl script, and the pre-commit working in as far that it
refuses empty commit messages with a friendly error.

        Today I need to setup another post-commit hook to automate the
updating of our dev server each time a commit is done to the repo.
Here are the particulars of my setup:


Dev site:

Two versions of post-commit script have been tried:
Version 1:
/usr/bin/svn update /home/virtual/site50/fst/var/www
rest of post-commit (which works fine)

Version 2:
rest of post-commit (which works fine)

update-admin is a small C binary that contains this:
#include <stdlib.h>
int main(int argc, const char *argv[])
                system("/usr/bin/svn update /home/virtual/site50/fst/var/www/");
update-admin is chown'd to admin50:admin50 and chmod 755 +s, as per
the instructions at:

Both version of post-commit run perfectly from the command line, so I
know I am mostly there. But for the life of me, trying different
permissions, I can't seem to get it to work when I do a commit to the
repos. There are no errors and the rest of the post-commit executes
perfectly, which simply emails me the commit.

Being fairly new with hooks, I have been busily reading everything I
can find, the beans book, mailing lists, but nothing seems to help me
to get this to work. I think it is just an obvious oversight on my
part, but I can't see. Does anyone have any suggestions? Thanks!

Received on Wed Sep 27 18:27:26 2006

This is an archived mail posted to the Subversion Users mailing list.