Author: rhuijben
Date: Wed May  4 11:41:29 2011
New Revision: 1099419

URL: http://svn.apache.org/viewvc?rev=1099419&view=rev
Log:
Enable the descendant commit in wc_db's node commit code. This removes the last
(currently) known phase during commit where the database is invalid.

After this commit when an op_depth root node is committed, the node and all
the pristine versions of its descendants at the same op-depth are collapsed
into the BASE layer. Changes on the descendants are then performed as
separate commit operations.

* subversion/libsvn_wc/adm_ops.c
  (process_committed_leaf): Revert to the pre r1098689 behavior of
    ignoring not-present nodes. r1099411 makes this the cleaner behavior.

* subversion/libsvn_wc/wc_db.c
  (descendant_commit): Remove experimental check and update comment to remove
    references to the excluded status.
  (commit_node): Update caller.

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_ops.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1099419&r1=1099418&r2=1099419&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Wed May  4 11:41:29 2011
@@ -164,14 +164,12 @@ process_committed_leaf(svn_wc__db_t *db,
   else if (status == svn_wc__db_status_not_present)
     {
       /* We are committing the leaf of a copy operation.
-         It is safe to remove this leaf now */
-      return svn_error_return(
-                svn_wc__db_op_remove_node(
-                                db, local_abspath,
-                                (have_base && !via_recurse)
-                                    ? new_revnum : SVN_INVALID_REVNUM,
-                                kind,
-                                scratch_pool));
+         We leave the not-present marker to allow pulling in excluded
+         children of a copy.
+
+         The next update will remove the not-present marker. */
+
+      return SVN_NO_ERROR;
     }
 
   SVN_ERR_ASSERT(status == svn_wc__db_status_normal

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1099419&r1=1099418&r2=1099419&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed May  4 11:41:29 2011
@@ -6717,9 +6717,8 @@ determine_repos_info(apr_int64_t *repos_
   return SVN_NO_ERROR;
 }
 
-#ifdef SVN_WC__EXPERIMENTAL_DESCENDANT_COMMIT
 /* Moves all nodes below PARENT_LOCAL_RELPATH from op-depth OP_DEPTH to
-   op-depth 0 (BASE), setting their presence to 'excluded' if their presence
+   op-depth 0 (BASE), setting their presence to 'not-present' if their presence
    wasn't 'normal'. */
 static svn_error_t *
 descendant_commit(svn_wc__db_wcroot_t *wcroot,
@@ -6767,7 +6766,6 @@ descendant_commit(svn_wc__db_wcroot_t *w
 
   return SVN_NO_ERROR;
 }
-#endif
 
 struct commit_baton_t {
   svn_revnum_t new_revision;
@@ -6910,11 +6908,9 @@ commit_node(void *baton,
           SVN_ERR(svn_sqlite__step_done(stmt));
         }
 
-#ifdef SVN_WC__EXPERIMENTAL_DESCENDANT_COMMIT
       SVN_ERR(descendant_commit(wcroot, local_relpath, op_depth,
                                 repos_id, repos_relpath, cb->new_revision,
                                 scratch_pool));
-#endif
     }
 
   /* Update or add the BASE_NODE row with all the new information.  */


Reply via email to