You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2016/02/17 16:55:45 UTC

RE: svn commit: r1730716 - in /subversion/trunk/subversion: include/private/svn_wc_private.h include/svn_client.h libsvn_client/resolved.c libsvn_wc/conflicts.c svn/resolve-cmd.c


> -----Original Message-----
> From: stsp@apache.org [mailto:stsp@apache.org]
> Sent: dinsdag 16 februari 2016 18:05
> To: commits@subversion.apache.org
> Subject: svn commit: r1730716 - in /subversion/trunk/subversion:
> include/private/svn_wc_private.h include/svn_client.h
> libsvn_client/resolved.c libsvn_wc/conflicts.c svn/resolve-cmd.c
> 
> Author: stsp
> Date: Tue Feb 16 17:05:25 2016
> New Revision: 1730716
> 
> URL: http://svn.apache.org/viewvc?rev=1730716&view=rev
> Log:
> Introduce svn_wc__conflict_tree_update_raise_moved_away(), a private
> libsvn_wc API function for use by libsvn_client's conflict resolver.
> 
> This API may raise an error if other tree conflicts need to be resolved before
> the tree conflict specified by the caller. Make the new conflict resolver
> handle this case. (This behaviour is now exposed to the public API rather
> than
> hidden in libsvn_wc as was the case with the legacy conflict resolver.)
> 
> * subversion/include/private/svn_wc_private.h
>   (svn_wc__conflict_tree_update_raise_moved_away): Declare.
> 
> * subversion/include/svn_client.h
>   (svn_client_conflict_tree_resolve): Document new error behavior in case a
>    conflict cannot be resolved yet.
> 
> * subversion/libsvn_client/resolved.c
>   (conflict_option_resolve_func_t): Document new error behavior in case a
>    conflict cannot be resolved yet.
>   (resolve_tree_conflict): Use
> svn_wc__conflict_tree_update_raise_moved_away()
>    if applicable.
> 
> * subversion/libsvn_wc/conflicts.c
>   (svn_wc__conflict_tree_update_raise_moved_away): Implement.
> 
> * subversion/svn/resolve-cmd.c
>   (handle_tree_conflict_resolution_failure): New helper function. Copied
> from
>    legacy libsvn_wc conflict resolver code.
>   (conflict_status_walker): Handle tree conflicts which cannot be resolved
>    right away by retrying them later after resolving other conflicts first.
> 
> Modified:
>     subversion/trunk/subversion/include/private/svn_wc_private.h
>     subversion/trunk/subversion/include/svn_client.h
>     subversion/trunk/subversion/libsvn_client/resolved.c
>     subversion/trunk/subversion/libsvn_wc/conflicts.c
>     subversion/trunk/subversion/svn/resolve-cmd.c
> 
> Modified: subversion/trunk/subversion/libsvn_client/resolved.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/re
> solved.c?rev=1730716&r1=1730715&r2=1730716&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_client/resolved.c (original)
> +++ subversion/trunk/subversion/libsvn_client/resolved.c Tue Feb 16
> 17:05:25 2016
> @@ -175,7 +175,11 @@ struct svn_client_conflict_t
>    const svn_wc_conflict_description2_t *legacy_tree_conflict;
>  };
> 
> -/* Resolves conflict to OPTION and sets CONFLICT->RESOLUTION
> accordingly. */
> +/* Resolves conflict to OPTION and sets CONFLICT->RESOLUTION
> accordingly.
> + *
> + * May raise an error in case the conflict could not be resolved. A common
> + * case would be a tree conflict the resolution of which depends on other
> + * tree conflicts to be resolved first. */
>  typedef svn_error_t *(*conflict_option_resolve_func_t)(
>    svn_client_conflict_option_t *option,
>    svn_client_conflict_t *conflict,
> @@ -793,6 +797,7 @@ resolve_tree_conflict(svn_client_conflic
>    const char *local_abspath;
>    const char *lock_abspath;
>    svn_wc_conflict_reason_t local_change;
> +  svn_wc_conflict_action_t incoming_change;
>    svn_client_ctx_t *ctx = conflict->ctx;
>    svn_wc_operation_t operation;
>    svn_error_t *err;
> @@ -806,19 +811,30 @@ resolve_tree_conflict(svn_client_conflic
>                                                   local_abspath,
>                                                   scratch_pool, scratch_pool));
> 
> -  if (option_id == svn_client_conflict_option_merged_text &&
> +  if ((option_id == svn_client_conflict_option_merged_text ||
> +       (option_id ==
> svn_client_conflict_option_update_any_moved_away_children
> +        && incoming_change == svn_wc_conflict_action_edit)) &&

The new variable incoming_change is used uninitialized here, breaking the build on the Windows bots.

See https://ci.apache.org/builders/svn-windows-local/builds/1046

	Bert

>        (operation == svn_wc_operation_update ||
>         operation == svn_wc_operation_switch) &&
>        (local_change == svn_wc_conflict_reason_deleted ||
>         local_change == svn_wc_conflict_reason_replaced))
>      {
> -      err = svn_wc__conflict_tree_update_break_moved_away(ctx->wc_ctx,
> -                                                          local_abspath,
> -                                                          ctx->cancel_func,
> -                                                          ctx->cancel_baton,
> -                                                          ctx->notify_func2,
> -                                                          ctx->notify_baton2,
> -                                                          scratch_pool);
> +      if (option_id == svn_client_conflict_option_merged_text)
> +        err = svn_wc__conflict_tree_update_break_moved_away(ctx-
> >wc_ctx,
> +                                                            local_abspath,
> +                                                            ctx->cancel_func,
> +                                                            ctx->cancel_baton,
> +                                                            ctx->notify_func2,
> +                                                            ctx->notify_baton2,
> +                                                            scratch_pool);
> +      else
> +        err = svn_wc__conflict_tree_update_raise_moved_away(ctx->wc_ctx,
> +                                                            local_abspath,
> +                                                            ctx->cancel_func,
> +                                                            ctx->cancel_baton,
> +                                                            ctx->notify_func2,
> +                                                            ctx->notify_baton2,
> +                                                            scratch_pool);
>      }
>    else
>      {


Re: svn commit: r1730716 - in /subversion/trunk/subversion: include/private/svn_wc_private.h include/svn_client.h libsvn_client/resolved.c libsvn_wc/conflicts.c svn/resolve-cmd.c

Posted by Stefan Sperling <st...@apache.org>.
On Wed, Feb 17, 2016 at 04:55:45PM +0100, Bert Huijben wrote:
> The new variable incoming_change is used uninitialized here, breaking the build on the Windows bots.
> 
> See https://ci.apache.org/builders/svn-windows-local/builds/1046

Thanks for the heads up! Fixed in r1730943.