Greg Stein <gstein@lyra.org> writes:
> On Thu, Mar 13, 2003 at 11:30:18PM -0600, kfogel@tigris.org wrote:
> >...
> > * subversion/libsvn_repos/hooks.c
> > (svn_repos__hooks_pre_revprop_change): Remove comment about passing
> > value on hook's stdin. Perhaps that comment was meant for
> > svn_repos__post_revprop_change or something.
>
> Nope... you almost definitely want to pass the new_value to the pre- hook so
> that the hook can examine the value to determine the acceptability of the
> change. For example, you might want to apply a restriction that svn:author
> values must match "[A-Za-z0-9]+".
>
> Essentially, the pre- hook gets the new_value and the post- hook gets the
> old_value.
Aaaah...yes, it is all so clear now. +1.
> The comments in the default script text should note that stdin *must* be
> consumed by the script, whether they choose to use the contents or not. If
> the new/old value happens to be larger than the pipe buffer size, then SVN
> will block on writing the data into the pipe. Should the child exit while
> SVN is blocked, then SVN will receive a SIGPIPE, and that would be a Bad
> Thing(tm).
Whoa. You learn something new (and scary) every day.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 14 14:26:45 2003