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 2013/01/30 21:18:50 UTC

svn commit: r1440647 - in /subversion/trunk/subversion: libsvn_client/merge.c tests/cmdline/merge_tests.py

Author: rhuijben
Date: Wed Jan 30 20:18:50 2013
New Revision: 1440647

URL: http://svn.apache.org/viewvc?rev=1440647&view=rev
Log:
After talking with pburba, tweak some expected results as a followup of my
issue #4305 "Merged directory properties are always added" fix.

I'm not 100% convinced whether the notifications are how we want them,
(with all those duplicates) but for now it reinstates the old behavior
and adds verifications that we won't break it with further merge tweaks.

* subversion/libsvn_client/merge.c
  (merge_file_added,
   merge_dir_added): When merging to the same repository, add added nodes with
    an svn:mergeinfo property to the paths_with_new_mergeinfo hash.

* subversion/tests/cmdline/merge_tests.py
  (no_self_referential_filtering_on_added_path): Remove Wimp.
     Expect double 'G' mergeinfo on C_Moved.

  (merge_adds_subtree_with_mergeinfo): Expect a mergeinfo tweak on
    C/nu.

  (merge_with_added_subtrees_with_mergeinfo): Remove Wimp marker.
    Expect C/X/Y properties to be merged.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/tests/cmdline/merge_tests.py

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1440647&r1=1440646&r2=1440647&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Jan 30 20:18:50 2013
@@ -2060,6 +2060,13 @@ merge_file_added(const char *relpath,
 
           pristine_props = right_props; /* Includes last_* information */
           new_props = NULL; /* No local changes */
+
+          if (apr_hash_get(pristine_props, SVN_PROP_MERGEINFO,
+                           APR_HASH_KEY_STRING))
+            {
+              alloc_and_store_path(&merge_b->paths_with_new_mergeinfo,
+                                   local_abspath, merge_b->pool);
+            }
         }
       else
         {
@@ -2863,25 +2870,12 @@ merge_dir_added(const char *relpath,
                                                 scratch_pool));
         }
 
-      /* Until issue #3405 was fixed the code for changed directories was
-         used for directory deletions, which made use apply svn:mergeinfo as if
-         additional changes were applied by the merge, which really weren't.
-
-         ### I wouldn't be surprised if we somehow relied on these for correct
-         ### merges, but in this case the fix added here should also be applied
-         ### for added files! */
-
-      /* ### The old code performed (via prepare_merge_props_changed):
       if (apr_hash_get(new_pristine_props, SVN_PROP_MERGEINFO,
                        APR_HASH_KEY_STRING))
         {
           alloc_and_store_path(&merge_b->paths_with_new_mergeinfo,
                                local_abspath, merge_b->pool);
         }
-         ### which is something merge_add_file() doesn't do, but
-         ### merge_tests.py 95: no self referential filtering on added path
-         ### fails if this block is not enabled.
-      */
 
       return SVN_NO_ERROR;
     }

Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1440647&r1=1440646&r2=1440647&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Wed Jan 30 20:18:50 2013
@@ -13876,7 +13876,6 @@ def subtree_gets_changes_even_if_ultimat
 
 #----------------------------------------------------------------------
 @SkipUnless(server_has_mergeinfo)
-@Wimp("Needs review after issue #3405 fix")
 def no_self_referential_filtering_on_added_path(sbox):
   "no self referential filtering on added path"
 
@@ -13957,7 +13956,7 @@ def no_self_referential_filtering_on_add
     })
   expected_mergeinfo_output = wc.State(A_COPY_2_path, {
     ''        : Item(status=' G'),
-    'C_MOVED' : Item(status=' U'),
+    'C_MOVED' : Item(status=' G', prev_status=' G'),
     })
   expected_elision_output = wc.State(A_COPY_2_path, {
     })
@@ -16805,7 +16804,7 @@ def merge_adds_subtree_with_mergeinfo(sb
     })
   expected_mergeinfo_output = wc.State(A_COPY2_path, {
     ''     : Item(status=' G'),
-    'C/nu' : Item(status=' U'),
+    'C/nu' : Item(status=' G', prev_status=' U'),
     })
   expected_elision_output = wc.State(A_COPY2_path, {
     })
@@ -17643,7 +17642,6 @@ def merge_adds_then_deletes_subtree(sbox
 # cause spurious subtree mergeinfo'.
 @SkipUnless(server_has_mergeinfo)
 @Issue(4169)
-@Wimp("Needs review after issue #3405 fix")
 def merge_with_added_subtrees_with_mergeinfo(sbox):
   "merge with added subtrees with mergeinfo"
 
@@ -17746,8 +17744,8 @@ def merge_with_added_subtrees_with_merge
     })
   expected_mergeinfo_output = wc.State(A_COPY2_path, {
     ''      : Item(status=' U'),
-    'C/X/Y' : Item(status=' G'), # Added with explicit mergeinfo so mergeinfo
-    })                           # describing the merge shows as mer'G'ed.
+    'C/X/Y' : Item(status=' U'), # Added with explicit mergeinfo
+    })
   expected_elision_output = wc.State(A_COPY2_path, {
     })
   expected_status = wc.State(A_COPY2_path, {