subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1129255 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c wc_db.h
Date Mon, 30 May 2011 16:58:51 GMT
Author: rhuijben
Date: Mon May 30 16:58:51 2011
New Revision: 1129255

URL: http://svn.apache.org/viewvc?rev=1129255&view=rev
Log:
Remove now unused field from svn_wc__db_base_info_t and give
svn_wc__db_external_remove a baton to avoid using a const cast.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_BASE_CHILDREN_INFO): Remove column.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_base_get_children_info): Update column references.
  (external_remove_baton): New struct.
  (db_external_remove): Use external_remove_baton instead of const cast.
  (svn_wc__db_external_remove): Update caller.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_base_info_t): Remove unused field.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1129255&r1=1129254&r2=1129255&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Mon May 30 16:58:51 2011
@@ -64,7 +64,7 @@ WHERE wc_id = ?1 AND local_relpath = ?2 
 
 -- STMT_SELECT_BASE_CHILDREN_INFO
 SELECT local_relpath, nodes.repos_id, nodes.repos_path, presence, kind,
-  revision, depth, properties, file_external IS NOT NULL,
+  revision, depth, file_external IS NOT NULL,
   lock_token, lock_owner, lock_comment, lock_date
 FROM nodes
 LEFT OUTER JOIN lock ON nodes.repos_id = lock.repos_id

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1129255&r1=1129254&r2=1129255&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Mon May 30 16:58:51 2011
@@ -2187,10 +2187,9 @@ svn_wc__db_base_get_children_info(apr_ha
       info->depth = (depth_str != NULL) ? svn_depth_from_word(depth_str)
                                         : svn_depth_unknown;
 
-      info->had_props = SQLITE_PROPERTIES_AVAILABLE(stmt, 7);
-      info->update_root = svn_sqlite__column_boolean(stmt, 8);
+      info->update_root = svn_sqlite__column_boolean(stmt, 7);
 
-      info->lock = lock_from_columns(stmt, 9, 10, 11, 12, result_pool);
+      info->lock = lock_from_columns(stmt, 8, 9, 10, 11, result_pool);
 
       err = fetch_repos_info(&info->repos_root_url, NULL, wcroot->sdb,
                              repos_id, result_pool);
@@ -2965,18 +2964,25 @@ svn_wc__db_external_add_dir(svn_wc__db_t
                                 &ieb, scratch_pool));
 }
 
+/* Baton for db_external_remove */
+struct external_remove_baton
+{
+  const svn_skel_t *work_items;
+};
+
 static svn_error_t *
 db_external_remove(void *baton, svn_wc__db_wcroot_t *wcroot,
                    const char *local_relpath, apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
+  struct external_remove_baton *rb = baton;
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_DELETE_EXTERNAL));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
-  SVN_ERR(add_work_items(wcroot->sdb, baton, scratch_pool));
+  SVN_ERR(add_work_items(wcroot->sdb, rb->work_items, scratch_pool));
 
   /* ### What about actual? */
   return SVN_NO_ERROR;
@@ -2991,6 +2997,7 @@ svn_wc__db_external_remove(svn_wc__db_t 
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
+  struct external_remove_baton rb;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -3005,8 +3012,9 @@ svn_wc__db_external_remove(svn_wc__db_t 
 
   local_relpath = svn_dirent_skip_ancestor(wcroot->abspath, local_abspath);
 
+  rb.work_items = work_items;
   SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, db_external_remove,
-                              work_items, scratch_pool));
+                              &rb, scratch_pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1129255&r1=1129254&r2=1129255&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Mon May 30 16:58:51 2011
@@ -773,7 +773,6 @@ struct svn_wc__db_base_info_t {
   const char *repos_relpath;
   const char *repos_root_url;
   svn_depth_t depth;
-  svn_boolean_t had_props;
   svn_boolean_t update_root;
   svn_wc__db_lock_t *lock;
 };



Mime
View raw message