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

Re: [Issue 1904] New - seg fault on 'svn propdel --revprop ...'

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-06-04 01:11:22 CEST

C. Michael Pilato wrote:

>Branko Čibej <brane@xbc.nu> writes:
>
>
>
>>The post-revprop-change handler should pipe the old value to the
>>hook.
>>
>>
>
>Haven't we been here before? There was some reason why piping didn't
>work out.
>
>
Well, we need to document it.

>>I'm not sure what the new value is for a deleted property, though; I
>>suppose "empty" is the best we can do, except that the hook would
>>have no way of knowing that the property was deleted. Same goes for
>>the old value of an added prop in the post-change hook.
>>
>>
>
>But now you're talking about a new value instead of an old one. What?
>
>
The pre- and post-revprop-change hooks are symmetrical. So if the pre-
hook gets the new value, and the post- hook gets the old value, the one
has problems with deleted props and the other with added ones. Thet's
why I proposed an additional parameter to both hooks that would signal
the action and let the hooks deal correctly with "empty" values. Sorry
if that wasn't clear.

>A post-revprop-change script need not be told the new value
>
I never said it did.

>Of course, it occurs to me that we have (and have always had) race
>conditions here
>
We do. But the only way to avoid them is to write both the old and the
new value into temporary files and pass those to the hooks. Trouble is,
you don't know when to remove those files, because the hook might mot
run synchronously.

> -- it's possible that between the time Harry's
>propchange is made and the time his hooks query for the new value,
>Sally might have changed the property yet again. I fear the only way
>to get this working in full is for both the pre- and post- revprop
>hooks to accept on stdin both old and new values, perhaps in an XML
>message.
>
>
XML, aargh. I'd rather handle tempfile cleanup issues than have the
hooks parse XML.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 4 01:12:01 2004

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.