subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Kotkov <evgeny.kot...@visualsvn.com>
Subject Re: svn commit: r1803140 - in /subversion/trunk/subversion: include/svn_delta.h libsvn_delta/svndiff.c tests/libsvn_delta/random-test.c
Date Fri, 28 Jul 2017 12:17:24 GMT
Daniel Shahaf <d.s@daniel.shahaf.name> writes:

> I did misunderstand the relation between the two streams, …
>
>> The internal buffer doesn't grow beyond the (header size + max window
>> size in svndiff format), which is O(1).
>
> … but I still don't see why this statement is true.  The stream is
> written to by [a callback provided by] svn_txdelta_to_svndiff3(), and
> that function does not promise to write into the stream one svndiff
> window per call.  The API contract permits it to write into the stream
> more than one svndiff window per call, in which case the buffer's size
> will not be O(1).

I don't see any real issues with relying on the implementation detail (how
the window_handler() function works) of the API from the same module.

Perhaps, I could add a couple of comments on this.

To avoid this kind of coupling altogether, we could implement the alternative
approach from my previous e-mail.  Which is, provide a read handler that
emits the svndiff header, calls encode_window() per every txdelta window
and keeps the part of the encoded window that the caller can't accept at
this time, thus postponing it to the next call of svn_stream_read().  But, in
the meanwhile, I don't think that such implementation is currently required.


Regards,
Evgeny Kotkov

Mime
View raw message