[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: Tue, 08 Jun 2010 19:29:36 +0200

Philip Martin wrote:
> Revision properties are unversioned that's well documented. There are
> two hooks associated with a revprop change, the pre-revprop-change and
> the post-revprop-change. What's not well documented is that these
> hooks and the change are not executed within a Subversion transaction,
> which means that the ACTION parameter passed to the hooks is not
> reliable.

By "reliable", are you talking about a race condition that can be triggered
by multiple clients trying to modify the same revision's properties or
something? Do you have an example that explains your concern?

> At the very least that's a documentation bug, but is it a code bug as
> well? Is there any point in providing ACTION if it is not reliable?
> Should we run the pre-revprop-change and the change itself in a
> Subversion transaction? Something like:
> Process 1 Process 2
> --------- ---------
> start txn
> get old value
> run pre-revprop-change
> start txn
> get old value
> run pre-revprop-change
> change-value
> commit txn
> run post-revprop-change
> change value
> fail to commit txn
> return error
> return success

This rather depends on the idea of Subversion having a concept of a
transaction apart from "revision in the making"? And implemented in the
repository layer, even.

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2010-06-08 19:30:22 CEST

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