You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2012/05/09 12:53:19 UTC
svn commit: r1336072 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_client/merge.c subversion/tests/cmdline/merge_tests.py
Author: svn-role
Date: Wed May 9 10:53:19 2012
New Revision: 1336072
URL: http://svn.apache.org/viewvc?rev=1336072&view=rev
Log:
Reintegrate the 1.7.x-issue4166 branch:
* r1329417
Fix issue #4166 'multiple merge editor drives which add then delete a
subtree fail'.
Justification:
Prevents merge failure in an edge case.
Branch:
^/subversion/branches/1.7.x-issue4166
Votes:
+1: pburba, philip, stsp
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_client/merge.c
subversion/branches/1.7.x/subversion/tests/cmdline/merge_tests.py
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4166:r1330474-1336071
Merged /subversion/trunk:r1329417
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1336072&r1=1336071&r2=1336072&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed May 9 10:53:19 2012
@@ -67,16 +67,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1329417
- Fix issue #4166 'multiple merge editor drives which add then delete a
- subtree fail'.
- Justification:
- Prevents merge failure in an edge case.
- Branch:
- ^/subversion/branches/1.7.x-issue4166
- Votes:
- +1: pburba, philip, stsp
-
* r1330444, 1330520
Fix issue #4169 'added subtrees with non-inheritable mergeinfo cause
spurious subtree mergeinfo'.
Modified: subversion/branches/1.7.x/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/merge.c?rev=1336072&r1=1336071&r2=1336072&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/merge.c Wed May 9 10:53:19 2012
@@ -2655,6 +2655,16 @@ notification_receiver(void *baton, const
apr_hash_set(notify_b->added_abspaths, added_path,
APR_HASH_KEY_STRING, added_path);
}
+
+ if (notify->action == svn_wc_notify_update_delete
+ && notify_b->added_abspaths)
+ {
+ /* Issue #4166: If a previous merge added NOTIFY_ABSPATH, but we
+ are now deleting it, then remove it from the list of added
+ paths. */
+ apr_hash_set(notify_b->added_abspaths, notify->path,
+ APR_HASH_KEY_STRING, NULL);
+ }
}
/* If our merge sources are ancestors of one another... */
Modified: subversion/branches/1.7.x/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/merge_tests.py?rev=1336072&r1=1336071&r2=1336072&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/1.7.x/subversion/tests/cmdline/merge_tests.py Wed May 9 10:53:19 2012
@@ -17193,6 +17193,76 @@ def reverse_merge_with_rename(sbox):
'merge', sbox.repo_url + '/trunk',
A_COPY_path, '-r9:1')
+#----------------------------------------------------------------------
+# Test for issue #4166 'multiple merge editor drives which add then
+# delete a subtree fail'.
+@SkipUnless(server_has_mergeinfo)
+@Issue(4166)
+def merge_adds_then_deletes_subtree(sbox):
+ "merge adds then deletes subtree"
+
+ # Some paths we'll care about.
+ A_path = os.path.join(sbox.wc_dir, 'A')
+ nu_path = os.path.join(sbox.wc_dir, 'A', 'C', 'nu')
+ C_branch_path = os.path.join(sbox.wc_dir, 'branch', 'C')
+ nu_branch_path = os.path.join(sbox.wc_dir, 'branch', 'C', 'nu')
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Make a branch.
+ svntest.actions.run_and_verify_svn(None, None, [], 'copy',
+ sbox.repo_url + '/A',
+ sbox.repo_url + '/branch',
+ '-m', 'Make a branch.')
+
+ # On the branch parent: Add a file in r3 and then delete it in r4.
+ svntest.main.file_write(nu_path, "This is the file 'nu'.\n")
+ svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir,
+ '-m', 'Add a file')
+ svntest.actions.run_and_verify_svn(None, None, [], 'delete', nu_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir,
+ '-m', 'Delete a file')
+
+ # Merge r3 and r4 from ^/A/C to branch/C as part of one merge
+ # command, but as separate editor drives, i.e. 'c3,4 vs. -r2:4.
+ # These should be equivalent but the former was failing with:
+ #
+ # >svn merge ^/A/C branch\C -c3,4
+ # --- Merging r3 into 'branch\C':
+ # A branch\C\nu
+ # --- Recording mergeinfo for merge of r3 into 'branch\C':
+ # U branch\C
+ # --- Merging r4 into 'branch\C':
+ # D branch\C\nu
+ # --- Recording mergeinfo for merge of r4 into 'branch\C':
+ # G branch\C
+ # ..\..\..\subversion\svn\util.c:913: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_client\merge.c:10873: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_client\merge.c:10837: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_client\merge.c:8994: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_client\merge.c:7923: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_client\mergeinfo.c:257: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_client\mergeinfo.c:97: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_wc\props.c:2003: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_wc\props.c:2024: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_wc\wc_db.c:11473: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_wc\wc_db.c:7247: (apr_err=155010)
+ # ..\..\..\subversion\libsvn_wc\wc_db.c:7232: (apr_err=155010)
+ # svn: E155010: The node 'C:\SVN\src-trunk\Debug\subversion\tests
+ # \cmdline\svn-test-work\working_copies\merge_tests-128\branch\C\nu'
+ # was not found.
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ svntest.actions.run_and_verify_svn(
+ None,
+ expected_merge_output([[3],[4]],
+ ['A ' + nu_branch_path + '\n',
+ 'D ' + nu_branch_path + '\n',
+ ' U ' + C_branch_path + '\n',
+ ' G ' + C_branch_path + '\n',]),
+ [], 'merge', '-c3,4', sbox.repo_url + '/A/C', C_branch_path)
+
########################################################################
# Run the tests
@@ -17322,6 +17392,7 @@ test_list = [ None,
merge_adds_subtree_with_mergeinfo,
record_only_merge_adds_new_subtree_mergeinfo,
reverse_merge_with_rename,
+ merge_adds_then_deletes_subtree,
]
if __name__ == '__main__':