Author: stsp
Date: Wed Jun 15 14:21:00 2011
New Revision: 1136063

URL: http://svn.apache.org/viewvc?rev=1136063&view=rev
Log:
Fix issue #3919. During a merge of a property, add a check against the
incoming new property value and the working copy value. If they
already match, then the merge trivially succeeds.

* subversion/libsvn_wc/props.c
  (apply_single_generic_prop_change): Do nothing if the incoming new
  property value already matches the working value.

Patch by: Brian Neal <[email protected]>
          me

Modified:
    subversion/trunk/subversion/libsvn_wc/props.c

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1136063&r1=1136062&r2=1136063&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Wed Jun 15 14:21:00 2011
@@ -1362,8 +1362,9 @@ apply_single_mergeinfo_prop_change(svn_w
 }
 
 /* Merge a change to a property, using the rule that if the working value
-   is the same as OLD_VAL then apply the change as a simple update
-   (replacement), otherwise invoke maybe_generate_propconflict().
+   is equal to the new value then there is nothing we need to do. Else, if
+   the working value is the same as the old value then apply the change as a
+   simple update (replacement), otherwise invoke maybe_generate_propconflict().
    The definition of the arguments and behaviour is the same as
    apply_single_prop_change(). */
 static svn_error_t *
@@ -1390,8 +1391,15 @@ apply_single_generic_prop_change(svn_wc_
 
   SVN_ERR_ASSERT(old_val != NULL);
 
+  /* If working_val is the same as new_val already then there is
+   * nothing to do */
+  if (working_val && new_val
+      && svn_string_compare(working_val, new_val))
+    {
+       set_prop_merge_state(state, svn_wc_notify_state_merged);
+    }
   /* If working_val is the same as old_val... */
-  if (working_val && old_val
+  else if (working_val && old_val
       && svn_string_compare(working_val, old_val))
     {
       /* A trivial update: change it to new_val. */


Reply via email to