Author: rhuijben
Date: Mon Mar 21 14:36:21 2011
New Revision: 1083805
URL: http://svn.apache.org/viewvc?rev=1083805&view=rev
Log:
Following up on storing tree conflicts on the node itself, stop looking
for conflicts on nodes that don't exist when calling svn_wc__db_read_info().
This avoids an unnecessary read transaction on every incoming node when
checking out a working copy. Also remove an unneeded optimization on conflicted
nodes that reduced the amount of disk stats at the cost of an extra read
transaction.
* subversion/libsvn_wc/update_editor.c
(node_already_conflicted): Just use svn_wc__internal_conflicted_p() for
determining if conflicts are still found.
(add_file, add_directory): Assume that nodes that don't exist in the database
are not conflicted.
Modified:
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1083805&r1=1083804&r2=1083805&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Mon Mar 21 14:36:21
2011
@@ -1896,40 +1896,15 @@ node_already_conflicted(svn_boolean_t *c
const char *local_abspath,
apr_pool_t *scratch_pool)
{
- const apr_array_header_t *conflicts;
- int i;
-
- SVN_ERR(svn_wc__db_read_conflicts(&conflicts, db, local_abspath,
- scratch_pool, scratch_pool));
+ svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
- *conflicted = FALSE;
-
- for (i = 0; i < conflicts->nelts; i++)
- {
- const svn_wc_conflict_description2_t *cd;
- cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description2_t *);
-
- if (cd->kind == svn_wc_conflict_kind_tree)
- {
- *conflicted = TRUE;
- return SVN_NO_ERROR;
- }
- else if (cd->kind == svn_wc_conflict_kind_property ||
- cd->kind == svn_wc_conflict_kind_text)
- {
- svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
- SVN_ERR(svn_wc__internal_conflicted_p(&text_conflicted,
- &prop_conflicted,
- &tree_conflicted,
- db, local_abspath,
- scratch_pool));
-
- *conflicted = (text_conflicted || prop_conflicted
- || tree_conflicted);
- return SVN_NO_ERROR;
- }
- }
+ SVN_ERR(svn_wc__internal_conflicted_p(&text_conflicted,
+ &prop_conflicted,
+ &tree_conflicted,
+ db, local_abspath,
+ scratch_pool));
+ *conflicted = (text_conflicted || prop_conflicted || tree_conflicted);
return SVN_NO_ERROR;
}
@@ -2209,7 +2184,7 @@ add_directory(const char *path,
svn_error_clear(err);
wc_kind = svn_wc__db_kind_unknown;
status = svn_wc__db_status_normal;
- conflicted = TRUE; /* TRUE here causes us to check for a conflict */
+ conflicted = FALSE;
versioned_locally_and_present = FALSE;
}
@@ -3097,7 +3072,7 @@ add_file(const char *path,
svn_error_clear(err);
wc_kind = svn_wc__db_kind_unknown;
status = svn_wc__db_status_normal;
- conflicted = TRUE; /* TRUE here causes us to check for a conflict */
+ conflicted = FALSE;
versioned_locally_and_present = FALSE;
}