On Tue, Sep 30, 2008 at 7:28 AM, Hyrum K. Wright
<hyrum_wright_at_mail.utexas.edu> wrote:
> Greg Stein wrote:
>> On Thu, Sep 25, 2008 at 9:35 PM, <hwright_at_tigris.org> wrote:
>...
>>> + /* If our caller provided a checksum of the right kind to compare, do so. */
>>> + if (checksum
>>> + && checksum->kind == rep_checksum->kind
>>> + && !svn_checksum_match(checksum, rep_checksum))
>>
>> Why check the kind? Doesn't svn_checksum_match() do that? And if not,
>> then it *should*.
>
> If the kinds differ, svn_checksum_match() will return FALSE. In this case, we
> don't want that, we don't even want to check different kinds of checksums. The
> root of the problem here is that since we're storing sha1 checksums, but dump
> files and ra frontends are giving us md5 checksums, we don't want to fail just
> because a checksum mismatch.

Ah. Gotcha.

Sounds a bit dangerous though, as those checksums are looking for
(say) on-wire corruption, or on-disk corruption.

>...
>> And do we really need *both* forms? Why?
>
> See above. This is an attempt (albeit fruitless at this point), to compute
> *both* checksums, so that we can compare the same type in situations such as the
> above.