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

Re: transaction roots

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-03-30 09:05:27 CEST

On Thu, Mar 29, 2001 at 10:58:09PM -0500, Jim Blandy wrote:
> Greg Stein <gstein@lyra.org> writes:
> > I've been creating transactions based on the "youngest" revision, and then
> > applying changes to that. I was wondering if anybody sees a problem with
> > doing that.
> Ahh, I just thought of the right answer to this question:
> In the approach you suggest, you're basically re-implementing all the
> logic in svn_fs_merge within DAV. This means that the filesystem has
> packaged up that logic in a way that's not useful to you. If you
> could think of an alternative, easy-to-understand interface that would
> allow you and the commit process to share the logic, that would be the
> best outcome.
> I guess the logic isn't that complex, so the duplication still isn't a
> big deal. It's just finesse points.

Ah. Interesting re-think. Quite right. That is a valid description of the
situation, and yes: finesse will help :-)

[ play bridge, by any chance? ]

[ tossing ideas here; I don't have an immediate answer, but throwing stuff
  out might help somebody key in on the answer... ]

Lessee... at heart, ra_dav has knowledge that a particular client-side item
is *that* node on the server. The server then verifies that the item being
modified is the most recent.

Currently, I refer to the item using (ID, PATH). But I've been massaging the
code, or implementing new code, by referring to that tuple as STABLE-ID.
Consider it as a unique value to refer to a particular instance of PATH in
time. (where instance "I" may be visible in REV(N)..REV(M))

Hmm. Maybe the FS could export something like, "I want to modify STABLE-ID.
Is that the most current? Am I allowed?"

That question is answered within mod_dav_svn by comparing STABLE-ID against
that of the item in TXN (where TXN was created as the latest). Hmm. I was
about to say that it is independent of the TXN, but that isn't true. TXN
could hold something different from LATEST. Okay... so the question is
within the context of TXN.

The editor answers the question by copying STABLE-ID into TXN, then
attempting a merge.

Back to Jim' query: the FS exports items as "FOO in REV". The client seems
to be more interesting in "I've got XYZ, can I modify it?" Leading up to how
to represent XYZ such that the question is possible. ra_dav and ra_local
have each manhandled their own approaches to enable that question.

Does that help? Ping any particular axons?


Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:26 2006

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