On Fri, Jul 25, 2008 at 10:01 AM, <[EMAIL PROTECTED]> wrote: > > Hi all, some news. > I tried with another server, just to avoid messing up the two production > server. The new server is Ubuntu 2.6.22-14, while the other two are Fedora. > Aside from the different installation directories I think nothing should > change. > > Anyway here what I found: > > sudo -u www-data env -i ./post-commit > post-commit called.
when you run the "sudo -u www-data env -i ./post-commit" command in the console the following things happen: 1. sudo changes the current user to www-data 2. opens the www-data console shell with a empty env 3. runs ./post-commit command in the new shell. If you take a look in the svn documentation for hooks you will see that svn server, when it calls a hook, passes some arguments. In the case of the post-commit hook it passes the path to the svn repository(REPOS variable in your sh script) and the revision that triggered the call(REV in your sh script). So you have to provide in your command this information. This note that i'm making it wount solve your problem, because the svn server at commit time passes the parameters, but it will help you find out what goes wrong. > > The content of the post-commit file is. > #!/bin/sh > > # POST-COMMIT HOOK > # > # . > # . > # . > # some comments here > # . > # . > # . > > REPOS="$1" > REV="$2" > > echo "post-commit called." > echo "$REPOS" > /var/lib/svn/<svn_project_dir>/hooks/rep.txt > > The file properties are: > > -rwxrwxrwx 1 www-data root 1979 2008-07-24 10:47 post-commit > > So it seem that it works. But, as before, it is not called after a commit to > the above repository (neither I see anything on the shell nor the file > rep.txtis created). > > Do I forget or overlook something ? > Am I wrong supposing that the file post commit should be executed after a > successful commit ? the post-commit is always called after a successful commit. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
