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

Re: Hook problems

From: <kfogel_at_collab.net>
Date: 2004-11-24 20:00:40 CET

David Ameiss <david@ameissnet.com> writes:
> Now, any commits fail with:
>
> "Can't create null stdout for hook '/var/svn/xxx/hooks/pre-commit';
> Permission denied"
>
> AFAIK all the paths are correct, as are the permissions on pre-commit.
>
> Any ideas? Thanks!

I Googled for your error. It looks like possible permissions on
/dev/null itself are not right? The error comes from this place in
the code:

   /* Redirect stdout to the null device */
   apr_err = apr_file_open (&null_handle, SVN_NULL_DEVICE_NAME, APR_WRITE,
                            APR_OS_DEFAULT, pool);
   if (apr_err)
     return svn_error_wrap_apr
       (apr_err, "Can't create null stdout for hook '%s'", cmd);

(From http://www.endrun.org/xr/svn/source/subversion/libsvn_repos/hooks.c,
by the way, which offers a nicely formatted source tree. The above is
around line 75).

Whenever you're having problems with a hook script, one good thing to
try is to write a much simpler hook, and see if you can get that to
work. That way you can tell whether the problem is with what you're
trying to do *in* the hook, versus a more fundamental problem with
running any hook script at all. In this case, I'll bet if you make a
bone-simple hook script, it'll still fail.

Let us know.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 24 20:09:59 2004

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.