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

Re: svn commit: r13855 - in trunk/subversion: include libsvn_fs_base libsvn_fs_fs libsvn_ra_dav libsvn_ra_svn libsvn_repos libsvn_subr libsvn_wc mod_dav_svn svnserve

From: <kfogel_at_collab.net>
Date: 2005-04-04 21:55:53 CEST

Greg Hudson <ghudson@MIT.EDU> writes:
> On Sat, 2005-04-02 at 10:06, jpieper@tigris.org wrote:
> > Do not assume that svn_md5_digest_to_cstring will always return a
> > valid string. If its input digest is all 0's, it will return a NULL
> > instead.
>
> Wow. What a horrible botch (not yours).

Mine actually (though I'm not sure I agree it's a horrible botch) :-).

> What if a file happens to digest to all-zeros? If the filesystem code
> is going to special-case this particular digest, then the special case
> should be in the filesystem code, not buried deep in libsvn_subr.

Note that the filesystem code does use the all-zeros checksum
specially. See the documentation for svn_fs_file_md5_checksum():

 * [...]
 *
 * If the filesystem does not have a prerecorded checksum for @a path,
 * do not calculate a checksum dynamically, just put all 0's into @a
 * digest. (By convention, the all-zero checksum is considered to
 * match any checksum.)
 *
 * [...]

Or are you just saying that the horrible botch is the fact that this
svn_fs special case is affecting an API in libsvn_subr? I could buy
that, and would be in favor of your suggestion below:

> I'd prefer the new function be called svn_digest_to_cstring2, and the
> old function be deprecated.

I'd be happy to make that happen right now, if no one objects.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 4 22:24:09 2005

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.