You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2011/05/27 18:12:01 UTC

svn commit: r1128379 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/cmdline/revert_tests.py

Author: philip
Date: Fri May 27 16:12:01 2011
New Revision: 1128379

URL: http://svn.apache.org/viewvc?rev=1128379&view=rev
Log:
Revert r1124991, explicit population of the revert list, in
preparation for another attempt at using triggers.  This changes
one PASS into an XFAIL and one XFAIL into a PASS.

* subversion/libsvn_wc/wc_db.c
  (op_revert_txn): Don't drop or populate list.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_INSERT_REVERT_LIST, STMT_INSERT_REVERT_LIST_PLAIN,
   STMT_INSERT_REVERT_LIST_ACTUAL_ONLY): Remove.

* subversion/tests/cmdline/revert_tests.py
  (revert_empty_actual, revert_no_text_change_conflict): Move the
   XFAIL marker thus resolving a merge conflict.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/tests/cmdline/revert_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=1128379&r1=1128378&r2=1128379&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri May 27 16:12:01 2011
@@ -1047,7 +1047,6 @@ DROP TABLE IF EXISTS temp__node_props_ca
 -- STMT_CREATE_REVERT_LIST
 DROP TABLE IF EXISTS revert_list;
 CREATE TEMPORARY TABLE revert_list (
-   /* ### need wc_id  */
    local_relpath TEXT PRIMARY KEY,
    conflict_old TEXT,
    conflict_new TEXT,
@@ -1091,30 +1090,6 @@ BEGIN
           THEN 1 ELSE NULL END;
 END
 
--- STMT_INSERT_REVERT_LIST
-INSERT OR REPLACE INTO revert_list(local_relpath, notify, conflict_old,
-                                   conflict_new, conflict_working, prop_reject)
-SELECT nodes.local_relpath, 1,
-       conflict_old, conflict_new, conflict_working, prop_reject
-FROM nodes
-LEFT OUTER JOIN actual_node
-ON    nodes.wc_id = ?1       AND nodes.local_relpath = ?2
-  AND actual_node.wc_id = ?1 AND actual_node.local_relpath = ?2
-WHERE nodes.wc_id = ?1       AND nodes.local_relpath = ?2
-
--- STMT_INSERT_REVERT_LIST_PLAIN
-INSERT OR REPLACE INTO revert_list(local_relpath, notify)
-VALUES (?1, 1)
-
--- STMT_INSERT_REVERT_LIST_ACTUAL_ONLY
-INSERT OR REPLACE INTO revert_list(local_relpath, notify, conflict_old,
-                                   conflict_new, conflict_working, prop_reject)
-SELECT local_relpath, 1,
-       conflict_old, conflict_new, conflict_working, prop_reject
-FROM actual_node
-WHERE wc_id = ?1 AND local_relpath = ?2
-  AND (properties IS NOT NULL OR tree_conflict_data IS NOT NULL)
-
 -- STMT_DROP_REVERT_LIST_TRIGGERS
 DROP TRIGGER IF EXISTS trigger_revert_list_nodes;
 DROP TRIGGER IF EXISTS trigger_revert_list_actual_delete;

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1128379&r1=1128378&r2=1128379&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri May 27 16:12:01 2011
@@ -5227,10 +5227,6 @@ op_revert_txn(void *baton,
   apr_int64_t op_depth;
   int affected_rows;
 
-  /* ### we shouldn't create the triggers in the first place. next round.  */
-  SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
-                                      STMT_DROP_REVERT_LIST_TRIGGERS));
-
   /* ### Similar structure to op_revert_recursive_txn, should they be
          combined? */
 
@@ -5263,17 +5259,6 @@ op_revert_txn(void *baton,
                                      path_for_error_message(wcroot,
                                                             local_relpath,
                                                             scratch_pool));
-
-          /* The node exists purely as an ACTUAL_NODE. Thus, it is a
-             delete-delete tree-conflicted node. There are no conflict
-             files to extract from the row, but we DO want to notify
-             about this node. Insert an appropriate row.  */
-          SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                            STMT_INSERT_REVERT_LIST_PLAIN));
-          /* ### we should be binding wc_id  */
-          SVN_ERR(svn_sqlite__bindf(stmt, "s", local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
           return SVN_NO_ERROR;
         }
 
@@ -5289,13 +5274,6 @@ op_revert_txn(void *baton,
 
   if (op_depth > 0 && op_depth == relpath_depth(local_relpath))
     {
-      /* A NODES row is present, so leave a row in the REVERT_LIST table.
-         This will gather data from ACTUAL_NODE, if a row is available.  */
-      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                        STMT_INSERT_REVERT_LIST));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
       /* Can't do non-recursive revert if children exist */
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                         STMT_SELECT_GE_OP_DEPTH_CHILDREN));
@@ -5332,17 +5310,6 @@ op_revert_txn(void *baton,
       SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
       SVN_ERR(svn_sqlite__step_done(stmt));
     }
-  else
-    {
-      /* We have a BASE node (or we're looking at a child of an op-root),
-         but we still want to insert into REVERT_LIST because we MAY be
-         about to revert some changes on ACTUAL_NODE only. Investigate
-         the ACTUAL_NODE row, and insert into REVERT_LIST as appropriate.  */
-      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                        STMT_INSERT_REVERT_LIST_ACTUAL_ONLY));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-    }
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                   STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST));

Modified: subversion/trunk/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/revert_tests.py?rev=1128379&r1=1128378&r2=1128379&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/revert_tests.py Fri May 27 16:12:01 2011
@@ -1299,6 +1299,7 @@ def create_superflous_actual_node(sbox):
   expected_status.tweak('alpha', status='A ')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
+@XFail()
 @Issue(3859)
 def revert_empty_actual(sbox):
   "revert with superfluous actual node"
@@ -1517,7 +1518,6 @@ def create_no_text_change_conflict(sbox)
   os.remove(sbox.ospath('A/B/E/alpha'))
   shutil.move(sbox.ospath('A/B/E/alpha-copy'), sbox.ospath('A/B/E/alpha'))
 
-@XFail()
 @Issue(3859)
 def revert_no_text_change_conflict(sbox):
   "revert conflict with no text change"