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

Re: revprop change notifications (was: svn commit: rev 5289 ...)

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2003-03-14 05:33:13 CET

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

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.