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

Re: svn commit: r938068 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/commit_util.c libsvn_wc/adm_crawler.c libsvn_wc/deprecated.c libsvn_wc/wc.h

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 26 Apr 2010 11:39:12 -0400

On Mon, Apr 26, 2010 at 10:45, <julianfoad_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Mon Apr 26 14:45:55 2010
>...
> @@ -1057,7 +1058,8 @@ svn_wc__internal_transmit_text_deltas(co
>   void *wh_baton;
>   const svn_checksum_t *expected_md5_checksum;
>   svn_checksum_t *verify_checksum = NULL;  /* calc'd MD5 of BASE_STREAM */
> -  svn_checksum_t *local_checksum;  /* calc'd MD5 of LOCAL_STREAM */
> +  svn_checksum_t *local_md5_checksum;  /* calc'd MD5 of LOCAL_STREAM */
> +  svn_checksum_t *local_sha1_checksum;  /* calc'd SHA1 of LOCAL_STREAM */
>   svn_error_t *err;
>   svn_stream_t *base_stream;  /* delta source */
>   svn_stream_t *local_stream;  /* delta target: LOCAL_ABSPATH transl. to NF */
> @@ -1190,10 +1192,16 @@ svn_wc__internal_transmit_text_deltas(co
>                                     &handler, &wh_baton));
>   }
>
> +  if (new_text_base_sha1_checksum)
> +    local_stream = svn_stream_checksummed2(local_stream,
> +                                           &local_sha1_checksum,
> +                                           NULL, svn_checksum_sha1, TRUE,
> +                                           scratch_pool);

It's good to include the parameter names on free-floating constants
like that. Makes it easier to tell what that TRUE is there for.

In this case, it is the param READ_ALL. I don't think you want that.
The stream-close cannot tell if you *intended* to close early or not.
In this particular case, you are going to read thru to the end, and if
you close early, then it is because of an error and you don't want
that checksum value.

>...

Cheers,
-g
Received on 2010-04-26 17:39:41 CEST

This is an archived mail posted to the Subversion Dev mailing list.