You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/04/28 02:33:10 UTC

svn commit: r938738 - in /subversion/trunk/subversion/libsvn_wc: entries.c wc_db.c wc_db.h

Author: gstein
Date: Wed Apr 28 00:33:09 2010
New Revision: 938738

URL: http://svn.apache.org/viewvc?rev=938738&view=rev
Log:
Gut svn_wc__entry_remove()... we don't need to be nice with any entries
cached in the access baton. Adjust db_temp_op_remove_entry to always flush
the cache.

* subversion/libsvn_wc/wc_db.h:
  (svn_wc__db_temp_op_remove_entry): remove FLUSH_ENTRY_CACHE param

* subversion/libsvn_wc/wc_db.c:
  (svn_wc__db_temp_op_remove_entry): remove FLUSH_ENTRY_CACHE param and
    assume TRUE throughout.

* subversion/libsvn_wc/entries.c:
  (svn_wc__entry_remove): gut this function, leaving it (effectively) as a
    wrapper for db_temp_op_remove_entry

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

Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=938738&r1=938737&r2=938738&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Wed Apr 28 00:33:09 2010
@@ -2785,25 +2785,7 @@ svn_wc__entry_remove(svn_wc__db_t *db,
                      const char *local_abspath,
                      apr_pool_t *scratch_pool)
 {
-  svn_wc_adm_access_t *adm_access;
-  const char *name;
-  const char *parent_dir;
-
-  /* First: Update the entry cache */
-  svn_dirent_split(local_abspath, &parent_dir, &name, scratch_pool);
-  adm_access = svn_wc__adm_retrieve_internal2(db, parent_dir, scratch_pool);
-
-  if (adm_access != NULL)
-    {
-      apr_hash_t *entries = svn_wc__adm_access_entries(adm_access);
-
-      if (entries != NULL)
-        apr_hash_set(entries, name, APR_HASH_KEY_STRING, NULL);
-    }
-
-  /* And then remove it from the database */
   return svn_error_return(svn_wc__db_temp_op_remove_entry(db, local_abspath,
-                                                          FALSE,
                                                           scratch_pool));
 }
 

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=938738&r1=938737&r2=938738&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Apr 28 00:33:09 2010
@@ -3299,7 +3299,6 @@ svn_wc__db_op_read_tree_conflict(
 svn_error_t *
 svn_wc__db_temp_op_remove_entry(svn_wc__db_t *db,
                                 const char *local_abspath,
-                                svn_boolean_t flush_entry_cache,
                                 apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
@@ -3315,20 +3314,18 @@ svn_wc__db_temp_op_remove_entry(svn_wc__
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-  if (flush_entry_cache)
-    flush_entries(pdh);
+  flush_entries(pdh);
 
   /* Check if we should remove it from the parent db instead */
-  if (strcmp(current_relpath, "") == 0)
+  if (*current_relpath == '\0')
     {
       SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
                                  scratch_pool));
-
       VERIFY_USABLE_PDH(pdh);
+
       current_relpath = svn_dirent_basename(local_abspath, NULL);
 
-      if (flush_entry_cache)
-        flush_entries(pdh);
+      flush_entries(pdh);
     }
 
   sdb = pdh->wcroot->sdb;

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=938738&r1=938737&r2=938738&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Wed Apr 28 00:33:09 2010
@@ -2037,7 +2037,6 @@ svn_wc__db_temp_set_keep_local(svn_wc__d
 svn_error_t *
 svn_wc__db_temp_op_remove_entry(svn_wc__db_t *db,
                                 const char *local_abspath,
-                                svn_boolean_t flush_entry_cache,
                                 apr_pool_t *scratch_pool);
 
 /* Sets the depth of LOCAL_ABSPATH in its working copy to DEPTH