You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/02/23 12:03:00 UTC

svn commit: r1731837 - /subversion/trunk/subversion/libsvn_client/resolved.c

Author: stsp
Date: Tue Feb 23 11:03:00 2016
New Revision: 1731837

URL: http://svn.apache.org/viewvc?rev=1731837&view=rev
Log:
Continue breaking up the massive resolve_tree_conflict() function into 
smaller per-resolution option handlers.

This repairs stat_test 45 (broken since r1731832).

* subversion/libsvn_client/resolved.c
  (resolve_update_raise_moved_away): New helper function.
  (svn_client_conflict_tree_get_resolution_options): Use new helper.

Modified:
    subversion/trunk/subversion/libsvn_client/resolved.c

Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1731837&r1=1731836&r2=1731837&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Tue Feb 23 11:03:00 2016
@@ -942,6 +942,39 @@ resolve_update_break_moved_away(svn_clie
 
 /* Implements conflict_option_resolve_func_t. */
 static svn_error_t *
+resolve_update_raise_moved_away(svn_client_conflict_option_t *option,
+                                svn_client_conflict_t *conflict,
+                                apr_pool_t *scratch_pool)
+{
+  const char *local_abspath;
+  const char *lock_abspath;
+  svn_client_ctx_t *ctx = conflict->ctx;
+  svn_error_t *err;
+
+  local_abspath = svn_client_conflict_get_local_abspath(conflict);
+
+  SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx,
+                                                 local_abspath,
+                                                 scratch_pool, scratch_pool));
+  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);
+  err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx,
+                                                                 lock_abspath,
+                                                                 scratch_pool));
+  SVN_ERR(err);
+
+  conflict->resolution_tree = svn_client_conflict_option_get_id(option);
+
+  return SVN_NO_ERROR;
+}
+
+/* Implements conflict_option_resolve_func_t. */
+static svn_error_t *
 resolve_update_moved_away_node(svn_client_conflict_option_t *option,
                                svn_client_conflict_t *conflict,
                                apr_pool_t *scratch_pool)
@@ -1314,7 +1347,7 @@ svn_client_conflict_tree_get_resolution_
               option->description =
                 _("prepare for updating moved-away children, if any");
               option->conflict = conflict;
-              option->do_resolve_func = resolve_update_break_moved_away;
+              option->do_resolve_func = resolve_update_raise_moved_away;
               APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
                 option;
             }