You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by eh...@apache.org on 2010/09/12 23:06:56 UTC
svn commit: r996388 - in /subversion/trunk/subversion/libsvn_wc:
wc-queries.sql wc_db.c
Author: ehu
Date: Sun Sep 12 21:06:56 2010
New Revision: 996388
URL: http://svn.apache.org/viewvc?rev=996388&view=rev
Log:
Two more NODES queries.
* subversion/libsvn_wc/wc_db.c
(set_rev_relpath_txn): Update revision and repository both in
BASE_NODE and NODES tables.
* subversion/libsvn_wc/wc-queries.sql
(STMT_UPDATE_BASE_REVISION_1,
STMT_UPDATE_BASE_REPOS_1): New.
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=996388&r1=996387&r2=996388&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Sun Sep 12 21:06:56 2010
@@ -689,10 +689,18 @@ SELECT 0 FROM WORKING_NODE WHERE wc_id =
UPDATE BASE_NODE SET revnum=?3
WHERE wc_id = ?1 AND local_relpath = ?2;
+-- STMT_UPDATE_BASE_REVISION_1
+update nodes set revision = ?3
+where wc_id = ?1 and local_relpath = ?2 and op_depth = 0;
+
-- STMT_UPDATE_BASE_REPOS
UPDATE BASE_NODE SET repos_id = ?3, repos_relpath = ?4
WHERE wc_id = ?1 AND local_relpath = ?2;
+-- STMT_UPDATE_BASE_REPOS_1
+update nodes set repos_id = ?3, repos_path = ?4
+where wc_id = ?1 and local_relpath = ?2 and op_depth = 0;
+
/* ------------------------------------------------------------------------- */
/* these are used in entries.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=996388&r1=996387&r2=996388&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Sun Sep 12 21:06:56 2010
@@ -9020,6 +9020,7 @@ set_rev_relpath_txn(void *baton,
if (SVN_IS_VALID_REVNUM(rrb->rev))
{
+#ifndef SVN_WC__NODES_ONLY
SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
STMT_UPDATE_BASE_REVISION));
@@ -9028,6 +9029,17 @@ set_rev_relpath_txn(void *baton,
(apr_int64_t)rrb->rev));
SVN_ERR(svn_sqlite__step_done(stmt));
+#endif
+#ifdef SVN_WC__NODES
+ SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
+ STMT_UPDATE_BASE_REVISION_1));
+
+ SVN_ERR(svn_sqlite__bindf(stmt, "isi", rrb->pdh->wcroot->wc_id,
+ rrb->local_relpath,
+ (apr_int64_t)rrb->rev));
+
+ SVN_ERR(svn_sqlite__step_done(stmt));
+#endif
}
if (rrb->set_repos_relpath)
@@ -9036,6 +9048,7 @@ set_rev_relpath_txn(void *baton,
SVN_ERR(create_repos_id(&repos_id, rrb->repos_root_url, rrb->repos_uuid,
rrb->pdh->wcroot->sdb, scratch_pool));
+#ifndef SVN_WC__NODES_ONLY
SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
STMT_UPDATE_BASE_REPOS));
@@ -9045,6 +9058,18 @@ set_rev_relpath_txn(void *baton,
rrb->repos_relpath));
SVN_ERR(svn_sqlite__step_done(stmt));
+#endif
+#ifdef SVN_WC__NODES
+ SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
+ STMT_UPDATE_BASE_REPOS_1));
+
+ SVN_ERR(svn_sqlite__bindf(stmt, "isis", rrb->pdh->wcroot->wc_id,
+ rrb->local_relpath,
+ repos_id,
+ rrb->repos_relpath));
+
+ SVN_ERR(svn_sqlite__step_done(stmt));
+#endif
}
return SVN_NO_ERROR;