You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Hyrum K Wright <hy...@wandisco.com> on 2011/09/01 20:49:18 UTC

Ev2 and text deltas

Quick question: is there a method via Ev2 to set text deltas?  I see
svn_editor_set_text(), but that appears to just apply full texts to
the target (via the given stream), rather than text deltas.  This
seems odd.  Why wouldn't we use text deltas instead of a simple
stream?

Also, after reading the docs in svn_editor.h, it feels like all text
contents are sent in 'postfix' mode.  In other words, in Ev1, we have
the following sequence of calls:
 open_file()
 close_file()
 ...
 apply_textdelta()

Whereas in Ev2 we have:
 add_file()
 ...
 set_text()

Just trying a bit harder to grok Ev2,
-Hyrum

-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: Ev2 and text deltas

Posted by Greg Stein <gs...@gmail.com>.
On Fri, Sep 2, 2011 at 17:31, Hyrum K Wright <hy...@wandisco.com> wrote:
> On Fri, Sep 2, 2011 at 4:17 PM, Greg Stein <gs...@gmail.com> wrote:
>...
>> Hyrum -- was your question answered? In particular, my thoughts around
>> using set_text() rather than deltas is best explained by this message
>> in the thread Stefen referenced:
>>  http://svn.haxx.se/dev/archive-2009-09/0307.shtml
>>
>> Let me know if there is more that I can help with.
>
> Yes, that thread was quite illuminating.  I'm just doing some poking
> of Ev2, attempting to see how much more of it I can grok.

Make sure you see my rough-thinking in notes/editor-v2.txt, too.

Cheers,
-g

Re: Ev2 and text deltas

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Sep 2, 2011 at 4:17 PM, Greg Stein <gs...@gmail.com> wrote:
> On Thu, Sep 1, 2011 at 17:17, Stefan Sperling <st...@elego.de> wrote:
>> On Thu, Sep 01, 2011 at 01:49:18PM -0500, Hyrum K Wright wrote:
>>> Quick question: is there a method via Ev2 to set text deltas?  I see
>>> svn_editor_set_text(), but that appears to just apply full texts to
>>> the target (via the given stream), rather than text deltas.  This
>>> seems odd.  Why wouldn't we use text deltas instead of a simple
>>> stream?
>>>
>>> Also, after reading the docs in svn_editor.h, it feels like all text
>>> contents are sent in 'postfix' mode.  In other words, in Ev1, we have
>>> the following sequence of calls:
>>>  open_file()
>>>  close_file()
>>>  ...
>>>  apply_textdelta()
>>>
>>> Whereas in Ev2 we have:
>>>  add_file()
>>>  ...
>>>  set_text()
>>>
>>> Just trying a bit harder to grok Ev2,
>>
>> Some past discussion of this starts here:
>> http://svn.haxx.se/dev/archive-2009-09/0295.shtml
>
> Hyrum -- was your question answered? In particular, my thoughts around
> using set_text() rather than deltas is best explained by this message
> in the thread Stefen referenced:
>  http://svn.haxx.se/dev/archive-2009-09/0307.shtml
>
> Let me know if there is more that I can help with.

Yes, that thread was quite illuminating.  I'm just doing some poking
of Ev2, attempting to see how much more of it I can grok.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: Ev2 and text deltas

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Sep 1, 2011 at 17:17, Stefan Sperling <st...@elego.de> wrote:
> On Thu, Sep 01, 2011 at 01:49:18PM -0500, Hyrum K Wright wrote:
>> Quick question: is there a method via Ev2 to set text deltas?  I see
>> svn_editor_set_text(), but that appears to just apply full texts to
>> the target (via the given stream), rather than text deltas.  This
>> seems odd.  Why wouldn't we use text deltas instead of a simple
>> stream?
>>
>> Also, after reading the docs in svn_editor.h, it feels like all text
>> contents are sent in 'postfix' mode.  In other words, in Ev1, we have
>> the following sequence of calls:
>>  open_file()
>>  close_file()
>>  ...
>>  apply_textdelta()
>>
>> Whereas in Ev2 we have:
>>  add_file()
>>  ...
>>  set_text()
>>
>> Just trying a bit harder to grok Ev2,
>
> Some past discussion of this starts here:
> http://svn.haxx.se/dev/archive-2009-09/0295.shtml

Hyrum -- was your question answered? In particular, my thoughts around
using set_text() rather than deltas is best explained by this message
in the thread Stefen referenced:
  http://svn.haxx.se/dev/archive-2009-09/0307.shtml

Let me know if there is more that I can help with.

Cheers,
-g

Re: Ev2 and text deltas

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Sep 01, 2011 at 01:49:18PM -0500, Hyrum K Wright wrote:
> Quick question: is there a method via Ev2 to set text deltas?  I see
> svn_editor_set_text(), but that appears to just apply full texts to
> the target (via the given stream), rather than text deltas.  This
> seems odd.  Why wouldn't we use text deltas instead of a simple
> stream?
> 
> Also, after reading the docs in svn_editor.h, it feels like all text
> contents are sent in 'postfix' mode.  In other words, in Ev1, we have
> the following sequence of calls:
>  open_file()
>  close_file()
>  ...
>  apply_textdelta()
> 
> Whereas in Ev2 we have:
>  add_file()
>  ...
>  set_text()
> 
> Just trying a bit harder to grok Ev2,

Some past discussion of this starts here:
http://svn.haxx.se/dev/archive-2009-09/0295.shtml