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

Re: more editor v2 (3)

From: Augie Fackler <lists_at_durin42.com>
Date: Thu, 17 Sep 2009 19:58:35 -0500

On Sep 16, 2009, at 8:43 PM, Greg Stein wrote:

>> What makes most sense to me:
>> - REPOS gets the two revs from FS and computes a delta.
>> - RA transports the delta back to client
>>
>> ok, now what. Receiver gets a set_text() of delta applied to
>> current BASE?
>> nah. The Ev2 wire sends r123 in full and client has to fetch another
>> fulltext r122 via RA to compute a delta client side?? Nah!
>
> Nope.
>
> When presented a situation like this, the client will do one of two
> things:
>
> 1) if a "good" BASE is present for the file in question (there's the
> sticky point: do we have a local copy of *that* file?), then the
> client asks the server "give me a text delta to construct r122 from
> BASE", and then it says "give me another to construct r123". It then
> applies the two deltas against BASE to generate the fulltexts.
>
> 2) if no "good" BASE exists, then it fetches a fulltext for r122, a
> text delta for r122:123, and applies the textdelta to produce the
> second fulltext.
>
> And again: back up a bit: I'm not sure that an editor drive can/should
> make sense for 'svn diff' so a set_text() might never happen (on the
> client). In the absence of knowing what is happening, and given two
> minutes thought, I would implement diff by generating (on the server)
> a list of text-modified files and report those to the client. The
> client would then start a series of appropriate requests to get the
> fulltexts for those files, and then produce the (unified) diffs.

If I'm understanding this right, then this makes Ev2 a lot less
flexible than Ev1. I'm using Ev1 in hgsubversion - the ability to just
drop some edits on the floor without needing a base text is
*invaluable*. The case I care about is usually something like this:
M /wiki/blah.wiki
M /trunk/foo/bar.txt

Where I do care about edits to trunk, but /wiki is outside of any tree
I track. With the current editor interface, I can just pass a noop
handler to txdelta_apply() and it's no big deal that I don't have a
base text. It sounds like (and please, correct me if I'm wrong) in Ev2
that this would incur the overhead of hitting the server for a BASE
for blah.wiki, reconstruct the new blah.wiki, which I'd then drop on
the floor anyway. Is that right?

Not that I'm necessarily saying you have to care - but the existing
API works very well for extremely unusual applications, and it sounds
like the new one isn't nearly as flexible for slightly kooky things.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2396248
Received on 2009-09-18 02:58:48 CEST

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