Stefan Sperling <s...@elego.de> writes:

> I'm guessing that you are mixing up repository paths and working copy paths.
> Perhaps your expectation is that a repository-side path in the conflict
> description is changed by svn_client_conflict_option_set_moved_to_abspath()?
> If you do, then the API's behaviour will seem confusing indeed.

I think that the actual problem here is that calling the
svn_client_conflict_option_set_moved_to_repos_relpath() function
does not update the description (and the target path in the description
could have changed).

In other words, probably we're looking at something along these lines:

[[[
Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h (revision 1782081)
+++ subversion/include/svn_client.h (working copy)
@@ -4495,6 +4495,7 @@ svn_error_t *
 svn_client_conflict_option_set_moved_to_repos_relpath(
   svn_client_conflict_option_t *option,
   int preferred_move_target_idx,
+  svn_client_ctx_t *ctx,
   apr_pool_t *scratch_pool);

 /**
Index: subversion/libsvn_client/conflicts.c
===================================================================
--- subversion/libsvn_client/conflicts.c (revision 1782081)
+++ subversion/libsvn_client/conflicts.c (working copy)
@@ -9414,6 +9414,7 @@ svn_error_t *
 svn_client_conflict_option_set_moved_to_repos_relpath(
   svn_client_conflict_option_t *option,
   int preferred_move_target_idx,
+  svn_client_ctx_t *ctx,
   apr_pool_t *scratch_pool)
 {
   svn_client_conflict_t *conflict = option->conflict;
@@ -9466,6 +9467,14 @@ svn_client_conflict_option_set_moved_to_repos_relp
       if (strcmp(move_target_repos_relpath, repos_relpath) == 0)
         {
           details->move_target_repos_relpath = repos_relpath;
+          /* Update option description. */
+          SVN_ERR(describe_incoming_move_merge_conflict_option(
+                    &option->description,
+                    conflict, ctx,
+                    details,
+                    conflict->pool,
+                    scratch_pool));
+
           return SVN_NO_ERROR;
         }
     }
Index: subversion/svn/conflict-callbacks.c
===================================================================
--- subversion/svn/conflict-callbacks.c (revision 1782081)
+++ subversion/svn/conflict-callbacks.c (working copy)
@@ -1751,16 +1751,9 @@ handle_tree_conflict(svn_boolean_t *resolved,
           if (conflict_option)
             {
               SVN_ERR(svn_client_conflict_option_set_moved_to_repos_relpath(
-                        conflict_option, preferred_move_target_idx, iterpool));
+                        conflict_option, preferred_move_target_idx,
+                        ctx, iterpool));

-              /* Update option description. */
-              SVN_ERR(build_tree_conflict_options(
-                        &tree_conflict_options,
-                        &possible_moved_to_repos_relpaths,
-                        &possible_moved_to_abspaths,
-                        NULL, conflict, ctx,
-                        scratch_pool, scratch_pool));
-
               /* Update conflict description. */
               SVN_ERR(svn_client_conflict_tree_get_description(
                        &incoming_change_description, &local_change_description,
]]]


Regards,
Evgeny Kotkov

Reply via email to