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

Re: svn commit: rev 5320 - in trunk/subversion: include libsvn_repos

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-03-14 12:00:57 CET

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.

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).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 14 11:59:32 2003

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

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