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

Re: [PATCH] Change svn_fs_root_t to include pointer to related txn

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2005-12-13 21:32:28 CET

On Tue, Dec 13, 2005 at 12:40:33PM -0500, Greg Hudson wrote:
> On Tue, 2005-12-13 at 16:08 +0000, Malcolm Rowe wrote:
> > So the way I'd like to avoid this is to hold the file open for the
> > duration of the transaction (which isn't a bad idea anyway); the
> > most obvious way to achieve that is to stash the apr_file_t in the
> > FSAP-specific private data part of the svn_fs_txn_t structure.
> >
> > However (and this is the purpose of this note), I'm going to need
> > to access the file during calls to the FSFS implementations of
> > svn_fs_apply_text() and svn_fs_apply_textdelta(), but these functions
> > only take a pointer to a transaction root (an svn_fs_root_t object),
> > not to the transaction itself.
> Wouldn't it be simpler to stash the file in the transaction root?

No, because I'd like to create or open the file in the implementations of
svn_fs_create_txn2() and svn_fs_open_txn(), which create transactions,
not transaction roots. Sorry if that wasn't clear (I see now that I
forgot to mention that little point, oops).

I suppose I could attempt to remember whether the transaction was new
or not, and use that to decide whether to create or open the file as
necessary (though note that I'm not planning to change the next-ids
or rev-props files, so they'd still be initialised in _create_txn2()),
but that all seems very messy, and I'd still need a way to tie back to
the transaction.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 13 22:15:38 2005

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.