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

Re: Why do we check the base checksum so often?

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 6 Feb 2012 15:44:33 -0500

On Mon, Feb 6, 2012 at 15:41, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> On 02/06/2012 03:21 PM, Hyrum K Wright wrote:
>...
>> Receivers (such as ours) are making unreasonable assumptions, in my
>> opinion.  The docs for apply_textdelta() read thusly:

It is hand-wavey voodoo, but that is how it has been built. There is
an implicit assumption between the Ev1 driver and receiver. Too late
now...

[and Ev2 was designed to try and get rid of these silly assumptions]

>>
>>    * @a base_checksum is the hex MD5 digest for the base text against
>>    * which the delta is being applied; it is ignored if NULL, and may
>>    * be ignored even if not NULL.  If it is not ignored, it must match
>>    * the checksum of the base text against which svndiff data is being
>>    * applied; if it does not, @c apply_textdelta or the @a *handler call
>>    * which detects the mismatch will return the error
>>    * SVN_ERR_CHECKSUM_MISMATCH (if there is no base text, there may
>>    * still be an error if @a base_checksum is neither NULL nor the hex
>>    * MD5 checksum of the empty string).
>>
>> All the docs guarantee is that this checksum must match the base
>> checksum against which the delta is being applied.  They don't assume
>> that the receiver has the content, nor that it will even pay attention
>> to the checksums themselves.  If the receiver has done some kind of
>> backdoor secret handshake that's outside the scope of the delta
>> editor, and it should (reasonably) not care.
>>
>> I maintain that it is still legal (though perhaps not very useful) for
>> the base checksum supplied by apply_textdelta() to be whatever
>> apply_textdelta() wants it to be.
>
> Sorry, Hyrum, but I sincerely believe you are trying to bend this API to
> your will just to work around a tough engineering task.  :-)

<pile mode="on">

  Agreed :-)

</pile>

>...

Cheers,
-g
Received on 2012-02-06 21:45:05 CET

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.