subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1538702 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db_update_move.c
Date Mon, 04 Nov 2013 18:23:26 GMT
Author: rhuijben
Date: Mon Nov  4 18:23:25 2013
New Revision: 1538702

URL: http://svn.apache.org/r1538702
Log:
When breaking moves for a node as part of tree conflict resolving only break
its moves and the moves of its decendants, instead of also all
other unrelated shadowing moves at higher op-depths.

This resolves a case where a move from a specific path can be broken
multiple times, when multiple moves are layered over each other. Before this
patch that would trigger an sqlite constraint on the notify temporary table.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_MOVED_PAIR2): Rename query to...
  (STMT_SELECT_MOVED_PAIRS_DEPTH): ... this and update its behavior to match
    what its only user really needs.

* subversion/libsvn_wc/wc_db_update_move.c
  (break_moved_away_children_internal): Break moves only on the selected layer.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1538702&r1=1538701&r2=1538702&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Mon Nov  4 18:23:25 2013
@@ -1576,17 +1576,18 @@ UPDATE nodes SET moved_to = NULL
 
 
 /* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1,
- * where the source of the move is within the subtree rooted at path ?2, and
- * the destination of the move is outside the subtree rooted at path ?2. */
--- STMT_SELECT_MOVED_PAIR2
-SELECT local_relpath, moved_to, op_depth FROM nodes
+ * where the original source of the move is within the subtree rooted at path
+ * ?2 at op_depth ?3. (The move is recorded immediately above op_depth ?3) */
+-- STMT_SELECT_MOVED_PAIRS_DEPTH
+SELECT local_relpath, moved_to, op_depth FROM nodes n
 WHERE wc_id = ?1
   AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
   AND moved_to IS NOT NULL
-  AND NOT IS_STRICT_DESCENDANT_OF(moved_to, ?2)
-  AND op_depth >= (SELECT MAX(op_depth) FROM nodes o
-                    WHERE o.wc_id = ?1
-                      AND o.local_relpath = ?2)
+  AND op_depth > ?3
+  AND op_depth = (SELECT MIN(op_depth) FROM nodes o
+                   WHERE o.wc_id = ?1
+                     AND o.local_relpath = n.local_relpath
+                     AND o.op_depth > ?3)
 
 -- STMT_SELECT_MOVED_PAIR3
 SELECT local_relpath, moved_to, op_depth, kind FROM nodes

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=1538702&r1=1538701&r2=1538702&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Mon Nov  4 18:23:25 2013
@@ -2500,8 +2500,9 @@ break_moved_away_children_internal(svn_w
                                       STMT_CREATE_UPDATE_MOVE_LIST));
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_MOVED_PAIR2));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+                                    STMT_SELECT_MOVED_PAIRS_DEPTH));
+  SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
+                            relpath_depth(local_relpath)));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
   iterpool = svn_pool_create(scratch_pool);



Mime
View raw message