Author: ehu
Date: Sun Sep 5 20:16:10 2010
New Revision: 992886
URL: http://svn.apache.org/viewvc?rev=992886&view=rev
Log:
Add another NODE_DATA query and add an invocation to a pre-existing one.
* subversion/libsvn_wc/wc-queries.sql
(STMT_INSERT_BASE_NODE_DATA_INCOMPLETE_DIR): New query.
* subversion/libsvn_wc/wc_db.c
(svn_wc__db_temp_set_parent_stub_to_normal): Add invocation to
STMT_INSERT_NODE_DATA accidentally skipped in an earlier round of
conversions.
(set_new_dir_to_incomplete_baton_txn): Use new query to update NODE_DATA.
Modified:
subversion/trunk/subversion/libsvn_wc/wc-queries.sql
subversion/trunk/subversion/libsvn_wc/wc_db.c
Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=992886&r1=992885&r2=992886&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Sun Sep 5 20:16:10
2010
@@ -97,6 +97,11 @@ insert or ignore into base_node (
kind, revnum, depth)
values (?1, ?2, ?3, ?4, ?5, 'incomplete', 'dir', ?6, ?7);
+-- STMT_INSERT_BASE_NODE_DATA_INCOMPLETE_DIR
+insert or ignore into node_data (
+ wc_id, local_relpath, op_depth, parent_relpath, presence, kind, depth)
+values (?1, ?2, 0, ?3, 'incomplete', 'dir', ?4);
+
-- STMT_INSERT_WORKING_NODE_INCOMPLETE
INSERT OR IGNORE INTO WORKING_NODE (
wc_id, local_relpath, parent_relpath, presence, kind)
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=992886&r1=992885&r2=992886&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Sun Sep 5 20:16:10 2010
@@ -9805,6 +9805,25 @@ svn_wc__db_temp_set_parent_stub_to_norma
svn_wc__db_kind_subdir));
SVN_ERR(svn_sqlite__step_done(stmt));
+
+#ifdef SVN_WC__NODE_DATA
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+ STMT_INSERT_NODE_DATA));
+
+ SVN_ERR(svn_sqlite__bindf(stmt, "isi", pdh->wcroot->wc_id, base,
+ (apr_int64_t) 0 /* BASE */
+ ));
+ SVN_ERR(svn_sqlite__bind_text(stmt, 4, ""));
+ SVN_ERR(svn_sqlite__bind_token(stmt, 5, presence_map,
+ svn_wc__db_status_normal));
+ SVN_ERR(svn_sqlite__bind_token(stmt, 6, kind_map,
+ svn_wc__db_kind_subdir));
+
+ SVN_ERR(svn_sqlite__step_done(stmt));
+
+#endif
+
}
SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
return SVN_NO_ERROR;
@@ -9990,6 +10009,26 @@ set_new_dir_to_incomplete_baton_txn(void
SVN_ERR(svn_sqlite__step_done(stmt));
+#ifdef SVN_WC__NODE_DATA
+
+ /* Insert the incomplete base node */
+ SVN_ERR(svn_sqlite__get_statement(&stmt, dtb->pdh->wcroot->sdb,
+
STMT_INSERT_BASE_NODE_DATA_INCOMPLETE_DIR));
+
+ SVN_ERR(svn_sqlite__bindf(stmt, "iss", dtb->pdh->wcroot->wc_id,
+ dtb->local_relpath,
+ parent_relpath));
+
+ /* If depth is not unknown: record depth */
+ if (dtb->depth >= svn_depth_empty && dtb->depth <= svn_depth_infinity)
+ SVN_ERR(svn_sqlite__bind_text(stmt, 4, svn_depth_to_word(dtb->depth)));
+
+ SVN_ERR(svn_sqlite__step_done(stmt));
+
+#endif
+
+
+
return SVN_NO_ERROR;
}