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

RE: svn commit: r1803143 - in /subversion/trunk/subversion: include/ libsvn_delta/ libsvn_ra_serf/ mod_dav_svn/

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 30 Aug 2017 12:24:09 +0200

> -----Original Message-----
> From: Daniel Shahaf [mailto:d.s_at_daniel.shahaf.name]
> Sent: woensdag 30 augustus 2017 07:07
> To: kotkov_at_apache.org
> Cc: dev_at_subversion.apache.org; commits_at_subversion.apache.org
> Subject: Re: svn commit: r1803143 - in /subversion/trunk/subversion:
> include/ libsvn_delta/ libsvn_ra_serf/ mod_dav_svn/
>
> Good morning Evgeny,
>
> kotkov_at_apache.org wrote on Thu, 27 Jul 2017 09:00 +0000:
> > +++ subversion/trunk/subversion/include/svn_delta.h Thu Jul 27 09:00:43
> 2017
> > @@ -678,6 +690,9 @@ svn_txdelta_skip_svndiff_window(apr_file
> > * @{
> > */
> >
> > +/* Forward declarations. */
> > +typedef struct svn_delta_editor_t svn_delta_editor_t;
> > +
> > /** A structure full of callback functions the delta source will invoke
> > * as it produces the delta.
> > *
> > @@ -859,7 +874,7 @@ svn_txdelta_skip_svndiff_window(apr_file
> > * dead; the only further operation which may be called on the editor
> > * is @c abort_edit.
> > */
> > -typedef struct svn_delta_editor_t
> > +struct svn_delta_editor_t
> > {
> > /** Set the target revision for this edit to @a target_revision. This
> > * call, if used, should precede all other editor calls.
> > @@ -1131,9 +1146,38 @@ typedef struct svn_delta_editor_t
> > svn_error_t *(*abort_edit)(void *edit_baton,
> > apr_pool_t *scratch_pool);
> >
> > + /** Apply a text delta stream, yielding the new revision of a file.
> > + *
> > + * @a file_baton indicates the file we're creating or updating, and the
> > + * ancestor file on which it is based; it is the baton set by some
> > + * prior @c add_file or @c open_file callback.
> > + *
> > + * @a open_func is a function that opens a #svn_txdelta_stream_t
> object.
> > + * @a open_baton is provided by the caller.
> > + *
> > + * @a base_checksum is the hex MD5 digest for the base text against
> > + * which the delta is being applied; it is ignored if NULL, and may
> > + * be ignored even if not NULL. If it is not ignored, it must match
>
> What's the rationale for allowing drivees to ignore the checksum?
>
> This leeway enables failure modes that wouldn't be possible without it.
> (Drivers that are aware of this leeway will validate checksums even if the
> drivee doesn't, leading to duplicate work; drivers that are unaware of this
> requirement might not get checksum errors they should have.)
>
> I get that you just copied this part of the docstring from apply_textdelta(),
> but I'd like to understand what's the rationale here. (And to see if this
> leeway should be deprecated)

I think this just documents current behavior. Yes a 1.9+ client against a 1.9+ server will always have a checksum, but this is not the case when mixing older clients and servers.

Original serf versions (form before we declared this stable) typically never provided the checksum. And in some cases bulk requests didn't have all the checksums either. I remember fixing a few cases around WC-NG to make sure all ra layers reported the same errors in some exceptional cases.

        Bert
Received on 2017-08-30 12:24:20 CEST

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.