subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Michael Pilato" <cmpil...@collab.net>
Subject Re: revprop changes and hooks
Date Wed, 16 Jun 2010 13:32:58 GMT
Philip Martin wrote:
> Philip Martin <philip.martin@wandisco.com> writes:
> 
>> Multiple clients.  It arises from my idea to solve issue 3546
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=3546
>>
>> In svn_repos_fs_change_rev_prop3 the code first gets the old property
>> value which it uses to calculate the action: 'A', 'M' or 'D'. Then it
>> passes the action to the pre-revprop-change hook, then it changes the
>> property and finally it runs the post-revprop-change hook.  Some other
>> process can change the revprop at any time so although the
>> pre-revprop-change hook might get passed an 'A' say, when the change
>> is made it could be effectively an 'M'.  The action passed to the hook
>> is not a reliable indication of the change to be made.
>>
>> Putting the get, pre hook and set into a transaction would allow the
>> action in the hook to accurately reflect the change made (or not made
>> if the transaction fails).
> 
> We don't need a new transaction to fix this, we can rev the
> svn_fs_change_rev_prop interface instead:
> 
> svn_error_t *
> svn_fs_change_rev_prop(svn_fs_t *fs,
>                        svn_revnum_t rev,
>                        const char *name,
>                        const svn_string_t *value,
>                        apr_pool_t *pool);

I'm late to the party, here, but wanted to affirm this decision:  nice way
to solve the problem, Philip.

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Mime
View raw message