You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/04/21 17:48:20 UTC

svn commit: r1740344 - in /subversion/trunk/subversion: libsvn_wc/conflicts.c svn/notify.c

Author: stsp
Date: Thu Apr 21 15:48:19 2016
New Revision: 1740344

URL: http://svn.apache.org/viewvc?rev=1740344&view=rev
Log:
Don't ever send resolution notifications for properties without including
a property name. This looks ugly and wasn't intended.

* subversion/libsvn_wc/conflicts.c
  (conflict_status_walker, svn_wc__conflict_prop_mark_resolved): Send a
   propery name along with svn_wc_notify_resolved_prop. If that's not
   possible send a general 'resolved' notification.

* subversion/svn/notify.c
  (notify_body): Assert property name for svn_wc_notify_resolved_prop.

Modified:
    subversion/trunk/subversion/libsvn_wc/conflicts.c
    subversion/trunk/subversion/svn/notify.c

Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1740344&r1=1740343&r2=1740344&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Thu Apr 21 15:48:19 2016
@@ -3115,9 +3115,20 @@ conflict_status_walker(void *baton,
           (cswb->resolve_prop == NULL || cswb->resolve_prop[0] == '\0'))
         notify_action = svn_wc_notify_resolved;
 
+      /* If we resolved a property conflict, but no specific property was
+       * requested by the caller, send a general 'resolved' notification. */
+      if (notify_action == svn_wc_notify_resolved_prop &&
+          (cswb->resolve_prop == NULL || cswb->resolve_prop[0] == '\0'))
+        notify_action = svn_wc_notify_resolved;
+
       notify = svn_wc_create_notify(local_abspath, notify_action, iterpool);
+
+      /* Add the property name for property-specific notifications. */
       if (notify_action == svn_wc_notify_resolved_prop)
-        notify->prop_name = cd->property_name;
+        {
+          notify->prop_name = cd->property_name;
+          SVN_ERR_ASSERT(strlen(notify->prop_name) > 0);
+        }
 
       cswb->notify_func(cswb->notify_baton, notify, iterpool);
 
@@ -3402,10 +3413,22 @@ svn_wc__conflict_prop_mark_resolved(svn_
   if (did_resolve && notify_func)
     {
       svn_wc_notify_t *notify;
-      
-      notify = svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_prop,
-                                     scratch_pool),
-      notify->prop_name = propname;
+
+      /* Send a general notification if no specific property was requested. */
+      if (propname == NULL || propname[0] == '\0')
+        {
+          notify = svn_wc_create_notify(local_abspath,
+                                        svn_wc_notify_resolved,
+                                        scratch_pool);
+        }
+      else
+        {
+          notify = svn_wc_create_notify(local_abspath,
+                                        svn_wc_notify_resolved_prop,
+                                        scratch_pool);
+          notify->prop_name = propname;
+        }
+
       notify_func(notify_baton, notify, scratch_pool);
     }
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/notify.c?rev=1740344&r1=1740343&r2=1740344&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/notify.c (original)
+++ subversion/trunk/subversion/svn/notify.c Thu Apr 21 15:48:19 2016
@@ -458,6 +458,7 @@ notify_body(struct notify_baton *nb,
       break;
 
     case svn_wc_notify_resolved_prop:
+      SVN_ERR_ASSERT(n->prop_name && strlen(n->prop_name) > 0);
       SVN_ERR(svn_cmdline_printf(pool,
                                  _("Conflict in property '%s' at '%s' marked "
                                    "as resolved.\n"),