You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/10/29 05:33:35 UTC
svn commit: r1028597 - in /subversion/trunk/subversion/libsvn_wc:
wc-queries.sql wc_db.c
Author: hwright
Date: Fri Oct 29 03:33:35 2010
New Revision: 1028597
URL: http://svn.apache.org/viewvc?rev=1028597&view=rev
Log:
Use an API, rather thank fetching tree conflicts One More Time.
* subversion/libsvn_wc/wc-queries.sql
(STMT_SELECT_ACTUAL_TREE_CONFLICT): Remove.
* subversion/libsvn_wc/wc_db.c
(svn_wc__db_read_conflict_victims): Use the read_all_tree_conflicts() API
to fetch tree conflicts, rather than doing so manually.
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=1028597&r1=1028596&r2=1028597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Oct 29 03:33:35 2010
@@ -416,11 +416,6 @@ WHERE wc_id = ?1 AND parent_relpath = ?2
NOT ((prop_reject IS NULL) AND (conflict_old IS NULL)
AND (conflict_new IS NULL) AND (conflict_working IS NULL))
--- STMT_SELECT_ACTUAL_TREE_CONFLICT
-SELECT tree_conflict_data
-FROM actual_node
-WHERE wc_id = ?1 AND local_relpath = ?2;
-
-- STMT_SELECT_CONFLICT_DETAILS
SELECT prop_reject, conflict_old, conflict_new, conflict_working
FROM actual_node
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1028597&r1=1028596&r2=1028597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Oct 29 03:33:35 2010
@@ -7696,6 +7696,7 @@ svn_wc__db_read_conflict_victims(const a
svn_boolean_t have_row;
apr_hash_t *found;
apr_array_header_t *found_keys;
+ apr_hash_t *conflict_items;
*victims = NULL;
@@ -7729,24 +7730,12 @@ svn_wc__db_read_conflict_victims(const a
SVN_ERR(svn_sqlite__reset(stmt));
/* And add tree conflicts */
- SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
- STMT_SELECT_ACTUAL_TREE_CONFLICT));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
-
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (have_row)
- tree_conflict_data = svn_sqlite__column_text(stmt, 0, scratch_pool);
- else
- tree_conflict_data = NULL;
-
- SVN_ERR(svn_sqlite__reset(stmt));
+ SVN_ERR(read_all_tree_conflicts(&conflict_items, pdh, local_relpath,
+ scratch_pool, scratch_pool));
- if (tree_conflict_data)
+ if (conflict_items)
{
- apr_hash_t *conflict_items;
apr_hash_index_t *hi;
- SVN_ERR(svn_wc__read_tree_conflicts(&conflict_items, tree_conflict_data,
- local_abspath, scratch_pool));
for(hi = apr_hash_first(scratch_pool, conflict_items);
hi;