subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1663374 - /subversion/trunk/subversion/libsvn_wc/conflicts.c
Date Mon, 02 Mar 2015 17:46:41 GMT
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;



Mime
View raw message