You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/11/10 22:35:20 UTC

svn commit: r1033723 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c

Author: hwright
Date: Wed Nov 10 21:35:19 2010
New Revision: 1033723

URL: http://svn.apache.org/viewvc?rev=1033723&view=rev
Log:
Fix a few more test failures with TREE_CONFLICTS_ON_CHILDREN.

When removing an entry, don't remove it if there still exists tree conflict
information on that node (the conflict information will be remove later).

With this change, there are only 6 test failures with
TREE_CONFLICTS_ON_CHILDREN.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_DELETE_ACTUAL_NODE_WITHOUT_CONFLICT): New.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_temp_op_remove_entry): Only remove actual nodes without conflict
    data.
  (svn_wc__db_read_children_info): Populate the conflicts hash if we find a
    conflict on an actual node.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.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=1033723&r1=1033722&r2=1033723&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Wed Nov 10 21:35:19 2010
@@ -321,6 +321,11 @@ DELETE FROM actual_node
 WHERE wc_id = ?1 AND local_relpath = ?2
       AND changelist IS NULL;
 
+-- STMT_DELETE_ACTUAL_NODE_WITHOUT_CONFLICT
+DELETE FROM actual_node
+WHERE wc_id = ?1 AND local_relpath = ?2
+      AND conflict_data IS NULL;
+
 -- STMT_DELETE_NOT_PRESENT_NODES_RECURSIVE
 DELETE FROM nodes
 WHERE wc_id = ?1 AND local_relpath LIKE ?2 ESCAPE '#' AND op_depth = ?3

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1033723&r1=1033722&r2=1033723&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Nov 10 21:35:19 2010
@@ -4481,7 +4481,12 @@ svn_wc__db_temp_op_remove_entry(svn_wc__
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
+#ifndef TREE_CONFLICTS_ON_CHILDREN
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_DELETE_ACTUAL_NODE));
+#else
+  SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
+                                    STMT_DELETE_ACTUAL_NODE_WITHOUT_CONFLICT));
+#endif
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, local_relpath));
 
   SVN_ERR(svn_sqlite__step_done(stmt));
@@ -5413,6 +5418,7 @@ svn_wc__db_read_children_info(apr_hash_t
 #endif
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(dir_abspath));
+  *conflicts = apr_hash_make(result_pool);
 
   SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &dir_relpath, db,
                                              dir_abspath,
@@ -5599,6 +5605,10 @@ svn_wc__db_read_children_info(apr_hash_t
 #ifdef TREE_CONFLICTS_ON_CHILDREN
       child->conflicted = child->conflicted ||
                             !svn_sqlite__column_is_null(stmt, 8);  /* tree */
+
+      if (child->conflicted)
+        apr_hash_set(*conflicts, apr_pstrdup(result_pool, name),
+                     APR_HASH_KEY_STRING, "");
 #endif
 
       err = svn_sqlite__step(&have_row, stmt);
@@ -5608,7 +5618,6 @@ svn_wc__db_read_children_info(apr_hash_t
 
   SVN_ERR(svn_sqlite__reset(stmt));
 
-  *conflicts = apr_hash_make(result_pool);
 #ifndef TREE_CONFLICTS_ON_CHILDREN
   SVN_ERR(read_all_tree_conflicts(&tree_conflicts, pdh, dir_relpath,
                                   scratch_pool, scratch_pool));