cmpilato@collab.net writes:
> Hm...the more I think about it, the more I prefer the tempfile thing.
> By using a tempfile, we give scripts the ability to read
> non-streamily, or to read the value more than once. This might
> initially sound like a bad thing, but consider a script which must
> first example the property to determine if it is binary or not, and
> might choose a different 'diff' program based on the results.
>
> In fact, if we change the pre-revprop-change hook to also take the
> tempfile, then we can now write the old property value only once --
> and post pre- and post- hooks can read from the same file. Might as
> well make the new property value live in a tempfile, too.
>
> Whatever, hands are running faster than my mind right now, so perhaps
> this is all rubbish.
I think you might be onto something at the end, there...
<ducks>
There's no reason for the pre-revprop hook to take the value as a
tempfile -- it can get the value from the Subversion txn as many times
as it wants. There is some argument for using a tempfile for the
post-revprop hook, but that also opens up the whole "What happens if
no one cleans up the file?" question, as well as unintuitively
involving two hook scripts in what most people would imagine is a
one-hook-script problem. Yick.
IMHO, stdin is a *much* cleaner solution; I'm implementing it now.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 14 06:10:54 2003