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

RE: svn commit: r1091187 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/switch.c libsvn_client/update.c libsvn_wc/deprecated.c libsvn_wc/update_editor.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 14 Apr 2011 22:27:36 +0200

> -----Original Message-----
> From: Julian Foad [mailto:julian.foad_at_wandisco.com]
> Sent: dinsdag 12 april 2011 18:03
> To: dev_at_subversion.apache.org
> Cc: commits_at_subversion.apache.org
> Subject: Re: svn commit: r1091187 - in /subversion/trunk/subversion:
> include/svn_wc.h libsvn_client/switch.c libsvn_client/update.c
> libsvn_wc/deprecated.c libsvn_wc/update_editor.c
>
> Hi Bert. A question about the "server handles [depth] filtering"
> flag...
>
> On Mon, 2011-04-11, rhuijben_at_apache.org wrote:
> > Author: rhuijben
> > Date: Mon Apr 11 19:58:27 2011
> > New Revision: 1091187
> >
> > URL: http://svn.apache.org/viewvc?rev=1091187&view=rev
> > Log:
> > Update the svn_wc_get_update_editor3() and
> svn_wc_get_switch_editor3() apis
> > to accept two new booleans: One to allow disabling the automatic
> conversion
> > of local additions into modifications and one to allow disabling the depth
> > filter (Which is only needed when talking to pre 1.5 servers).
> >
> > Disabling the depth filter allows avoiding many db operations (should be
> set by
> > libsvn_client when it knows the server understands depth), while the local
> > additions filter is for clients that prefer to explicitly handle tree
> > conflicts over the update editor magic.
> >
> > * subversion/include/svn_wc.h
> > (svn_wc_get_update_editor4): Update prototype and documentation
> > (svn_wc_get_update_editor3): Update documentation.
> > (svn_wc_get_update_switch4): Update prototype and documentation
> > (svn_wc_get_update_switch3): Update documentation.
> >
> > * subversion/libsvn_client/switch.c
> > (switch_internal): Update caller. Report that the server handles depth
> when
> > depth is unknown.
> [...]
>
> > Modified: subversion/trunk/subversion/include/svn_wc.h
> > URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc
> .h?rev=1091187&r1=1091186&r2=1091187&view=diff
> >
> ==========================================================
> ====================
> > --- subversion/trunk/subversion/include/svn_wc.h (original)
> > +++ subversion/trunk/subversion/include/svn_wc.h Mon Apr 11 19:58:27
> 2011
> > @@ -5302,6 +5302,9 @@ typedef svn_error_t *(*svn_wc_get_file_t
> > * If @a allow_unver_obstructions is TRUE, then allow unversioned
> > * obstructions when adding a path.
> > *
> > + * If @a adds_as_modification is TRUE, local additions are seen as a local
> > + * modification of added nodes when the node kind matches.
> > + *
> > * If @a depth is #svn_depth_infinity, update fully recursively.
> > * Else if it is #svn_depth_immediates, update the uppermost
> > * directory, its file entries, and the presence or absence of
> > @@ -5315,6 +5318,10 @@ typedef svn_error_t *(*svn_wc_get_file_t
> > * #svn_depth_unknown, then in addition to updating PATHS, also set
> > * their sticky ambient depth value to @a depth.
> > *
> > + * If @a repository_performs_filtering is TRUE, assume that the server
> handles
> > + * the ambient depth filtering, so this doesn't have to be handled in the
> > + * editor.
> > + *
> > * @since New in 1.7.
> > */
> > svn_error_t *
> > @@ -5328,6 +5335,8 @@ svn_wc_get_update_editor4(const svn_delt
> > svn_depth_t depth,
> > svn_boolean_t depth_is_sticky,
> > svn_boolean_t allow_unver_obstructions,
> > + svn_boolean_t adds_as_modification,
> > + svn_boolean_t server_performs_filtering,
> > const char *diff3_cmd,
> > const apr_array_header_t *preserved_exts,
> > svn_wc_conflict_resolver_func_t conflict_func,
> > @@ -5344,7 +5353,8 @@ svn_wc_get_update_editor4(const svn_delt
> > /** Similar to svn_wc_get_update_editor4, but uses access batons and
> relative
> > * path instead of a working copy context-abspath pair and
> > * svn_wc_traversal_info_t instead of an externals callback. Also,
> > - * @a fetch_func and @a fetch_baton are ignored.
> > + * @a fetch_func and @a fetch_baton are ignored. Always sets
> > + * server_performs_filtering to FALSE.
> > *
> > * If @a ti is non-NULL, record traversal info in @a ti, for use by
> > * post-traversal accessors such as svn_wc_edited_externals().
> > @@ -5352,6 +5362,9 @@ svn_wc_get_update_editor4(const svn_delt
> > * All locks, both those in @a anchor and newly acquired ones, will be
> > * released when the editor driver calls @c close_edit.
> > *
> > + * Always sets @a adds_as_modification to TRUE and @a
> server_performs_filtering
> > + * to FALSE.
> > + *
> > * @since New in 1.5.
> > * @deprecated Provided for backward compatibility with the 1.6 API.
> > */
> > @@ -5454,6 +5467,8 @@ svn_wc_get_switch_editor4(const svn_delt
> > svn_depth_t depth,
> > svn_boolean_t depth_is_sticky,
> > svn_boolean_t allow_unver_obstructions,
> > + svn_boolean_t adds_as_modification,
> > + svn_boolean_t server_performs_filtering,
> > const char *diff3_cmd,
> > const apr_array_header_t *preserved_exts,
> > svn_wc_conflict_resolver_func_t conflict_func,
> > @@ -5477,6 +5492,9 @@ svn_wc_get_switch_editor4(const svn_delt
> > * All locks, both those in @a anchor and newly acquired ones, will be
> > * released when the editor driver calls @c close_edit.
> > *
> > + * Always sets @a adds_as_modification to TRUE and @a
> server_performs_filtering
> > + * to FALSE.
> > + *
> > * @since New in 1.5.
> > * @deprecated Provided for backward compatibility with the 1.6 API.
> > */
> >
> > Modified: subversion/trunk/subversion/libsvn_client/switch.c
> > URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/s
> witch.c?rev=1091187&r1=1091186&r2=1091187&view=diff
> >
> ==========================================================
> ====================
> > --- subversion/trunk/subversion/libsvn_client/switch.c (original)
> > +++ subversion/trunk/subversion/libsvn_client/switch.c Mon Apr 11
> 19:58:27 2011
> > @@ -209,11 +209,18 @@ switch_internal(svn_revnum_t *result_rev
> > efb.externals_old = apr_hash_make(pool);
> > efb.ambient_depths = apr_hash_make(pool);
> > efb.result_pool = pool;
> > +
> > + SVN_ERR(svn_ra_has_capability(ra_session, &server_supports_depth,
> > + SVN_RA_CAPABILITY_DEPTH, pool));
> > +
> > SVN_ERR(svn_wc_get_switch_editor4(&switch_editor,
> &switch_edit_baton,
> > &revnum, ctx->wc_ctx, anchor_abspath,
> > target, switch_rev_url, use_commit_times,
> > depth,
> > depth_is_sticky, allow_unver_obstructions,
> > + TRUE,
> > + server_supports_depth
> > + && (depth == svn_depth_unknown),
>
> Why do you only pass this "server supports depth" knowledge on when the
> requested depth is "unknown"? Does "server supports depth" not mean
> quite the same as "server handles depth filtering"?

Fixed in r1092502,

        Bert
Received on 2011-04-14 22:28:12 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.