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/11/26 11:58:14 UTC

svn commit: r1771471 - /subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

Author: stsp
Date: Sat Nov 26 11:58:14 2016
New Revision: 1771471

URL: http://svn.apache.org/viewvc?rev=1771471&view=rev
Log:
* subversion/libsvn_wc/wc_db_update_move.c
  (update_incoming_move): Error out if incoming move is a mixed-rev WC.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1771471&r1=1771470&r2=1771471&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Sat Nov 26 11:58:14 2016
@@ -2463,6 +2463,7 @@ update_incoming_move(svn_revnum_t *old_r
   node_move_baton_t nmb = { 0 };
   svn_boolean_t is_modified;
   svn_boolean_t is_switched;
+  svn_revnum_t minrev, maxrev;
 
   SVN_ERR_ASSERT(svn_relpath_skip_ancestor(dst_relpath, local_relpath) == NULL);
 
@@ -2526,6 +2527,27 @@ update_incoming_move(svn_revnum_t *old_r
                                                scratch_pool),
                                scratch_pool));
 
+  /* Make sure the move destination is at a single revision. */
+  SVN_ERR(svn_wc__db_min_max_revisions(&minrev, &maxrev, db,
+                                       svn_dirent_join(wcroot->abspath,
+                                                       dst_relpath,
+                                                       scratch_pool),
+                                       FALSE, scratch_pool));
+  if (minrev != maxrev)
+    return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+                             _("Cannot merge local changes from '%s' because "
+                               "'%s' is a mixed-revision working copy "
+                               "[r%ld:r%ld] (please update and try again)"),
+                             svn_dirent_local_style(
+                               svn_dirent_join(wcroot->abspath, local_relpath,
+                                               scratch_pool),
+                               scratch_pool),
+                             svn_dirent_local_style(
+                               svn_dirent_join(wcroot->abspath, dst_relpath,
+                                               scratch_pool),
+                               scratch_pool),
+                              minrev, maxrev);
+
   /* Read version info from the updated incoming post-move location. */
   SVN_ERR(svn_wc__db_base_get_info_internal(NULL, &new_version.node_kind,
                                             &new_version.peg_rev,