Julian Foad wrote:
> I noticed this bug in failing to convert "recursive" to "depth". Any
> comments before I commit it?
Committed revision 31514.
Being deprecated APIs, they're not covered by any of our tests, so at least one
review would be appreciated.
Thanks.
- Julian
> ------------------------------------------------------------------------
>
> [[[
> Fix a "depth" bug in deprecated APIs svn_wc_resolved_conflict() and
> svn_wc_resolved_conflict2(), whereby a "recursive" request would be
> wrongly executed as (probably) depth=files.
>
> Also use the depth conversion macros everywhere, for conciseness and
> consistency.
>
> * subversion/libsvn_client/resolved.c
> (svn_client_resolved): Use the SVN_DEPTH_INFINITY_OR_EMPTY macro.
> * subversion/libsvn_client/revert.c
> (svn_client_revert): Use the SVN_DEPTH_INFINITY_OR_EMPTY macro.
> * subversion/libsvn_wc/adm_ops.c
> (svn_wc_revert2): Use the SVN_DEPTH_INFINITY_OR_EMPTY macro.
> (svn_wc_resolved_conflict2): Use the correct depth for recursive operation.
> * subversion/svnserve/serve.c
> (status): Use the SVN_DEPTH_INFINITY_OR_EMPTY macro.
> ]]]
>
> Index: subversion/libsvn_client/resolved.c
> ===================================================================
> --- subversion/libsvn_client/resolved.c (revision 31513)
> +++ subversion/libsvn_client/resolved.c (working copy)
> @@ -38,7 +38,7 @@ svn_client_resolved(const char *path,
> svn_client_ctx_t *ctx,
> apr_pool_t *pool)
> {
> - svn_depth_t depth = (recursive ? svn_depth_infinity : svn_depth_empty);
> + svn_depth_t depth = SVN_DEPTH_INFINITY_OR_EMPTY(recursive);
> return svn_client_resolve(path, depth,
> svn_wc_conflict_choose_merged, ctx, pool);
> }
> Index: subversion/libsvn_client/revert.c
> ===================================================================
> --- subversion/libsvn_client/revert.c (revision 31513)
> +++ subversion/libsvn_client/revert.c (working copy)
> @@ -157,7 +157,6 @@ svn_client_revert(const apr_array_header
> svn_client_ctx_t *ctx,
> apr_pool_t *pool)
> {
> - return svn_client_revert2(paths,
> - recursive ? svn_depth_infinity : svn_depth_empty,
> + return svn_client_revert2(paths, SVN_DEPTH_INFINITY_OR_EMPTY(recursive),
> NULL, ctx, pool);
> }
> Index: subversion/libsvn_wc/adm_ops.c
> ===================================================================
> --- subversion/libsvn_wc/adm_ops.c (revision 31513)
> +++ subversion/libsvn_wc/adm_ops.c (working copy)
> @@ -2312,7 +2312,7 @@ svn_wc_revert2(const char *path,
> apr_pool_t *pool)
> {
> return svn_wc_revert3(path, parent_access,
> - recursive ? svn_depth_infinity : svn_depth_empty,
> + SVN_DEPTH_INFINITY_OR_EMPTY(recursive),
> use_commit_times, NULL, cancel_func, cancel_baton,
> notify_func, notify_baton, pool);
> }
> @@ -2880,7 +2880,8 @@ svn_wc_resolved_conflict2(const char *pa
> apr_pool_t *pool)
> {
> return svn_wc_resolved_conflict3(path, adm_access, resolve_text,
> - resolve_props, recurse,
> + resolve_props,
> + SVN_DEPTH_INFINITY_OR_EMPTY(recurse),
> svn_wc_conflict_choose_merged,
> notify_func, notify_baton, cancel_func,
> cancel_baton, pool);
> Index: subversion/svnserve/serve.c
> ===================================================================
> --- subversion/svnserve/serve.c (revision 31513)
> +++ subversion/svnserve/serve.c (working copy)
> @@ -1648,7 +1648,7 @@ static svn_error_t *status(svn_ra_svn_co
> if (depth_word)
> depth = svn_depth_from_word(depth_word);
> else
> - depth = recurse ? svn_depth_infinity : svn_depth_empty;
> + depth = SVN_DEPTH_INFINITY_OR_EMPTY(recurse);
>
> SVN_ERR(trivial_auth_request(conn, pool, b));
> if (!SVN_IS_VALID_REVNUM(rev))
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
--
http://www.foad.me.uk/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-29 18:11:39 CEST