You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/09/01 16:00:33 UTC

svn commit: r991543 - in /subversion/trunk/subversion/libsvn_wc: wc_db.c wc_db.h workqueue.c

Author: julianfoad
Date: Wed Sep  1 14:00:33 2010
New Revision: 991543

URL: http://svn.apache.org/viewvc?rev=991543&view=rev
Log:
Disable some 'parent stub' handling as it's not required in single-DB mode.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_temp_set_parent_stub_to_normal): Remove this function.

* subversion/libsvn_wc/wc_db.c
  (navigate_to_parent): Don't allow verifying a parent stub.
  (svn_wc__db_op_copy_dir, svn_wc__db_op_add_directory): Don't add a parent
    stub.
  (svn_wc__db_temp_set_parent_stub_to_normal): Remove this function.

* subversion/libsvn_wc/workqueue.c
  (log_do_committed): Don't set the parent stub to normal.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=991543&r1=991542&r2=991543&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Sep  1 14:00:33 2010
@@ -534,6 +534,9 @@ navigate_to_parent(svn_wc__db_pdh_t **pa
                                             smode,
                                             scratch_pool));
 
+#ifdef SVN_WC__SINGLE_DB
+  SVN_ERR_ASSERT(!verify_parent_stub);
+#else
   if (!verify_parent_stub)
     return SVN_NO_ERROR;
 
@@ -551,6 +554,7 @@ navigate_to_parent(svn_wc__db_pdh_t **pa
                               _("'%s' does not have a parent."),
                               svn_dirent_local_style(child_pdh->local_abspath,
                                                      scratch_pool));
+#endif
 
   return SVN_NO_ERROR;
 }
@@ -3494,6 +3498,7 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
                                        scratch_pool));
   flush_entries(pdh);
 
+#ifndef SVN_WC__SINGLE_DB
   /* Add a parent stub.  */
   if (*local_relpath == '\0')
     {
@@ -3513,6 +3518,7 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
       SVN_ERR(insert_working_node(&iwb, pdh->wcroot->sdb, scratch_pool));
       flush_entries(pdh);
     }
+#endif
 
   return SVN_NO_ERROR;
 }
@@ -3687,6 +3693,7 @@ svn_wc__db_op_add_directory(svn_wc__db_t
                                        scratch_pool));
   flush_entries(pdh);
 
+#ifndef SVN_WC__SINGLE_DB
   /* Add a parent stub.  */
   if (*local_relpath == '\0')
     {
@@ -3706,6 +3713,7 @@ svn_wc__db_op_add_directory(svn_wc__db_t
       SVN_ERR(insert_working_node(&iwb, pdh->wcroot->sdb, scratch_pool));
       flush_entries(pdh);
     }
+#endif
 
   return SVN_NO_ERROR;
 }
@@ -9649,6 +9657,7 @@ svn_wc__db_temp_op_set_property_conflict
   return svn_error_return(svn_sqlite__step_done(stmt));
 }
 
+#ifndef SVN_WC__SINGLE_DB
 svn_error_t *
 svn_wc__db_temp_set_parent_stub_to_normal(svn_wc__db_t *db,
                                           const char *local_abspath,
@@ -9658,10 +9667,8 @@ svn_wc__db_temp_set_parent_stub_to_norma
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
   const char *parent_abspath, *base;
-#ifndef SINGLE_DB
   svn_sqlite__stmt_t *stmt;
   int affected_rows;
-#endif
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath)
                  && !svn_dirent_is_root(local_abspath, strlen(local_abspath)));
@@ -9676,7 +9683,6 @@ svn_wc__db_temp_set_parent_stub_to_norma
                                              scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-#ifndef SINGLE_DB
   /* This should be handled in a transaction, but we can assume a db lock
      and this code won't survive until 1.7 */
 
@@ -9729,10 +9735,10 @@ svn_wc__db_temp_set_parent_stub_to_norma
 
       SVN_ERR(svn_sqlite__step_done(stmt));
     }
-#endif
   flush_entries(pdh);
   return SVN_NO_ERROR;
 }
+#endif
 
 /* Baton for set_rev_relpath_txn */
 struct set_rev_relpath_baton

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=991543&r1=991542&r2=991543&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Wed Sep  1 14:00:33 2010
@@ -2443,6 +2443,7 @@ svn_wc__db_temp_op_set_property_conflict
                                                      const char *prej_basename,
                                                      apr_pool_t *scratch_pool);
 
+#ifndef SVN_WC__SINGLE_DB
 /* Ensure that the parent stub of LOCAL_ABSPATH contains a BASE_NODE record with
    a normal status and optionally remove the WORKING_NODE record for the node;
    this assumes that the parent directory is in the incomplete state, or the
@@ -2456,6 +2457,7 @@ svn_wc__db_temp_set_parent_stub_to_norma
                                           const char *local_abspath,
                                           svn_boolean_t delete_working,
                                           apr_pool_t *scratch_pool);
+#endif
 
 /* Sets a base nodes revision and/or repository relative path. If
    LOCAL_ABSPATH's rev (REV) is valid, set is revision and if SET_REPOS_RELPATH

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=991543&r1=991542&r2=991543&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Wed Sep  1 14:00:33 2010
@@ -1456,9 +1456,11 @@ log_do_committed(svn_wc__db_t *db,
       return SVN_NO_ERROR;
   }
 
+#ifndef SVN_WC__SINGLE_DB
   /* Make sure we have a parent stub in a clean/unmodified state.  */
   SVN_ERR(svn_wc__db_temp_set_parent_stub_to_normal(db, local_abspath,
                                                     TRUE, scratch_pool));
+#endif
 
   return SVN_NO_ERROR;
 }