You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2015/08/14 02:33:20 UTC

svn commit: r1695807 - /subversion/branches/patch-exec/subversion/libsvn_client/patch.c

Author: danielsh
Date: Fri Aug 14 00:33:20 2015
New Revision: 1695807

URL: http://svn.apache.org/r1695807
Log:
On the patch-exec branch: Document why redundant patches don't double-notify as one might expect them to.

No functional change.

* subversion/libsvn_client/patch.c
  (init_patch_target): As above.

Modified:
    subversion/branches/patch-exec/subversion/libsvn_client/patch.c

Modified: subversion/branches/patch-exec/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/libsvn_client/patch.c?rev=1695807&r1=1695806&r2=1695807&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/patch-exec/subversion/libsvn_client/patch.c Fri Aug 14 00:33:20 2015
@@ -1265,6 +1265,28 @@ init_patch_target(patch_target_t **patch
                                            "%s changes (for '%s')"),
                                          SVN_PROP_EXECUTABLE,
                                          target->local_abspath);
+              else
+                /* We have two representations of the same change.
+                 *
+                 * In the caller, there will be two hunk_info_t's for the
+                 * patch: one generated from the property diff and one
+                 * generated from the out-of-band mode change.  Both hunks will
+                 * be processed, but the output will be as though there was
+                 * just one hunk.
+                 *
+                 * The reason there will be only a single notification is not
+                 * specific to SVN_PROP_EXECUTABLE but generic to all property
+                 * patches: if a patch file contains two identical property
+                 * hunks (e.g., 
+                 *  svn ps k v iota; svn diff iota >patch; svn diff iota >>patch
+                 * ), applying the patch file will only produce a single ' U'
+                 * notification.
+                 *
+                 * In contrast, the same for file-content hunks will result in
+                 * a 'U' notification followed by a 'G' notification.  (The 'U'
+                 * for the first copy of the hunk; the 'G' for the second.)
+                 */
+                ;
             }
           else if (patch->new_executable_p != svn_tristate_unknown
                    && !prop_executable_target)