Greg Stein wrote:
> On Mon, Apr 26, 2010 at 10:45,  <julianf...@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.

Yes, agreed.

> 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.

True.

That code has since gone away, in r938107.

- Julian


Reply via email to