You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/06/11 12:31:10 UTC
svn commit: r953644 - in /subversion/trunk/subversion/libsvn_wc:
wc-queries.sql wc_db.c
Author: rhuijben
Date: Fri Jun 11 10:31:10 2010
New Revision: 953644
URL: http://svn.apache.org/viewvc?rev=953644&view=rev
Log:
* subversion/libsvn_wc/wc-queries.sql
(STMT_INSERT_ACTUAL_TEXT_CONFLICTS,
STMT_INSERT_ACTUAL_PROPERTY_CONFLICTS):
Add parent_relpath and obsolete (copy&pasted) comment.
* subversion/libsvn_wc/wc_db.c
(svn_wc__db_temp_op_set_text_conflict_marker_files,
svn_wc__db_temp_op_set_property_conflict_marker_file): Add comment
on using a transaction and properly set the parent_relpath when
we add a new record.
Found by: gstein
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=953644&r1=953643&r2=953644&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Jun 11 10:31:10 2010
@@ -221,22 +221,19 @@ conflict_working = ?5
where wc_id = ?1 and local_relpath = ?2;
-- STMT_INSERT_ACTUAL_TEXT_CONFLICTS
-/* tree conflicts are always recorded on the wcroot node, so the
- parent_relpath will be null. */
insert into actual_node (
- wc_id, local_relpath, conflict_old, conflict_new, conflict_working)
-values (?1, ?2, ?3, ?4, ?5);
+ wc_id, local_relpath, conflict_old, conflict_new, conflict_working,
+ parent_relpath)
+values (?1, ?2, ?3, ?4, ?5, ?6);
-- STMT_UPDATE_ACTUAL_PROPERTY_CONFLICTS
update actual_node set prop_reject = ?3
where wc_id = ?1 and local_relpath = ?2;
-- STMT_INSERT_ACTUAL_PROPERTY_CONFLICTS
-/* tree conflicts are always recorded on the wcroot node, so the
- parent_relpath will be null. */
insert into actual_node (
- wc_id, local_relpath, prop_reject)
-values (?1, ?2, ?3);
+ wc_id, local_relpath, prop_reject, parent_relpath)
+values (?1, ?2, ?3, ?4);
-- STMT_UPDATE_ACTUAL_CHANGELIST
update actual_node set changelist = ?3
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=953644&r1=953643&r2=953644&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jun 11 10:31:10 2010
@@ -8191,6 +8191,9 @@ svn_wc__db_temp_op_set_text_conflict_mar
scratch_pool, scratch_pool));
VERIFY_USABLE_PDH(pdh);
+ /* This should be handled in a transaction, but we can assume a db locl\
+ and this code won't survive until 1.7 */
+
SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
STMT_SELECT_ACTUAL_NODE));
SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
@@ -8207,6 +8210,10 @@ svn_wc__db_temp_op_set_text_conflict_mar
{
SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
STMT_INSERT_ACTUAL_TEXT_CONFLICTS));
+
+ SVN_ERR(svn_sqlite__bind_text(stmt, 5,
+ svn_relpath_dirname(local_relpath,
+ scratch_pool)));
}
SVN_ERR(svn_sqlite__bindf(stmt, "issss", pdh->wcroot->wc_id,
@@ -8239,6 +8246,9 @@ svn_wc__db_temp_op_set_property_conflict
scratch_pool, scratch_pool));
VERIFY_USABLE_PDH(pdh);
+ /* This should be handled in a transaction, but we can assume a db locl\
+ and this code won't survive until 1.7 */
+
SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
STMT_SELECT_ACTUAL_NODE));
SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
@@ -8255,6 +8265,10 @@ svn_wc__db_temp_op_set_property_conflict
{
SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
STMT_INSERT_ACTUAL_PROPERTY_CONFLICTS));
+
+ SVN_ERR(svn_sqlite__bind_text(stmt, 4,
+ svn_relpath_dirname(local_relpath,
+ scratch_pool)));
}
SVN_ERR(svn_sqlite__bindf(stmt, "iss", pdh->wcroot->wc_id,