Author: stsp
Date: Fri Jul 29 16:53:01 2011
New Revision: 1152300

URL: http://svn.apache.org/viewvc?rev=1152300&view=rev
Log:
Temporarily revert r1152293 and r1152294. r1152293 is causing test failures.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/tests/cmdline/copy_tests.py

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1152300&r1=1152299&r2=1152300&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Jul 29 16:53:01 
2011
@@ -1342,10 +1342,6 @@ WHERE wc_id = ?1 AND local_relpath = ?2
    (SELECT MAX(op_depth) FROM nodes
     WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0)
 
--- STMT_SELECT_MOVED_HERE_CHILDREN
-SELECT moved_to, local_relpath FROM nodes_current
-WHERE wc_id = ?1 AND moved_to > ?2 || '/'
-
 /* ------------------------------------------------------------------------- */
 
 /* Queries for verification. */

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1152300&r1=1152299&r2=1152300&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 16:53:01 2011
@@ -6033,12 +6033,11 @@ op_delete_txn(void *baton,
   svn_sqlite__stmt_t *stmt;
   apr_int64_t select_depth; /* Depth of what is to be deleted */
   svn_boolean_t refetch_depth = FALSE;
-  svn_wc__db_kind_t kind;
 
   SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb, STMT_CREATE_DELETE_LIST));
 
   SVN_ERR(read_info(&status,
-                    &kind, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                     &op_root, NULL, NULL,
                     NULL, NULL, NULL,
@@ -6095,85 +6094,6 @@ op_delete_txn(void *baton,
           SVN_ERR(svn_sqlite__step_done(stmt));
           SVN_ERR(svn_sqlite__reset(stmt));
         }
-
-      /* If a subtree is being moved-away, we need to update moved-to
-       * information in BASE for all children that were moved into this
-       * subtree. */
-      if (kind == svn_wc__db_kind_dir)
-        {
-          apr_pool_t *iterpool;
-
-          SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                            STMT_SELECT_MOVED_HERE_CHILDREN));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-
-          SVN_ERR(svn_sqlite__step(&have_row, stmt));
-
-          iterpool = svn_pool_create(scratch_pool);
-          while (have_row)
-            {
-              svn_wc__db_status_t child_status;
-              const char *child_moved_from_relpath;
-              const char *moved_here_child_relpath =
-                svn_sqlite__column_text(stmt, 0, scratch_pool);
-
-              svn_pool_clear(iterpool);
-
-              /* The moved-here-children query returns info based on the
-               * delete-half of the move. Check if that the copied-half of
-               * the move matches this information. */
-              SVN_ERR(read_info(&child_status, NULL, NULL, NULL, NULL,
-                                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                NULL, NULL, NULL, NULL, NULL, NULL,
-                                wcroot, moved_here_child_relpath,
-                                iterpool, iterpool));
-              if (child_status == svn_wc__db_status_added)
-                SVN_ERR(scan_addition(&child_status, NULL, NULL, NULL,
-                                      NULL, NULL, NULL,
-                                      &child_moved_from_relpath, NULL,
-                                      wcroot, moved_here_child_relpath,
-                                      iterpool, iterpool));
-#if SVN_DEBUG
-              /* This catches incorrectly recorded moves.
-               * It is possible to hit this during normal operation
-               * if a move was interrupted mid-way so only perform
-               * this check in debug mode. */
-              SVN_ERR_ASSERT(moved_from_relpath &&
-                             !strcmp(child_moved_from_relpath,
-                                     svn_sqlite__column_text(stmt, 1, NULL)));
-#endif
-              if (child_status == svn_wc__db_status_moved_here)
-                {
-                  const char *child_subtree_relpath;
-                  const char *new_moved_to_relpath;
-                  svn_sqlite__stmt_t *moved_to_stmt;
-
-                  /* Compute the new moved-to path for this child... */
-                  child_subtree_relpath =
-                    svn_relpath_skip_ancestor(local_relpath,
-                                              moved_here_child_relpath);
-                  new_moved_to_relpath =
-                    svn_relpath_join(b->moved_to_relpath,
-                                     child_subtree_relpath, iterpool);
-                  /* ... and update the BASE moved-to record. */
-                  SVN_ERR(svn_sqlite__get_statement(
-                            &moved_to_stmt, wcroot->sdb,
-                            STMT_UPDATE_MOVED_TO_RELPATH));
-                  SVN_ERR(svn_sqlite__bindf(moved_to_stmt, "iss",
-                                            wcroot->wc_id,
-                                            child_moved_from_relpath,
-                                            new_moved_to_relpath));
-                  SVN_ERR(svn_sqlite__step(&have_row, moved_to_stmt));
-                  SVN_ERR(svn_sqlite__reset(moved_to_stmt));
-                }
-
-              SVN_ERR(svn_sqlite__step(&have_row, stmt));
-            }
-          svn_pool_destroy(iterpool);
-
-          SVN_ERR(svn_sqlite__reset(stmt));
-        }
     }
 
   if (op_root)

Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152300&r1=1152299&r2=1152300&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 16:53:01 
2011
@@ -5487,6 +5487,7 @@ def commit_copied_half_of_move(sbox):
                                      'commit', '-m', 'foo', D_path)
 
 @Issue(3631)
+@XFail()
 def commit_copied_half_of_nested_move(sbox):
   "attempt to commit the copied part of a nested move"
   sbox.build(read_only = True)
@@ -5514,6 +5515,8 @@ def commit_copied_half_of_nested_move(sb
                                      'commit', '-m', 'foo', C_path)
 
   # A/C/D/iota -> A/iota; verify that iota's moved-from hasn't changed
+  ### This currently fails because iota's moved-from info isn't updated
+  ### during the A/D->A/C/D move.
   D_iota_path = sbox.ospath('A/C/D/iota')
   A_iota_path = sbox.ospath('A/iota')
   svntest.actions.run_and_verify_svn(None, None, [], 'mv', D_iota_path,


Reply via email to