You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2011/05/02 21:30:01 UTC

Re: svn commit: r1098694 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/deprecated.c libsvn_wc/info.c svn/info-cmd.c

On Mon, May 2, 2011 at 13:58,  <hw...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/include/svn_wc.h Mon May  2 17:58:05 2011
> @@ -3011,7 +3011,7 @@ typedef struct svn_wc_info_t
>   const char *copyfrom_url;
>   svn_revnum_t copyfrom_rev;
>   apr_time_t text_time;
> -  const char *checksum;
> +  svn_checksum_t *checksum;

const!

>...
> +      if (info2->wc_info->checksum
> +            && info2->wc_info->checksum->kind == svn_checksum_md5)
> +        info->checksum          = svn_checksum_to_cstring(
> +                                        info2->wc_info->checksum, pool);
> +      else
> +        info->checksum          = NULL;

I would note this means the checksum will be NULL for users of the old
API (since the new API returns SHA-1 checksums). This could be viewed
as a regression.

>...

Cheers,
-g

Re: svn commit: r1098694 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/deprecated.c libsvn_wc/info.c svn/info-cmd.c

Posted by Hyrum K Wright <hy...@hyrumwright.org>.
On Mon, May 2, 2011 at 2:30 PM, Greg Stein <gs...@gmail.com> wrote:
> On Mon, May 2, 2011 at 13:58,  <hw...@apache.org> wrote:
>>...
>> +      if (info2->wc_info->checksum
>> +            && info2->wc_info->checksum->kind == svn_checksum_md5)
>> +        info->checksum          = svn_checksum_to_cstring(
>> +                                        info2->wc_info->checksum, pool);
>> +      else
>> +        info->checksum          = NULL;
>
> I would note this means the checksum will be NULL for users of the old
> API (since the new API returns SHA-1 checksums). This could be viewed
> as a regression.

The docs for the old struct indicate that the field may be NULL, so
callers need to be aware of that possibility aforehand.

Also, the regression isn't caused by the above change, but rather our
decision to change which checksum we return.  We've been returning
sha1's for weeks; at least now we let people know that fact. :)

-Hyrum