Bert Huijben wrote:
>> URL: http://svn.apache.org/r1465292
>> Log:
>> Add an 'ignore ancestry' parameter to the RA layer 'update'
> APIs, for
>> symmetry with the 'switch' APIs. Also add a scratch pool for the
> same
>> reason, although it is as yet unused.
>>
>> The 'switch' APIs historically ignored ancestry and have recently
> gained an
>> 'ignore ancestry' control (r1449413) so it can be disabled; they
> gained a
>> scratch pool at the same time. The 'update' APIs have historically
> never
>> ignored ancestry, and now they can.
>>
>> For ra_local and ra_serf this works for all existing server versions, but
>> for ra_svn this requires a new svnserve. (Our DAV protocol already
>> supported an 'ignore ancestry' flag.)
>>
>> Note: This 'ignore ancestry' option is the one that tells the
> server to
>> report the difference between two unrelated nodes of the same kind as a
>> content change instead of as a node replacement. This is not the option to
>> 'svn switch' that allows the switch URL to be unrelated to the
> current URL,
>> that is also named '--ignore-ancestry'.
>>
>> This was discussed in the dev@ email thread "Consistency between
> 'update'
>> and 'switch' APIs", starting on 2013-03-13, archived at e.g.
>> <http://svn.haxx.se/dev/archive-2013-03/0200.shtml>.
>>
>> * subversion/include/svn_ra.h,
>> subversion/libsvn_ra/ra_loader.c,
>> subversion/libsvn_ra/deprecated.c
>> (svn_ra_do_update3): New, renamed from svn_ra_do_update2(). Add
>> 'ignore_ancestry' and scratch pool parameters.
>> (svn_ra_do_update2): Deprecate, and rewrite as a wrapper.
>> (svn_ra_do_update): Adjust the call to the vtable method.
>> (svn_ra_do_switch3): Adjust the doc string.
>> (svn_ra_do_diff3): Adjust a reference in the doc string.
>>
>> * subversion/libsvn_ra/ra_loader.h
>> (svn_ra__vtable_t): Add 'ignore_ancestry' and scratch pool
> parameters to
>> the 'do_update' method. Update the doc string of the
> 'do_switch' method.
>>
>> * subversion/libsvn_ra/wrapper_template.h
>> (compat_do_update): Adjust the call to the vtable method.
>>
>> * subversion/libsvn_ra_local/ra_plugin.c
>> (svn_ra_local__do_update): Add 'ignore_ancestry' and scratch pool
>> parameters, the latter unused.
>>
>> * subversion/libsvn_ra_serf/ra_serf.h,
>> subversion/libsvn_ra_serf/update.c
>> (svn_ra_serf__do_update): Add 'ignore_ancestry' and scratch pool
>> parameters, the latter unused.
>>
>> * subversion/include/svn_ra_svn.h,
>> subversion/libsvn_ra_svn/marshal.c
>> (svn_ra_svn_write_cmd_update): Add the 'ignore_ancestry' flag.
>>
>> * subversion/libsvn_ra_svn/client.c
>> (ra_svn_update): Add 'ignore_ancestry' and scratch pool
> parameters, the
>> latter unused.
>>
>> * subversion/svnserve/serve.c
>> (update): Parse and use the 'ignore_ancestry' parameter; default
> to false
>> if not present. Simplify the 'send_copyfrom_args' handling to
> match how
>> it is done in 'switch'.
>>
>> * subversion/libsvn_ra_svn/protocol
>> Document the addition of the new parameter to the 'update'
> command.
>>
>> Update the callers, without ever requesting to ignore ancestry:
>>
>> * subversion/libsvn_client/copy_foreign.c
>> (copy_foreign_dir): Track the change to svn_ra_do_update3().
>>
>> * subversion/libsvn_client/export.c
>> (export_directory): Track the change to svn_ra_do_update3().
>>
>> * subversion/libsvn_client/update.c
>> (update_internal): Track the change to svn_ra_do_update3().
>>
>> * subversion/svnrdump/svnrdump.c
>> (dump_initial_full_revision): Track the change to svn_ra_do_update3().
>>
>> Modified:
>> subversion/trunk/subversion/include/svn_ra.h
>> subversion/trunk/subversion/include/svn_ra_svn.h
>> subversion/trunk/subversion/libsvn_client/copy_foreign.c
>> subversion/trunk/subversion/libsvn_client/export.c
>> subversion/trunk/subversion/libsvn_client/update.c
>> subversion/trunk/subversion/libsvn_ra/deprecated.c
>> subversion/trunk/subversion/libsvn_ra/ra_loader.c
>> subversion/trunk/subversion/libsvn_ra/ra_loader.h
>> subversion/trunk/subversion/libsvn_ra/wrapper_template.h
>> subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
>> subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
>> subversion/trunk/subversion/libsvn_ra_serf/update.c
>> subversion/trunk/subversion/libsvn_ra_svn/client.c
>> subversion/trunk/subversion/libsvn_ra_svn/marshal.c
>> subversion/trunk/subversion/libsvn_ra_svn/protocol
>> subversion/trunk/subversion/svnrdump/svnrdump.c
>> subversion/trunk/subversion/svnserve/serve.c
>
> <snip>
>> Modified: subversion/trunk/subversion/svnserve/serve.c
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve
>> .c?rev=1465292&r1=1465291&r2=1465292&view=diff
>> ==========================================================
>> ====================
>> --- subversion/trunk/subversion/svnserve/serve.c (original)
>> +++ subversion/trunk/subversion/svnserve/serve.c Sat Apr 6 19:27:09 2013
>> @@ -1813,16 +1813,17 @@ static svn_error_t *update(svn_ra_svn_co
>> svn_revnum_t rev;
>> const char *target, *full_path, *depth_word;
>> svn_boolean_t recurse;
>> - svn_boolean_t send_copyfrom_args;
>> - apr_uint64_t send_copyfrom_param;
>> + apr_uint64_t send_copyfrom_args; /* Optional; default FALSE */
>> + apr_uint64_t ignore_ancestry; /* Optional; default TRUE */
>
> For update ignore_ancestry should default to FALSE.
>
>> /* Default to unknown. Old clients won't send depth, but we'll
>> handle that by converting recurse if necessary. */
>> svn_depth_t depth = svn_depth_unknown;
>> svn_boolean_t is_checkout;
>>
>> /* Parse the arguments. */
>> - SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cb?wB",
> &rev,
>> &target,
>> - &recurse, &depth_word,
> &send_copyfrom_param));
>> + SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cb?wB?B",
> &rev,
>> &target,
>> + &recurse, &depth_word,
>> + &send_copyfrom_args,
> &ignore_ancestry));
>> target = svn_relpath_canonicalize(target, pool);
>>
>> if (depth_word)
>> @@ -1830,9 +1831,6 @@ static svn_error_t *update(svn_ra_svn_co
>> else
>> depth = SVN_DEPTH_INFINITY_OR_FILES(recurse);
>>
>> - send_copyfrom_args = (send_copyfrom_param ==
>> SVN_RA_SVN_UNSPECIFIED_NUMBER) ?
>> - FALSE : (svn_boolean_t) send_copyfrom_param;
>> -
>> full_path = svn_fspath__join(b->fs_path->data, target, pool);
>> /* Check authorization and authenticate the user if necessary. */
>> SVN_ERR(must_have_access(conn, pool, b, svn_authz_read, full_path,
>> FALSE));
>> @@ -1842,7 +1840,9 @@ static svn_error_t *update(svn_ra_svn_co
>>
>> SVN_ERR(accept_report(&is_checkout, NULL,
>> conn, pool, b, rev, target, NULL, TRUE,
>> - depth, send_copyfrom_args, FALSE));
>> + depth,
>> + (send_copyfrom_args == TRUE) /* send_copyfrom_args
> */,
>> + (ignore_ancestry != FALSE) /* ignore_ancestry
> */));
>
> So this check should be == TRUE
>
>> if (is_checkout)
>> {
>> SVN_ERR(log_command(b, conn, pool, "%s",
>>
>
> Thanks for Philip for discovering this problem as [Issue 4348] New - missing
> directory replace on update 1.8 svnserve 1.7 client.
Yes, thanks -- I messed up there. Fixed in r1466659. Please can you verify?
- Julian
Received on 2013-04-10 22:30:38 CEST