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

Re: Change #6: Move textdeltas to the "other side" of the editor.

From: Branko Čibej <brane_at_xbc.nu>
Date: 2001-01-22 02:13:46 CET

Greg Stein wrote:

>> Why can't set_file_contents be just a case of apply_delta with a
>> delta_type of "new plain text"?
>
>
> That's exactly what I said. I was outvoted.

I wasn't there, but ... If you provide an "apply_delta" API without
specifying what kind of delta stream you can handle, I guess that
implies accepting all the delta types supported by Subversion. Using a
different API makes it clear you can't accept deltas.

If we use just the one API, then we'd have to provide a way to query the
editor's capabilities to see what kind of deltas it accepts (always a
pain for the driver app), or have the call fail if the delta type isn't
supported, which is even worse, IMO. (Actually, the "apply_delta" call
/must/ fail if the delta type isn't supported, but then you know you've
gone and linked your driver with an obsolete version of the library.)

With two APIs, the decision about which to use is straightforward and
can be made early, making it possible to propagate that info up the
chain of nested editors. It's not the editors' job to convert between
delta and plaintext formats.

-- 
Brane �ibej
    home:   <brane_at_xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej_at_hermes.si>   http://www.hermes-softlab.com/
     ACM:   <brane_at_acm.org>            http://www.acm.org/
Received on Sat Oct 21 14:36:19 2006

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.