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

Re: revprop changes and hooks

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 16 Jun 2010 09:32:58 -0400

Philip Martin wrote:
> Philip Martin <philip.martin_at_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_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2010-06-16 15:33:39 CEST

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