subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1839344 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Mon, 27 Aug 2018 15:28:02 GMT
Author: stsp
Date: Mon Aug 27 15:28:01 2018
New Revision: 1839344

URL: http://svn.apache.org/viewvc?rev=1839344&view=rev
Log:
Follow-up to r1839342:

Make test_merge_incoming_edit_file_moved_away pass again after r1839342.
I should have committed both changes in the same revision.

* subversion/libsvn_client/conflicts.c
  (svn_client_conflict_option_get_moved_to_abspath_candidates):
   Return the 'moved to abspath' stored in 'local missing' conflict details.

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

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1839344&r1=1839343&r2=1839344&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Mon Aug 27 15:28:01 2018
@@ -10596,7 +10596,8 @@ svn_client_conflict_option_get_moved_to_
       struct conflict_tree_local_missing_details *details;
 
       details = conflict->tree_conflict_local_details;
-      if (details == NULL || details->wc_siblings == NULL)
+      if (details == NULL ||
+          (details->moved_to_abspath == NULL && details->wc_siblings == NULL))
        return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
                                 _("Getting a list of possible move siblings "
                                   "requires details for tree conflict at '%s' "
@@ -10604,19 +10605,25 @@ svn_client_conflict_option_get_moved_to_
                                svn_dirent_local_style(victim_abspath,
                                                       scratch_pool));
 
+       *possible_moved_to_abspaths = apr_array_make(result_pool, 1,
+                                                    sizeof (const char *));
+      if (details->moved_to_abspath)
+         APR_ARRAY_PUSH(*possible_moved_to_abspaths, const char *) =
+           apr_pstrdup(result_pool, details->moved_to_abspath);
+
       /* ### Siblings are actually 'corresponding nodes', not 'move targets'.
          ### But we provide them here to avoid another API function. */
-       *possible_moved_to_abspaths =
-         apr_array_make(result_pool, details->wc_siblings->nelts,
-                        sizeof (const char *));
-      for (i = 0; i < details->wc_siblings->nelts; i++)
+      if (details->wc_siblings)
         {
-           const char *sibling_abspath;
+          for (i = 0; i < details->wc_siblings->nelts; i++)
+            {
+               const char *sibling_abspath;
 
-           sibling_abspath = APR_ARRAY_IDX(details->wc_siblings, i,
-                                           const char *);
-           APR_ARRAY_PUSH(*possible_moved_to_abspaths, const char *) =
-             apr_pstrdup(result_pool, sibling_abspath);
+               sibling_abspath = APR_ARRAY_IDX(details->wc_siblings, i,
+                                               const char *);
+               APR_ARRAY_PUSH(*possible_moved_to_abspaths, const char *) =
+                 apr_pstrdup(result_pool, sibling_abspath);
+            }
         }
     }
   else



Mime
View raw message