Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 590DB6776 for ; Mon, 30 May 2011 16:59:16 +0000 (UTC) Received: (qmail 93621 invoked by uid 500); 30 May 2011 16:59:16 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 93597 invoked by uid 500); 30 May 2011 16:59:16 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 93590 invoked by uid 99); 30 May 2011 16:59:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 16:59:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 16:59:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 164EA23889BF; Mon, 30 May 2011 16:58:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110530165852.164EA23889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; };