subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1444156 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/libsvn_wc/op-depth-test.c
Date Fri, 08 Feb 2013 17:23:14 GMT
Author: philip
Date: Fri Feb  8 17:23:13 2013
New Revision: 1444156

URL: http://svn.apache.org/r1444156
Log:
Make non-recursive revert on delete tree-conflicts raise move-edit
tree-conflicts on moves inside the delete.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_GE_OP_DEPTH_CHILDREN): Only select actual-only rows from
   actual_node.

* subversion/libsvn_wc/wc_db.c
  (op_revert_txn): Pass db and abspath to conflict functions, raise
   move-edit conflicts if resolving a delete.
  (svn_wc__db_op_revert): Pass db.

* subversion/tests/libsvn_wc/op-depth-test.c
  (test_func): Mark move_in_delete PASS.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.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=1444156&r1=1444155&r2=1444156&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Feb  8 17:23:13 2013
@@ -279,13 +279,18 @@ SELECT local_relpath, kind FROM nodes
 WHERE wc_id = ?1 AND parent_relpath = ?2 AND op_depth = ?3
   AND (?3 != 0 OR file_external is NULL)
 
+/* Used by non-recursive revert to detect higher level children, and
+   actual-only rows that would be left orphans, if the revert
+   proceeded. */
 -- STMT_SELECT_GE_OP_DEPTH_CHILDREN
 SELECT 1 FROM nodes
 WHERE wc_id = ?1 AND parent_relpath = ?2
   AND (op_depth > ?3 OR (op_depth = ?3 AND presence != MAP_BASE_DELETED))
 UNION ALL
-SELECT 1 FROM ACTUAL_NODE
+SELECT 1 FROM ACTUAL_NODE a
 WHERE wc_id = ?1 AND parent_relpath = ?2
+  AND NOT EXISTS (SELECT 1 FROM nodes n
+                   WHERE wc_id = ?1 AND n.local_relpath = a.local_relpath)
 
 /* Delete the nodes shadowed by local_relpath. Not valid for the wc-root */
 -- STMT_DELETE_SHADOWED_RECURSIVE

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1444156&r1=1444155&r2=1444156&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Feb  8 17:23:13 2013
@@ -6019,6 +6019,7 @@ op_revert_txn(void *baton,
               const char *local_relpath,
               apr_pool_t *scratch_pool)
 {
+  svn_wc__db_t *db = baton;
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
   int op_depth;
@@ -6092,7 +6093,8 @@ op_revert_txn(void *baton,
           svn_boolean_t tree_conflicted;
 
           SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, NULL, NULL,
-                                             &tree_conflicted, NULL, NULL,
+                                             &tree_conflicted,
+                                             db, wcroot->abspath,
                                              conflict,
                                              scratch_pool, scratch_pool));
           if (tree_conflicted
@@ -6103,14 +6105,17 @@ op_revert_txn(void *baton,
               svn_wc_conflict_action_t action;
 
               SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action,
-                                                          NULL, NULL, NULL,
+                                                          NULL,
+                                                          db, wcroot->abspath,
                                                           conflict,
                                                           scratch_pool,
                                                           scratch_pool));
 
               if (reason == svn_wc_conflict_reason_deleted)
-                ;
-              /* svn_wc__db_resolve_delete_raise_moved */
+                SVN_ERR(svn_wc__db_resolve_delete_raise_moved_away(
+                          db, svn_dirent_join(wcroot->abspath, local_relpath,
+                                              scratch_pool),
+                          scratch_pool));
             }
         }
     }
@@ -6333,6 +6338,7 @@ svn_wc__db_op_revert(svn_wc__db_t *db,
     {
     case svn_depth_empty:
       wtb.cb_func = op_revert_txn;
+      wtb.cb_baton = db;
       break;
     case svn_depth_infinity:
       wtb.cb_func = op_revert_recursive_txn;

Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1444156&r1=1444155&r2=1444156&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Fri Feb  8 17:23:13 2013
@@ -6588,7 +6588,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move_update_delete_mods"),
     SVN_TEST_OPTS_PASS(nested_moves2,
                        "nested_moves2"),
-    SVN_TEST_OPTS_XFAIL(move_in_delete,
+    SVN_TEST_OPTS_PASS(move_in_delete,
                        "move_in_delete (issue 4303)"),
     SVN_TEST_OPTS_PASS(switch_move,
                        "switch_move"),



Mime
View raw message