subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1731834 - /subversion/trunk/subversion/libsvn_client/resolved.c
Date Tue, 23 Feb 2016 10:30:08 GMT
Author: stsp
Date: Tue Feb 23 10:30:08 2016
New Revision: 1731834

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

* subversion/libsvn_client/resolved.c
  (resolve_update_moved_away_node): New helper function.
  (svn_client_conflict_tree_get_resolution_options): Assign new helper to the
   appropriate option.

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=1731834&r1=1731833&r2=1731834&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Tue Feb 23 10:30:08 2016
@@ -940,6 +940,39 @@ resolve_update_break_moved_away(svn_clie
   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)
+{
+  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_moved_away_node(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;
+}
+
 /* Resolver options for a text conflict */
 static const svn_client_conflict_option_t text_conflict_options[] =
 {
@@ -1244,7 +1277,7 @@ svn_client_conflict_tree_get_resolution_
           option->description =
             _("apply incoming changes to move destination");
           option->conflict = conflict;
-          option->do_resolve_func = resolve_tree_conflict;
+          option->do_resolve_func = resolve_update_moved_away_node;
           APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
             option;
         }



Mime
View raw message