You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/08/18 11:42:43 UTC

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

Author: rhuijben
Date: Thu Aug 18 09:42:42 2011
New Revision: 1159114

URL: http://svn.apache.org/viewvc?rev=1159114&view=rev
Log:
Revert the split between root and descendants of the delete processing that was
introduced in r1151166. This was necessary to store moved-to information in
working, but that information has been moved to the BASE layer by rr1152436.
(This brings the query to how it was in 1.7.x)

* subversion/libsvn_wc/wc-queries.sql
  (STMT_INSERT_DELETE_FROM_NODE_RECURSIVE): Handle root and descendants.
  (STMT_INSERT_DELETE_NODE): Remove query.

* subversion/libsvn_wc/wc_db.c
  (op_delete_txn): Update caller.

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=1159114&r1=1159113&r2=1159114&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu Aug 18 09:42:42 2011
@@ -812,18 +812,8 @@ SELECT wc_id, local_relpath, ?4 /*op_dep
        kind
 FROM nodes
 WHERE wc_id = ?1
-  AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
-  AND op_depth = ?3
-  AND presence NOT IN ('base-deleted', 'not-present', 'excluded', 'absent')
-
--- STMT_INSERT_DELETE_NODE
-INSERT INTO nodes (
-    wc_id, local_relpath, op_depth, parent_relpath, presence, kind)
-SELECT wc_id, local_relpath, ?4 /*op_depth*/, parent_relpath, 'base-deleted',
-       kind
-FROM nodes
-WHERE wc_id = ?1
-  AND local_relpath = ?2
+  AND (local_relpath = ?2
+       OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
   AND op_depth = ?3
   AND presence NOT IN ('base-deleted', 'not-present', 'excluded', 'absent')
 

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1159114&r1=1159113&r2=1159114&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Aug 18 09:42:42 2011
@@ -6421,13 +6421,6 @@ op_delete_txn(void *baton,
   if (add_work)
     {
       /* Delete the node at LOCAL_RELPATH, and possibly mark it as moved. */
-      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                 STMT_INSERT_DELETE_NODE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "isii",
-                                wcroot->wc_id, local_relpath,
-                                select_depth, b->delete_depth));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
       if (b->moved_to_relpath)
         {
           /* Record moved-to relpath in BASE. */
@@ -6439,7 +6432,7 @@ op_delete_txn(void *baton,
           SVN_ERR(svn_sqlite__step_done(stmt));
         }
 
-      /* Delete children, if any. */
+      /* Delete the node and possible descendants. */
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                  STMT_INSERT_DELETE_FROM_NODE_RECURSIVE));
       SVN_ERR(svn_sqlite__bindf(stmt, "isii",