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 2015/03/02 18:46:41 UTC
svn commit: r1663374 - /subversion/trunk/subversion/libsvn_wc/conflicts.c
Author: rhuijben
Date: Mon Mar 2 17:46:41 2015
New Revision: 1663374
URL: http://svn.apache.org/r1663374
Log:
* subversion/libsvn_wc/conflicts.c
(resolve_prop_conflict_on_node): Resolve variable shadowing by reading
the actual properties a bit earlier, and re-using the result.
Modified:
subversion/trunk/subversion/libsvn_wc/conflicts.c
Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1663374&r1=1663373&r2=1663374&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Mon Mar 2 17:46:41 2015
@@ -2400,6 +2400,9 @@ resolve_prop_conflict_on_node(svn_boolea
else
old_props = their_old_props;
+ SVN_ERR(svn_wc__db_read_props(&actual_props, db, local_abspath,
+ scratch_pool, scratch_pool));
+
/* We currently handle *_conflict as *_full as this argument is currently
always applied for all conflicts on a node at the same time. Giving
an error would break some tests that assumed that this would just
@@ -2427,11 +2430,7 @@ resolve_prop_conflict_on_node(svn_boolea
case svn_wc_conflict_choose_merged:
if ((merged_file || merged_value) && conflicted_propname[0] != '\0')
{
- apr_hash_t *actual_props;
-
- SVN_ERR(svn_wc__db_read_props(&actual_props, db, local_abspath,
- scratch_pool, scratch_pool));
- resolve_from = actual_props;
+ resolve_from = apr_hash_copy(scratch_pool, actual_props);
if (!merged_value)
{
@@ -2456,8 +2455,6 @@ resolve_prop_conflict_on_node(svn_boolea
}
- SVN_ERR(svn_wc__db_read_props(&actual_props, db, local_abspath,
- scratch_pool, scratch_pool));
if (resolve_from)
{
apr_hash_index_t *hi;