Subversion post-commit

I’m trying to get this script to function on my subversion repository so my development site is always the current subversion snapshot. I’ve compiled this program and set the suid bit on it. However, when I post a commit, it throws the checked out copy in a locked state where i have to manually run svn cleanup followed by another svn update.

#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
int main(void)
execl("/usr/bin/svn", “svn”, “update”, “/home/jweigert/”,
(const char *) NULL);