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

Getting a post commit hook to work

From: Graham Anderson <grahama_at_siren.cc>
Date: 2006-07-25 01:33:47 CEST

I am unable to get my post-commit script to work :(

If I ,as root, enter '/usr/local/bin/update-dev' directly into the
terminal, subversion WILL run the update properly

  # /usr/local/bin/update-dev
U /home/www/mysite-dev/flatsite/css/style.css
Updated to revision 167.

If I try to put the same command in the post-commit script, it fails.
anyone know what it could be ?

As outlined in http://arstechnica.com/articles/columns/linux/
linux-20050406.ars, I did the below

1) created update-dev.c:

#include <stdlib.h>
           int main(int argc, const char *argv[])
           {
             system("/usr/local/bin/svn update /home/www/socalgraph-
dev");
           }

2) compiled update-dev.c and set the proper permissions:

        gcc update-dev.c -o /usr/local/bin/update-dev
        chown root:root /usr/local/bin/update-dev
        chmod +s /usr/local/bin/update-dev

3) created a post-commit script in:
/home/svn/repository/hooks/post-commit

#!/bin/bash
/usr/local/bin/update-dev

so far, the post commit is not behaving
this is my first attempt at a post-commit so any help is appreciated

g

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 25 01:35:02 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.