You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/09/23 12:01:25 UTC
svn commit: r1000386 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: philip
Date: Thu Sep 23 10:01:25 2010
New Revision: 1000386
URL: http://svn.apache.org/viewvc?rev=1000386&view=rev
Log:
Convert another function for SVN_WC__NODES_ONLY.
* subversion/libsvn_wc/wc_db.c
(determine_repos_info): Query NODES table.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.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=1000386&r1=1000385&r2=1000386&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Sep 23 10:01:25 2010
@@ -6223,14 +6223,36 @@ determine_repos_info(apr_int64_t *repos_
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
const char *repos_parent_relpath;
+#ifdef SVN_WC__NODES
+ svn_sqlite__stmt_t *stmt_nodes;
+ svn_boolean_t have_nodes_row;
+#endif
/* ### is it faster to fetch fewer columns? */
/* Prefer the current node's repository information. */
+#ifndef SVN_WC__NODES_ONLY
SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
STMT_SELECT_BASE_NODE));
SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
+#endif
+#ifdef SVN_WC__NODES
+ SVN_ERR(svn_sqlite__get_statement(&stmt_nodes, pdh->wcroot->sdb,
+ STMT_SELECT_BASE_NODE_1));
+ SVN_ERR(svn_sqlite__bindf(stmt_nodes, "is",
+ pdh->wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__step(&have_nodes_row, stmt_nodes));
+#ifndef SVN_WC__NODES_ONLY
+ SVN_ERR(assert_base_rows_match(have_row, have_nodes_row,
+ stmt, stmt_nodes,
+ local_relpath, scratch_pool));
+ SVN_ERR(svn_sqlite__reset(stmt_nodes));
+#else
+ stmt = stmt_nodes;
+ have_row = have_nodes_row;
+#endif
+#endif
if (have_row && !svn_sqlite__column_is_null(stmt, 0))
{