You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/15 21:32:38 UTC
svn commit: r997472 [36/41] - in /subversion/branches/py-tests-as-modules:
./ build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/server-side/ notes/ notes/tree-conflicts/ notes/wc-ng/
subversion/bindings/javahl/native/ subversi...
Modified: subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_reintegrate_tests.py Wed Sep 15 19:32:26 2010
@@ -171,7 +171,7 @@ def basic_reintegrate(sbox):
'mu' : Item(status='U '),
})
expected_mergeinfo_output = wc.State(A_path, {
- '' : Item(status=' G'),
+ '' : Item(status=' U'),
})
expected_elision_output = wc.State(A_path, {
})
@@ -208,7 +208,7 @@ def basic_reintegrate(sbox):
expected_skip,
None, None, None, None,
None, True, True,
- '--reintegrate')
+ '--reintegrate', A_path)
# Test issue #3640:
#
@@ -229,7 +229,7 @@ def basic_reintegrate(sbox):
'mu' : Item(status='U '),
})
expected_mergeinfo_output = wc.State(A_MOVED_path, {
- '' : Item(status=' G'),
+ '' : Item(status=' U'),
})
expected_elision_output = wc.State(A_MOVED_path, {
})
@@ -267,7 +267,7 @@ def basic_reintegrate(sbox):
expected_skip,
None, None, None, None,
None, True, True,
- '--reintegrate')
+ '--reintegrate', A_MOVED_path)
#----------------------------------------------------------------------
def reintegrate_with_rename(sbox):
@@ -452,8 +452,8 @@ def reintegrate_with_rename(sbox):
'D/G/tauprime' : Item(status='A '),
})
expected_mergeinfo_output = wc.State(A_path, {
- '' : Item(status=' G'),
- 'D/G/tauprime' : Item(status=' G'),
+ '' : Item(status=' U'),
+ 'D/G/tauprime' : Item(status=' U'),
})
expected_elision_output = wc.State(A_path, {
})
@@ -509,7 +509,7 @@ def reintegrate_with_rename(sbox):
expected_skip,
None, None, None, None,
None, True, True,
- '--reintegrate')
+ '--reintegrate', A_path)
# Finally, commit the result of the merge (r10).
expected_output = wc.State(wc_dir, {
@@ -642,7 +642,7 @@ def reintegrate_branch_never_merged_to(s
expected_skip,
None, None, None, None,
None, True, True,
- '--reintegrate')
+ '--reintegrate', A_path)
# Finally, commit the result of the merge (r9).
expected_output = wc.State(wc_dir, {
@@ -670,7 +670,7 @@ def reintegrate_fail_on_modified_wc(sbox
A_path, None, None, sbox.repo_url + '/A_COPY', None, None, None, None,
None, None, None,
".*Cannot reintegrate into a working copy that has local modifications.*",
- None, None, None, None, True, False, '--reintegrate')
+ None, None, None, None, True, False, '--reintegrate', A_path)
#----------------------------------------------------------------------
def reintegrate_fail_on_mixed_rev_wc(sbox):
@@ -693,7 +693,7 @@ def reintegrate_fail_on_mixed_rev_wc(sbo
A_path, None, None, sbox.repo_url + '/A_COPY', None, None, None, None,
None, None, None,
".*Cannot reintegrate into mixed-revision working copy.*",
- None, None, None, None, True, False, '--reintegrate')
+ None, None, None, None, True, False, '--reintegrate', A_path)
#----------------------------------------------------------------------
def reintegrate_fail_on_switched_wc(sbox):
@@ -738,7 +738,7 @@ def reintegrate_fail_on_switched_wc(sbox
A_path, None, None, sbox.repo_url + '/A_COPY', None, None, None, None,
None, None, None,
".*Cannot reintegrate into a working copy with a switched subtree.*",
- None, None, None, None, True, False, '--reintegrate')
+ None, None, None, None, True, False, '--reintegrate', A_path)
#----------------------------------------------------------------------
# Test for issue #3603 'allow reintegrate merges into WCs with
@@ -816,7 +816,7 @@ def reintegrate_on_shallow_wc(sbox):
expected_A_status,
expected_A_skip,
None, None, None, None,
- None, 1, 1, "--reintegrate")
+ None, 1, 1, "--reintegrate", A_path)
# Now revert the reintegrate and make a second change on the
# branch in r4, but this time change a subtree that corresponds
@@ -848,7 +848,7 @@ def reintegrate_on_shallow_wc(sbox):
expected_A_status,
expected_A_skip,
None, None, None, None,
- None, 1, 1, "--reintegrate")
+ None, 1, 1, "--reintegrate", A_path)
#----------------------------------------------------------------------
def reintegrate_fail_on_stale_source(sbox):
@@ -925,7 +925,7 @@ def reintegrate_fail_on_stale_source(sbo
expected_status,
expected_skip,
[], None, None, None, None, True, True,
- '--reintegrate')
+ '--reintegrate', A_path)
#----------------------------------------------------------------------
def merge_file_with_space_in_its_path(sbox):
@@ -1114,9 +1114,9 @@ def reintegrate_with_subtree_mergeinfo(s
'D' : Item(status=' U'),
})
expected_mergeinfo_output = wc.State(A_path, {
- '' : Item(status=' G'),
+ '' : Item(status=' U'),
'mu' : Item(status=' G'),
- 'D' : Item(status=' G'),
+ 'D' : Item(status=' U'),
})
expected_elision_output = wc.State(A_path, {
})
@@ -1176,7 +1176,7 @@ def reintegrate_with_subtree_mergeinfo(s
expected_A_status,
expected_A_skip,
None, None, None, None,
- None, 1, 1, "--reintegrate")
+ None, 1, 1, "--reintegrate", A_path)
# Make some more changes to A_COPY so that the same revisions have *not*
# been uniformly applied from A to A_COPY. In this case the reintegrate
@@ -1350,9 +1350,9 @@ def reintegrate_with_subtree_mergeinfo(s
'D/gamma_moved' : Item(status=' U'),
})
expected_mergeinfo_output = wc.State(A_path, {
- '' : Item(status=' G'),
+ '' : Item(status=' U'),
'mu' : Item(status=' G'),
- 'D' : Item(status=' G'),
+ 'D' : Item(status=' U'),
'D/gamma_moved' : Item(status=' G'),
})
expected_elision_output = wc.State(A_path, {
@@ -1397,8 +1397,21 @@ def reintegrate_with_subtree_mergeinfo(s
'D/G/pi' : Item("This is the file 'pi'.\n"),
'D/G/rho' : Item("New content"),
'D/G/tau' : Item("This is the file 'tau'.\n"),
+ # Why do we expect mergeinfo of '/A_COPY/D/G/tauprime:2-9' on
+ # A/D/G/tauprime? Because this --reintegrate merge is effectively a
+ # two URL merge of %URL%/A@9 %URL%/A_COPY@9 to 'A'. Since %URL%/A@9 and
+ # %URL%/A_COPY@9 have a common ancestor in %URL%/A@1 we expect this 2-URL
+ # merge to record mergeinfo and a component of that mergeinfo describes
+ # the merge of %URL%/A_COPY@2 to %URL%/A_COPY@9. We see that above on
+ # A. But we also get it on A's subtrees with explicit mergeinfo, namely
+ # A/D/G/tauprime. Now I know what you are thinking, "'A_COPY/D/G/tauprime'
+ # doesn't even exist until r9!", and you are quite right. But this
+ # inheritance of bogus mergeinfo is a known problem, see
+ # http://subversion.tigris.org/issues/show_bug.cgi?id=3157#desc8,
+ # and is not what this test is about, so we won't fail because of it.
'D/gamma_moved' : Item(
- "Even newer content", props={SVN_PROP_MERGEINFO :
+ "Even newer content", props={SVN_PROP_MERGEINFO :
+ '/A/D/gamma_moved:2-15\n'
'/A_COPY/D/gamma_moved:2-19\n'
'/A_COPY_3/D/gamma:9'}),
'D/H' : Item(),
@@ -1416,7 +1429,7 @@ def reintegrate_with_subtree_mergeinfo(s
expected_A_status,
expected_A_skip,
None, None, None, None,
- None, 1, 1, "--reintegrate")
+ None, 1, 1, "--reintegrate", A_path)
#----------------------------------------------------------------------
def multiple_reintegrates_from_the_same_branch(sbox):
@@ -1514,7 +1527,7 @@ def multiple_reintegrates_from_the_same_
'B/E/beta' : Item(status='U '),
})
expected_mergeinfo_output = wc.State(A_path, {
- '' : Item(status=' G'),
+ '' : Item(status=' U'),
})
expected_elision_output = wc.State(A_path, {
})
@@ -1576,7 +1589,7 @@ def multiple_reintegrates_from_the_same_
expected_status,
expected_skip,
None, None, None, None,
- None, 1, 1, '--reintegrate')
+ None, 1, 1, '--reintegrate', A_path)
svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
"2nd Reintegrate feature branch back to 'A'",
wc_dir)
@@ -1732,7 +1745,7 @@ def reintegrate_with_self_referential_me
expected_status,
expected_skip,
None, None, None, None,
- None, 1, 0, '--reintegrate')
+ None, 1, 0, '--reintegrate', A2_path)
#----------------------------------------------------------------------
# Test for issue #3577 '1.7 subtree mergeinfo recording breaks reintegrate'.
@@ -1863,7 +1876,7 @@ def reintegrate_with_subtree_merges(sbox
expected_A_status,
expected_A_skip,
None, None, None, None,
- None, 1, 1, "--reintegrate")
+ None, 1, 1, "--reintegrate", A_path)
#----------------------------------------------------------------------
# Test for issue #3654 'added subtrees with mergeinfo break reintegrate'.
@@ -1983,7 +1996,7 @@ def added_subtrees_with_mergeinfo_break_
'C/nu' : Item(status=' U'),
})
expected_mergeinfo_output = wc.State(A_path, {
- '' : Item(status=' G'),
+ '' : Item(status=' U'),
'C/nu' : Item(status=' G'),
})
expected_elision_output = wc.State(A_path, {
@@ -2057,8 +2070,167 @@ def added_subtrees_with_mergeinfo_break_
expected_status,
expected_skip,
None, None, None, None,
- None, 1, 1, "--reintegrate")
+ None, 1, 1, "--reintegrate", A_path)
+
+#----------------------------------------------------------------------
+# Test for issue #3648 '2-URL merges incorrectly reverse-merge mergeinfo
+# for merge target'.
+def two_URL_merge_removes_valid_mergefino_from_target(sbox):
+ "2-URL merge removes valid mergefino from target"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Some paths we'll care about
+ lambda_COPY_path = os.path.join(wc_dir, "A_COPY", "B", "lambda")
+ mu_path = os.path.join(wc_dir, "A", "mu")
+ A_COPY_path = os.path.join(wc_dir, "A_COPY")
+ A_COPY_2_path = os.path.join(wc_dir, "A_COPY_2")
+ # Branch A@1 to A_COPY r2
+ # Branch A@1 to A_COPY_2 in r3.
+ # Make some changes under 'A' in r4-7.
+ wc_disk, wc_status = set_up_branch(sbox, nbr_of_branches=2)
+
+ # r8 - A simple text edit on the A_COPY branch.
+ svntest.main.file_write(lambda_COPY_path, "Edit on 'branch 1'.\n")
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+ '-m', "Work on 'branch 1'.",
+ wc_dir)
+
+ # r9 - Sync the A_COPY branch with A up the HEAD (r8). Now A_COPY
+ # differs from A only by the change made in r8 and by the mergeinfo
+ # '/A:2-8' on A_COPY which was set to describe the merge.
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+ 'merge', sbox.repo_url + '/A', A_COPY_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+ '-m', 'Sync A to A_COPY.',
+ wc_dir)
+
+ # r10 - A simple text edit on our "trunk" A.
+ svntest.main.file_write(mu_path, "Edit on 'trunk'.\n")
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+ '-m', "Work on 'trunk'",
+ wc_dir)
+
+ # r11 - Sync the A_COPY_2 branch with A up to HEAD (r10).
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+ 'merge', sbox.repo_url + '/A',
+ A_COPY_2_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+ '-m', 'Sync A to A_COPY_2.',
+ wc_dir)
+
+ # Confirm that the mergeinfo on each branch is what we expect.
+ svntest.actions.run_and_verify_svn(None,
+ [A_COPY_path + ' - /A:2-8\n'],
+ [], 'pg', SVN_PROP_MERGEINFO,
+ '-R', A_COPY_path)
+ svntest.actions.run_and_verify_svn(None,
+ [A_COPY_2_path + ' - /A:3-10\n'],
+ [], 'pg', SVN_PROP_MERGEINFO,
+ '-R', A_COPY_2_path)
+
+ # Now say we want to apply the changes made on the first branch (A_COPY)
+ # to the second branch (A_COPY_2). One way to do this is a 2-URL merge
+ # between A at the revision last synced to A_COPY and A_COPY_2 at HEAD (r11),
+ # i.e.:
+ #
+ # svn merge ^/A@8 ^/A_COPY@11 A_COPY_2_WC
+ #
+ # Recall from the note on r9 that this diff is simply the one text change
+ # made on branch 1 and some mergeinfo:
+ #
+ # >svn diff ^/A@8 ^/A_COPY@11
+ # Index: B/lambda
+ # ===================================================================
+ # --- B/lambda (.../A) (revision 8)
+ # +++ B/lambda (.../A_COPY) (revision 11)
+ # @@ -1 +1 @@
+ # -This is the file 'lambda'.
+ # +Edit on 'branch 1'.
+ #
+ # Property changes on: .
+ # ___________________________________________________________________
+ # Added: svn:mergeinfo
+ # Merged /A:r2-8
+ #
+ # The mergeinfo diff is already represented in A_COPY_2's mergeinfo, so the
+ # result of the merge should be the text change to lambda and the addition
+ # of mergeinfo showing that the history of A_COPY is now part of A_COPY_2,
+ # i.e. '/A_COPY:2-11'
+ #
+ # Before issue #3648 was fixed this test failed because the valid mergeinfo
+ # '/A:r3-8' on A_COPY_2 was removed by the merge.
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ expected_output = wc.State(A_COPY_2_path, {
+ '' : Item(status=' G'),
+ 'B/lambda' : Item(status='U '),
+ })
+ expected_mergeinfo_output = wc.State(A_COPY_2_path, {
+ '' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(A_COPY_2_path, {
+ })
+ expected_status = wc.State(A_COPY_2_path, {
+ '' : Item(status=' M'),
+ 'B' : Item(status=' '),
+ 'mu' : Item(status=' '),
+ 'B/E' : Item(status=' '),
+ 'B/E/alpha' : Item(status=' '),
+ 'B/E/beta' : Item(status=' '),
+ 'B/lambda' : Item(status='M '),
+ 'B/F' : Item(status=' '),
+ 'C' : Item(status=' '),
+ 'D' : Item(status=' '),
+ 'D/G' : Item(status=' '),
+ 'D/G/pi' : Item(status=' '),
+ 'D/G/rho' : Item(status=' '),
+ 'D/G/tau' : Item(status=' '),
+ 'D/gamma' : Item(status=' '),
+ 'D/H' : Item(status=' '),
+ 'D/H/chi' : Item(status=' '),
+ 'D/H/psi' : Item(status=' '),
+ 'D/H/omega' : Item(status=' '),
+ })
+ expected_status.tweak(wc_rev=11)
+ expected_disk = wc.State('', {
+ '' : Item(props={SVN_PROP_MERGEINFO :
+ '/A:3-10\n/A_COPY:2-11'}),
+ 'B' : Item(),
+ 'mu' : Item("Edit on 'trunk'.\n"),
+ 'B/E' : Item(),
+ 'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+ 'B/E/beta' : Item("New content"),
+ 'B/lambda' : Item("Edit on 'branch 1'.\n"),
+ 'B/F' : Item(),
+ 'C' : Item(),
+ 'D' : Item(),
+ 'D/G' : Item(),
+ 'D/G/pi' : Item("This is the file 'pi'.\n"),
+ 'D/G/rho' : Item("New content"),
+ 'D/G/tau' : Item("This is the file 'tau'.\n"),
+ 'D/gamma' : Item("This is the file 'gamma'.\n"),
+ 'D/H' : Item(),
+ 'D/H/chi' : Item("This is the file 'chi'.\n"),
+ 'D/H/psi' : Item("New content"),
+ 'D/H/omega' : Item("New content"),
+ })
+ expected_skip = wc.State(A_COPY_path, {})
+ svntest.actions.run_and_verify_merge(A_COPY_2_path, 8, 11,
+ sbox.repo_url + '/A',
+ sbox.repo_url + '/A_COPY',
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, None, None, None,
+ None, 1, 1)
+
########################################################################
# Run the tests
@@ -2082,6 +2254,7 @@ test_list = [ None,
server_has_mergeinfo),
reintegrate_with_self_referential_mergeinfo,
added_subtrees_with_mergeinfo_break_reintegrate,
+ two_URL_merge_removes_valid_mergefino_from_target,
]
if __name__ == '__main__':
Modified: subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tests.py?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tests.py Wed Sep 15 19:32:26 2010
@@ -37,10 +37,10 @@ Item = wc.StateItem
XFail = svntest.testcase.XFail
Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
+Wimp = svntest.testcase.Wimp
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
-from svntest.main import is_fs_case_insensitive
from svntest.actions import fill_file_with_lines
from svntest.actions import make_conflict_marker_text
from svntest.actions import inject_conflict_into_expected_state
@@ -1325,8 +1325,12 @@ def merge_in_new_file_and_diff(sbox):
# Finally, run diff.
expected_output = [
+ "Index: " + url_branch_path + "\n",
+ "===================================================================\n",
+ "--- "+ url_branch_path + "\t(revision 2)\n",
+ "+++ "+ url_branch_path + "\t(working copy)\n",
"\n",
- "Property changes on: " + branch_path + "\n",
+ "Property changes on: " + url_branch_path + "\n",
"___________________________________________________________________\n",
"Added: " + SVN_PROP_MERGEINFO + "\n",
" Merged /A/B/E:r2-3\n",
@@ -1635,7 +1639,7 @@ def merge_skips_obstructions(sbox):
expected_status.copy(wc_dir),
expected_skip,
None, None, None, None, None,
- 1, 0, '--ignore-ancestry')
+ 1, 0, '--ignore-ancestry', wc_dir)
#----------------------------------------------------------------------
# At one time, a merge that added items with the same name as missing
@@ -1648,6 +1652,8 @@ def merge_into_missing(sbox):
sbox.build()
wc_dir = sbox.wc_dir
+
+ single_db = svntest.main.wc_is_singledb(wc_dir)
F_path = os.path.join(wc_dir, 'A', 'B', 'F')
F_url = sbox.repo_url + '/A/B/F'
@@ -1711,14 +1717,25 @@ def merge_into_missing(sbox):
'' : Item(status=' ', wc_rev=1),
'foo' : Item(status='! ', wc_rev=2),
'Q' : Item(status='! ', wc_rev='?'),
-# In some intermediate WC-NG state (since r937468) this was:
-# 'Q' : Item(status='! ', wc_rev='2', entry_rev='?'),
-# but the expected value is now back what it was.
})
expected_skip = wc.State(F_path, {
'Q' : Item(),
'foo' : Item(),
})
+
+ if single_db:
+ # Revision not lost
+ expected_status.tweak('Q', wc_rev=2)
+ # Missing data still available
+ expected_status.add({
+ 'Q/R' : Item(status='! ', wc_rev='3'),
+ 'Q/R/bar' : Item(status='! ', wc_rev='3'),
+ 'Q/baz' : Item(status='! ', wc_rev='3'),
+ })
+
+ # Use --ignore-ancestry because merge tracking aware merges raise an
+ # error when the merge target is missing subtrees due to OS-level
+ # deletes.
### Need to real and dry-run separately since real merge notifies Q
### twice!
@@ -1730,20 +1747,26 @@ def merge_into_missing(sbox):
expected_status,
expected_skip,
None, None, None, None, None,
- 0, 0, '--dry-run')
+ 0, 0, '--dry-run',
+ '--ignore-ancestry', F_path)
expected_status = wc.State(F_path, {
- '' : Item(status=' M', wc_rev=1),
- 'foo' : Item(status='!M', wc_rev=2),
+ '' : Item(status=' ', wc_rev=1),
+ 'foo' : Item(status='! ', wc_rev=2),
'Q' : Item(status='! ', wc_rev='?'),
-# In some intermediate WC-NG state (since r937468) this was:
-# 'Q' : Item(status='! ', wc_rev='2', entry_rev='?'),
-# but the expected value is now back what it was.
})
expected_mergeinfo_output = wc.State(F_path, {
- '' : Item(status=' U'),
- 'foo' : Item(status=' U'), # Mergeinfo is set on missing/obstructed files.
})
+
+ if single_db:
+ # Revision is known and we can record mergeinfo
+ expected_status.tweak('Q', wc_rev='2', entry_rev='?')
+ expected_status.add({
+ 'Q/R' : Item(status='! ', wc_rev='3'),
+ 'Q/R/bar' : Item(status='! ', wc_rev='3'),
+ 'Q/baz' : Item(status='! ', wc_rev='3'),
+ })
+
svntest.actions.run_and_verify_merge(F_path, '1', '2', F_url, None,
expected_output,
expected_mergeinfo_output,
@@ -1752,7 +1775,8 @@ def merge_into_missing(sbox):
expected_status,
expected_skip,
None, None, None, None, None,
- 0, 0)
+ 0, 0,
+ '--ignore-ancestry', F_path)
# This merge fails when it attempts to descend into the missing
# directory. That's OK, there is no real need to support merge into
@@ -1767,13 +1791,21 @@ def merge_into_missing(sbox):
# Check working copy is not locked.
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'A/B/F' : Item(status=' M', wc_rev=1),
- 'A/B/F/foo' : Item(status='!M', wc_rev=2),
+ 'A/B/F' : Item(status=' ', wc_rev=1),
+ 'A/B/F/foo' : Item(status='! ', wc_rev=2),
'A/B/F/Q' : Item(status='! ', wc_rev='?'),
-# In some intermediate WC-NG state (since r937468) this was:
-# 'A/B/F/Q' : Item(status='! ', wc_rev='2', entry_rev='?'),
-# but the expected value is now back what it was.
})
+ if single_db:
+ # Revision known and mergeinfo recorded
+ expected_status.tweak('A/B/F/Q', wc_rev='2')
+ # Missing data still available
+ expected_status.add({
+ 'A/B/F/Q' : Item(status='! ', wc_rev='2'),
+ 'A/B/F/Q/baz' : Item(status='! ', wc_rev='3'),
+ 'A/B/F/Q/R' : Item(status='! ', wc_rev='3'),
+ 'A/B/F/Q/R/bar' : Item(status='! ', wc_rev='3'),
+ })
+
svntest.actions.run_and_verify_status(wc_dir, expected_status)
#----------------------------------------------------------------------
@@ -2427,11 +2459,11 @@ def merge_dir_replace(sbox):
expected_status = wc.State(C_path, {
'' : Item(status=' M', wc_rev=3),
'foo' : Item(status='R ', wc_rev='-', copied='+'),
- 'foo/new file 2' : Item(status='D ', wc_rev='-', copied='+'),
- 'foo/file foo' : Item(status='A ', wc_rev='-', copied='+'),
- 'foo/bar' : Item(status='A ', wc_rev='-', copied='+'),
- 'foo/bar/new file 3' : Item(status='A ', wc_rev='-', copied='+'),
- 'foo/new file' : Item(status='D ', wc_rev='-', copied='+'),
+ 'foo/new file 2' : Item(status='D ', wc_rev='3'),
+ 'foo/file foo' : Item(status=' ', wc_rev='-', copied='+'),
+ 'foo/bar' : Item(status=' ', wc_rev='-', copied='+'),
+ 'foo/bar/new file 3' : Item(status=' ', wc_rev='-', copied='+'),
+ 'foo/new file' : Item(status='D ', wc_rev='3'),
})
expected_skip = wc.State(C_path, { })
svntest.actions.run_and_verify_merge(C_path, '2', '5', F_url, None,
@@ -2450,9 +2482,6 @@ def merge_dir_replace(sbox):
expected_output = svntest.wc.State(wc_dir, {
'A/C' : Item(verb='Sending'),
'A/C/foo' : Item(verb='Replacing'),
- 'A/C/foo/file foo' : Item(verb='Adding'),
- 'A/C/foo/bar' : Item(verb='Adding'),
- 'A/C/foo/bar/new file 3' : Item(verb='Adding'),
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
@@ -3019,7 +3048,7 @@ def property_merge_undo_redo(sbox):
None, None, # no B singleton handler
1, # check props
0, # dry_run
- '--ignore-ancestry')
+ '--ignore-ancestry', wc_dir)
@@ -3403,7 +3432,7 @@ def merge_ignore_whitespace(sbox):
expected_skip,
None, None, None, None, None,
0, 0,
- '-x', '-w')
+ '-x', '-w', wc_dir)
#----------------------------------------------------------------------
# use -x --ignore-eol-style option for ignoring eolstyle during merge
@@ -3485,7 +3514,7 @@ def merge_ignore_eolstyle(sbox):
expected_skip,
None, None, None, None, None,
0, 0,
- '-x', '--ignore-eol-style')
+ '-x', '--ignore-eol-style', wc_dir)
#----------------------------------------------------------------------
# eol-style handling during merge with conflicts, scenario 1:
@@ -4782,6 +4811,11 @@ def mergeinfo_inheritance(sbox):
wc_status,
None,
wc_dir)
+
+ # In single-db mode you can't create a disconnected working copy by just
+ # copying a subdir
+ if svntest.main.wc_is_singledb(wc_dir):
+ return
# Copy the subtree A_COPY/B/E from the working copy, making the
# disconnected WC E_only.
@@ -5024,7 +5058,8 @@ def mergeinfo_elision(sbox):
expected_status,
expected_skip,
None, None, None, None,
- None, 1, 1, '--record-only')
+ None, 1, 1, '--record-only',
+ A_COPY_path)
# Reverse merge r5 out of A_COPY/B/E/beta. The mergeinfo on
# A_COPY/B/E/beta which previously elided will now return,
@@ -6784,6 +6819,8 @@ def merge_loses_mergeinfo(sbox):
'' : Item(status=' U'),
})
expected_disk = wc.State('', {'J': Item()})
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_disk.remove('J')
expected_status = wc.State(A_C_wc_dir,
{ '' : Item(wc_rev=4, status=' M'),
'J' : Item(wc_rev=4, status='D ')
@@ -6805,6 +6842,8 @@ def merge_loses_mergeinfo(sbox):
'J' : Item(),
'' : Item(props={SVN_PROP_MERGEINFO : '/A/B:3'}),
})
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_disk.remove('J')
expected_status = wc.State(A_C_wc_dir,
{ '' : Item(wc_rev=4, status=' M'),
'K' : Item(status='A ',
@@ -7094,7 +7133,7 @@ def merge_with_depth_files(sbox):
expected_disk,
expected_status, expected_skip,
None, None, None, None, None, 1, 1,
- '--depth', 'files')
+ '--depth', 'files', Acopy_path)
#----------------------------------------------------------------------
# Test for issue #2976 Subtrees can lose non-inheritable ranges.
@@ -7189,7 +7228,7 @@ def merge_away_subtrees_noninheritable_r
expected_disk,
expected_status, expected_skip,
None, None, None, None, None, 1, 1,
- '--depth', 'immediates')
+ '--depth', 'immediates', D_COPY_path)
# Repeat the previous merge but at default depth of infinity. The change
# to A_COPY/D/H/omega should now happen and the non-inheritable ranges on
@@ -7459,7 +7498,7 @@ def merge_away_subtrees_noninheritable_r
expected_disk,
expected_status, expected_skip,
None, None, None, None, None, 1, 1,
- '--depth', 'empty')
+ '--depth', 'empty', H_COPY_2_path)
svntest.actions.run_and_verify_svn(None, None, [], 'commit', '-m',
'log msg', wc_dir);
svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
@@ -8689,7 +8728,8 @@ def propchange_of_subdir_raises_conflict
expected_status,
expected_skip,
None, None, None, None, None,
- 1, 1, '--depth', 'files')
+ 1, 1, '--depth', 'files',
+ A_COPY_B_path)
# Merge /A/B to /A_COPY/B ie., r1 to r3 with infinite depth
expected_output = wc.State(A_COPY_B_path, {
@@ -8912,7 +8952,8 @@ def merge_target_with_non_inheritable_me
expected_status,
expected_skip,
None, None, None, None, None,
- 1, 1, '--depth', 'immediates')
+ 1, 1, '--depth', 'immediates',
+ A_COPY_B_path)
# Merge /A/B to /A_COPY/B ie., r1 to r3 with infinite depth
expected_output = wc.State(A_COPY_B_path, {
@@ -9133,7 +9174,7 @@ def ignore_ancestry_and_mergeinfo(sbox):
expected_status,
expected_skip,
None, None, None, None, None, 1, 1,
- '--ignore-ancestry')
+ '--ignore-ancestry', A_COPY_B_path)
#----------------------------------------------------------------------
def merge_from_renamed_branch_fails_while_avoiding_repeat_merge(sbox):
@@ -13585,7 +13626,7 @@ def subtree_gets_changes_even_if_ultimat
expected_disk,
expected_status, expected_skip,
None, None, None, None, None, 1, 0,
- '-c3,7')
+ '-c3,7', H_COPY_path)
svntest.actions.run_and_verify_svn(
None,
expected_merge_output([[-7]],
@@ -13771,6 +13812,8 @@ def no_self_referential_filtering_on_add
'D/H/psi' : Item("New content"),
'D/H/omega' : Item("New content"),
})
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_A_COPY_2_disk.remove('C')
expected_A_COPY_2_skip = wc.State(A_COPY_2_path, { })
svntest.actions.run_and_verify_merge(A_COPY_2_path, None, None,
sbox.repo_url + '/A', None,
@@ -14727,7 +14770,7 @@ def record_only_merge(sbox):
expected_status,
expected_skip,
None, None, None, None, None, 1, 0,
- '--record-only')
+ '--record-only', A2_path)
#----------------------------------------------------------------------
# Test for issue #3514 'svn merge --accept [ base | theirs-full ]
@@ -14823,7 +14866,8 @@ def merge_automatic_conflict_resolution(
svntest.tree.detect_conflict_files,
list(psi_conflict_support_files),
None, None, 1, 1,
- '--accept', 'postpone')
+ '--accept', 'postpone',
+ A_COPY_path)
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
@@ -14841,7 +14885,8 @@ def merge_automatic_conflict_resolution(
expected_skip,
None, None, None,
None, None, 1, 0,
- '--accept', 'mine-conflict')
+ '--accept', 'mine-conflict',
+ A_COPY_path)
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
@@ -14854,7 +14899,8 @@ def merge_automatic_conflict_resolution(
expected_skip,
None, None, None,
None, None, 1, 0,
- '--accept', 'mine-full')
+ '--accept', 'mine-full',
+ A_COPY_path)
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
@@ -14872,35 +14918,10 @@ def merge_automatic_conflict_resolution(
expected_skip,
None, None, None,
None, None, 1, 0,
- '--accept', 'theirs-conflict')
+ '--accept', 'theirs-conflict',
+ A_COPY_path)
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
- # Issue #3514 fails here with an error similar to:
- #
- # ..\..\..\subversion\svn\util.c:900: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:9408: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:8054: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:7733: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:4870: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1266: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1197: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:854: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:854: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\repos_diff.c:861: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:1511: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:1309: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:1252: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:914: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:794: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:460: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\log.c:921: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\log.c:878: (apr_err=125007)
- #svn: Path 'C:\DOCUME~1\pburba\LOCALS~1\Temp\tempfile.149.tmp' is not a
- # child of 'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\
- # working_copies\merge_tests-137\A_COPY\D\H'
svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
sbox.repo_url + '/A', None,
expected_output,
@@ -14911,20 +14932,16 @@ def merge_automatic_conflict_resolution(
expected_skip,
None, None, None,
None, None, 1, 0,
- '--accept', 'theirs-full')
+ '--accept', 'theirs-full',
+ A_COPY_path)
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
# Test --accept base
- #
- # Make a working change to A_COPY/D/H/psi.
- svntest.main.file_write(psi_COPY_path, "WORKING.\n")
expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
expected_elision_output = wc.State(A_COPY_path, {
})
- expected_disk.tweak('D/H/psi', contents="BASE")
+ expected_disk.tweak('D/H/psi', contents="This is the file 'psi'.\n")
expected_status.tweak('D/H/psi', status='M ')
- # Issue #3514 fails here with an error similar to the one above for
- # --accept theirs-full.
svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
sbox.repo_url + '/A', None,
expected_output,
@@ -14935,7 +14952,8 @@ def merge_automatic_conflict_resolution(
expected_skip,
None, None, None,
None, None, 1, 0,
- '--accept', 'base')
+ '--accept', 'base',
+ A_COPY_path)
#----------------------------------------------------------------------
# Test for issue #3440 'Skipped paths get incorrect override mergeinfo
@@ -14948,6 +14966,7 @@ def skipped_files_get_correct_mergeinfo(
# Some paths we'll care about
A_COPY_path = os.path.join(wc_dir, "A_COPY")
+ H_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "H")
psi_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "H", "psi")
psi_path = os.path.join(wc_dir, "A", "D", "H", "psi")
@@ -14975,15 +14994,21 @@ def skipped_files_get_correct_mergeinfo(
[], 'merge', '-c3', sbox.repo_url + '/A', A_COPY_path)
svntest.main.run_svn(None, 'commit', '-m', 'initial merge', wc_dir)
- # Update WC to uniform revision and then delete, via the OS, A_COPY/D/H/psi
- # and then merge all available revisions from A to A_COPY. A_COPY/D/H/psi
- # should be reported as skipped and get explicit mergeinfo set on it
- # reflecting what it previously inherited from A_COPY after the first
- # merge, i.e. '/A/D/H/psi:3'. Issue #3440 occurred when empty mergeinfo
- # was set on A_COPY/D/H/psi, making it appear that r3 was never merged.
+ # Update WC to uniform revision and then set the depth on A_COPY/D/H to
+ # empty. Then merge all available revisions from A to A_COPY.
+ # A_COPY/D/H/psi and A_COPY/D/H/omega are not present due to their
+ # parent's depth and should be reported as skipped. A_COPY/D/H should
+ # get explicit mergeinfo set on it reflecting what it previously inherited
+ # from A_COPY after the first merge, i.e. '/A/D/H:3', plus non-inheritable
+ # mergeinfo describing what was done during this merge,
+ # i.e. '/A/D/H:2*,4-8*'.
+ #
+ # Issue #3440 occurred when empty mergeinfo was set on A_COPY/D/H, making
+ # it appear that r3 was never merged.
svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
'up', wc_dir)
- os.remove(psi_COPY_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'up', '--set-depth=empty', H_COPY_path)
expected_status = wc.State(A_COPY_path, {
'' : Item(status=' M'),
'B' : Item(status=' '),
@@ -15000,10 +15025,7 @@ def skipped_files_get_correct_mergeinfo(
'D/G/rho' : Item(status='M '),
'D/G/tau' : Item(status=' '),
'D/gamma' : Item(status=' '),
- 'D/H' : Item(status=' '),
- 'D/H/chi' : Item(status=' '),
- 'D/H/psi' : Item(status='!M'),
- 'D/H/omega' : Item(status='M '),
+ 'D/H' : Item(status=' M'),
})
expected_status.tweak(wc_rev=8)
expected_disk = wc.State('', {
@@ -15022,71 +15044,18 @@ def skipped_files_get_correct_mergeinfo(
'D/G/rho' : Item("New content"),
'D/G/tau' : Item("This is the file 'tau'.\n"),
'D/gamma' : Item("This is the file 'gamma'.\n"),
- 'D/H' : Item(),
- 'D/H/chi' : Item("This is the file 'chi'.\n"),
- #'D/H/psi' : Nothing here, this file was deleted via the OS.
- 'D/H/omega' : Item("New content"),
+ 'D/H' : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:2*,3,4-8*'}),
})
expected_skip = wc.State(A_COPY_path,
- {'D/H/psi' : Item()})
+ {'D/H/psi' : Item(),
+ 'D/H/omega' : Item()})
expected_output = wc.State(A_COPY_path,
{'B/E/beta' : Item(status='U '),
- 'D/G/rho' : Item(status='U '),
- 'D/H/omega' : Item(status='U '),})
- expected_mergeinfo_output = wc.State(A_COPY_path, {
- '' : Item(status=' U'),
- 'D/H/psi' : Item(status=' U'),
- })
- expected_elision_output = wc.State(A_COPY_path, {
- })
- svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
- sbox.repo_url + '/A', None,
- expected_output,
- expected_mergeinfo_output,
- expected_elision_output,
- expected_disk,
- expected_status,
- expected_skip,
- None, None, None, None, None,
- 1, 1)
- # run_and_verify_merge cannot check the properties on A_COPY/D/H/psi
- # since that file is not on disk, so we'll check the file's mergeinfo
- # directly with svn propget.
- svntest.actions.run_and_verify_svn(
- 'Incorrect override mergeinfo set on skipped path',
- ["/A/D/H/psi:3\n"], [], 'pg', 'svn:mergeinfo', psi_COPY_path)
-
- # Now test another aspect of issue #3440, that a skipped path with
- # explicit mergeinfo doesn't get it's mergeinfo updated.
- #
- # First revert all changes to the WC and then merge -r2:6 from A/D/H/psi
- # to A_COPY/D/H/psi, creating explicit mergeinfo of '/A/D/H/psi:3-6' on
- # the latter. Commit this merge as r9 and then update the WC.
- svntest.actions.run_and_verify_svn(None, None, [],
- 'revert', '-R', wc_dir)
- svntest.actions.run_and_verify_svn(
- None,
- expected_merge_output([[3,6]],
- [' U ' + psi_COPY_path + '\n',
- ' G ' + psi_COPY_path + '\n']),
- [], 'merge', '-r2:6', sbox.repo_url + '/A/D/H/psi', psi_COPY_path)
- svntest.main.run_svn(None, 'commit', '-m',
- 'subtree merge to create explicit mergeinfo',
- wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
- 'up', wc_dir)
-
- # Remove A_COPY/D/H/psi again and then merge all available revisions
- # from A to A_COPY. The results should be mostly similar to the
- # previous merge we did above, execept that A_COPY/D/H/psi should not
- # have it's mergeinfo changed.
- os.remove(psi_COPY_path)
- expected_status.tweak(wc_rev=9)
- expected_status.tweak('D/H/psi', status='! ')
- expected_disk.tweak('', props={SVN_PROP_MERGEINFO : '/A:2-9'})
+ 'D/G/rho' : Item(status='U ')})
expected_mergeinfo_output = wc.State(A_COPY_path, {
- '' : Item(status=' U'),
- 'D/H/psi' : Item(status=' U'),
+ '' : Item(status=' U'),
+ 'D/H' : Item(status=' G'), # ' G' because override mergeinfo gets set
+ # on this, the root of a 'missing' subtree.
})
expected_elision_output = wc.State(A_COPY_path, {
})
@@ -15101,16 +15070,6 @@ def skipped_files_get_correct_mergeinfo(
None, None, None, None, None,
1, 1)
- # run_and_verify_merge cannot check the properties on A_COPY/D/H/psi
- # since that file is not on disk, so we'll check the file's mergeinfo
- # directly with svn propget. Issue #3440 also occurred here, when an
- # the missing file's mergeinfo was updated, making it appear that r2
- # and r7-9 were also merged into A_COPY/D/H/psi, which is clearly not
- # the case since psi isn't present.
- svntest.actions.run_and_verify_svn(
- 'Mergeinfo on skipped path altered',
- ["/A/D/H/psi:3-6\n"], [], 'pg', 'svn:mergeinfo', psi_COPY_path)
-
#----------------------------------------------------------------------
# Test for issue #3115 'Case only renames resulting from merges don't
# work or break the WC on case-insensitive file systems'.
@@ -15243,6 +15202,8 @@ def committed_case_only_move_and_revert(
})
expected_disk.tweak('', props={SVN_PROP_MERGEINFO : '/A:3,5'})
expected_disk.add({'c' : Item()})
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_disk.remove('C')
expected_status.tweak('MU', status=' ', wc_rev=4, copied=None)
expected_status.remove('mu')
expected_status.tweak('C', status='D ')
@@ -15463,7 +15424,7 @@ def foreign_repos_del_and_props(sbox):
# Test for issue #3642 'immediate depth merges don't create proper subtree
# mergeinfo'. See http://subversion.tigris.org/issues/show_bug.cgi?id=3642
def immediate_depth_merge_creates_minimal_subtree_mergeinfo(sbox):
- "no spurious mergeinfo from immediate depth merges "
+ "no spurious mergeinfo from immediate depth merges"
sbox.build()
wc_dir = sbox.wc_dir
@@ -15521,7 +15482,8 @@ def immediate_depth_merge_creates_minima
expected_status,
expected_skip,
None, None, None, None, None,
- 1, 1, '--depth', 'immediates')
+ 1, 1, '--depth', 'immediates',
+ B_COPY_path)
#----------------------------------------------------------------------
# Test for issue #3646 'cyclic --record-only merges create self-referential
@@ -15615,7 +15577,320 @@ def record_only_merge_creates_self_refer
expected_A_status,
expected_A_skip,
None, None, None, None, None, 1, 1,
- '--record-only')
+ '--record-only', A_path)
+
+#----------------------------------------------------------------------
+# Test for issue #3657 'phantom svn:eol-style changes cause spurious merge
+# text conflicts'.
+def copy_causes_phantom_eol_conflict(sbox):
+ "other prop changes cause phantom eol conflict"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Some paths we'll care about
+ mu_path = os.path.join(wc_dir, "A", "mu")
+ A_path = os.path.join(wc_dir, "A")
+ A_branch_path = os.path.join(wc_dir, "A-branch")
+ A_branch_backport_path = os.path.join(wc_dir, "A-branch-backport")
+ mu_path = os.path.join(wc_dir, "A", "mu")
+ mu2_path = os.path.join(wc_dir, "A", "mu2")
+ mu_backport_path = os.path.join(wc_dir, "A-branch-backport", "mu")
+
+ # r2 - Set the 'native' svn:eol-style on A/mu:
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'svn:eol-style', 'native',
+ mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'Set native eol-style',
+ wc_dir)
+
+ # r3 - Branch 'A' to 'A-branch':
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'copy', A_path, A_branch_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'Create a branch of A',
+ wc_dir)
+
+ # r4 - Make a text mod and prop mod to 'A/mu':
+ svntest.main.file_write(mu_path, "The new mu!\n")
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'prop-name', 'prop-val', mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'Edit a file', wc_dir)
+
+ # Now merge r4 from 'A' to 'A-branch'.
+ #
+ # Previously this failed over ra_neon and ra_serf on Windows:
+ #
+ # >svn merge ^^/A A-branch -c4
+ # Conflict discovered in 'A-branch/mu'.
+ # Select: (p) postpone, (df) diff-full, (e) edit,
+ # (mc) mine-conflict, (tc) theirs-conflict,
+ # (s) show all options: p
+ # --- Merging r4 into 'A-branch':
+ # CU A-branch\mu
+ # --- Recording mergeinfo for merge of r4 into 'A-branch':
+ # U A-branch
+ # Summary of conflicts:
+ # Text conflicts: 1
+ #
+ # The conflict was on the whole file as it appeared there was an eol-style
+ # change to native, when in fact no such change was present in r7.
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ expected_output = wc.State(A_branch_path, {
+ 'mu' : Item(status='UU'),
+ })
+ expected_mergeinfo_output = wc.State(A_branch_path, {
+ '' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(A_branch_path, {})
+ expected_status = wc.State(A_branch_path, {
+ '' : Item(status=' M'),
+ 'B' : Item(status=' '),
+ 'mu' : Item(status='MM'),
+ 'B/E' : Item(status=' '),
+ 'B/E/alpha' : Item(status=' '),
+ 'B/E/beta' : Item(status=' '),
+ 'B/lambda' : Item(status=' '),
+ 'B/F' : Item(status=' '),
+ 'C' : Item(status=' '),
+ 'D' : Item(status=' '),
+ 'D/G' : Item(status=' '),
+ 'D/G/pi' : Item(status=' '),
+ 'D/G/rho' : Item(status=' '),
+ 'D/G/tau' : Item(status=' '),
+ 'D/gamma' : Item(status=' '),
+ 'D/H' : Item(status=' '),
+ 'D/H/chi' : Item(status=' '),
+ 'D/H/psi' : Item(status=' '),
+ 'D/H/omega' : Item(status=' '),
+ })
+ expected_status.tweak(wc_rev=4)
+ expected_disk = wc.State('', {
+ '' : Item(props={SVN_PROP_MERGEINFO :
+ '/A:4'}),
+ 'B' : Item(),
+ 'mu' : Item("The new mu!\n",
+ props={'prop-name' : 'prop-val',
+ 'svn:eol-style' : 'native'}),
+ 'B/E' : Item(),
+ 'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+ 'B/E/beta' : Item("This is the file 'beta'.\n"),
+ 'B/lambda' : Item("This is the file 'lambda'.\n"),
+ 'B/F' : Item(),
+ 'C' : Item(),
+ 'D' : Item(),
+ 'D/G' : Item(),
+ 'D/G/pi' : Item("This is the file 'pi'.\n"),
+ 'D/G/rho' : Item("This is the file 'rho'.\n"),
+ 'D/G/tau' : Item("This is the file 'tau'.\n"),
+ 'D/gamma' : Item("This is the file 'gamma'.\n"),
+ 'D/H' : Item(),
+ 'D/H/chi' : Item("This is the file 'chi'.\n"),
+ 'D/H/psi' : Item("This is the file 'psi'.\n"),
+ 'D/H/omega' : Item("This is the file 'omega'.\n"),
+ })
+ expected_skip = wc.State(A_branch_path, {})
+ svntest.actions.run_and_verify_merge(A_branch_path, 3, 4,
+ sbox.repo_url + '/A',
+ None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, None, None, None, None, 1, 1)
+
+
+#----------------------------------------------------------------------
+def merge_into_locally_added_file(sbox):
+ "merge into locally added file"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Some paths we'll care about
+ pi_path = sbox.ospath("A/D/G/pi")
+ new_path = sbox.ospath("A/D/G/new")
+
+ shutil.copy(pi_path, new_path)
+ svntest.main.file_append(pi_path, "foo\n")
+ sbox.simple_commit(); # r2
+
+ sbox.simple_add(new_path)
+
+ expected_output = wc.State(wc_dir, {
+ 'A/D/G/new' : Item(status='G '),
+ })
+ expected_mergeinfo_output = wc.State(wc_dir, {
+ 'A/D/G/new' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(wc_dir, {})
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.add({ 'A/D/G/new' : Item(status='A ', wc_rev=0)})
+ expected_status.tweak('A/D/G/pi', wc_rev=2)
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.tweak('A/D/G/pi', contents="This is the file 'pi'.\nfoo\n")
+ expected_disk.add({'A/D/G/new' : Item("This is the file 'pi'.\nfoo\n",
+ props={SVN_PROP_MERGEINFO : '/A/D/G/pi:2'})})
+ expected_skip = wc.State(wc_dir, {})
+
+ svntest.actions.run_and_verify_merge(wc_dir, '1', '2',
+ sbox.repo_url + '/A/D/G/pi', None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, None, None, None, None,
+ True, True, new_path)
+ sbox.simple_commit()
+
+#----------------------------------------------------------------------
+def merge_into_locally_added_directory(sbox):
+ "merge into locally added directory"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Some paths we'll care about
+ G_path = sbox.ospath("A/D/G")
+ pi_path = sbox.ospath("A/D/G/pi")
+ new_dir_path = sbox.ospath("A/D/new_dir")
+
+ svntest.main.file_append_binary(pi_path, "foo\n")
+ sbox.simple_commit(); # r2
+
+ os.mkdir(new_dir_path)
+ svntest.main.file_append_binary(os.path.join(new_dir_path, 'pi'),
+ "This is the file 'pi'.\n")
+ svntest.main.file_append_binary(os.path.join(new_dir_path, 'rho'),
+ "This is the file 'rho'.\n")
+ svntest.main.file_append_binary(os.path.join(new_dir_path, 'tau'),
+ "This is the file 'tau'.\n")
+ sbox.simple_add(new_dir_path)
+
+ expected_output = wc.State(wc_dir, {
+ 'A/D/new_dir/pi' : Item(status='G '),
+ })
+ expected_mergeinfo_output = wc.State(wc_dir, {
+ 'A/D/new_dir' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(wc_dir, {})
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.add({ 'A/D/new_dir' : Item(status='A ', wc_rev=0)})
+ expected_status.add({ 'A/D/new_dir/pi' : Item(status='A ', wc_rev=0)})
+ expected_status.add({ 'A/D/new_dir/rho' : Item(status='A ', wc_rev=0)})
+ expected_status.add({ 'A/D/new_dir/tau' : Item(status='A ', wc_rev=0)})
+ expected_status.tweak('A/D/G/pi', wc_rev=2)
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.tweak('A/D/G/pi', contents="This is the file 'pi'.\nfoo\n")
+ expected_disk.add({'A/D/new_dir' :
+ Item(props={SVN_PROP_MERGEINFO : '/A/D/G:2'})})
+ expected_disk.add({'A/D/new_dir/pi' :
+ Item(contents="This is the file 'pi'.\nfoo\n")})
+ expected_disk.add({'A/D/new_dir/rho' :
+ Item(contents="This is the file 'rho'.\n")})
+ expected_disk.add({'A/D/new_dir/tau' :
+ Item(contents="This is the file 'tau'.\n")})
+ expected_skip = wc.State(wc_dir, {})
+
+ svntest.actions.run_and_verify_merge(wc_dir, '1', '2',
+ sbox.repo_url + '/A/D/G', None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, None, None, None, None,
+ True, True, new_dir_path)
+ sbox.simple_commit()
+
+#----------------------------------------------------------------------
+# Test for issue #2915 'Handle mergeinfo for subtrees missing due to removal
+# by non-svn command'
+def merge_with_os_deleted_subtrees(sbox):
+ "merge tracking fails if target missing subtrees"
+
+ # r1: Create a greek tree.
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # r2 - r6: Copy A to A_COPY and then make some text changes under A.
+ set_up_branch(sbox)
+
+ # Some paths we'll care about
+ A_COPY_path = os.path.join(wc_dir, "A_COPY")
+ C_COPY_path = os.path.join(wc_dir, "A_COPY", "C")
+ psi_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "H", "psi")
+ mu_COPY_path = os.path.join(wc_dir, "A_COPY", "mu")
+ G_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "G")
+
+ # Remove several subtrees from disk.
+ svntest.main.safe_rmtree(C_COPY_path)
+ svntest.main.safe_rmtree(G_COPY_path)
+ os.remove(psi_COPY_path)
+ os.remove(mu_COPY_path)
+
+ # Be sure the regex paths are properly escaped on Windows, see the
+ # note about "The Backslash Plague" in expected_merge_output().
+ if sys.platform == 'win32':
+ re_sep = '\\\\'
+ else:
+ re_sep = os.sep
+
+ # Common part of the expected error message for all cases we will test.
+ err_re = "svn: Merge tracking not allowed with missing subtrees; " + \
+ "try restoring these items first:" + \
+ "|(\n)" + \
+ "|(.*apr_err.*\n)" # In case of debug build
+
+ # Case 1: Infinite depth merge into infinite depth WC target.
+ # Every missing subtree under the target should be reported as missing.
+ missing = "|(.*A_COPY" + re_sep + "mu\n)" + \
+ "|(.*A_COPY" + re_sep + "D" + re_sep + "G\n)" + \
+ "|(.*A_COPY" + re_sep + "C\n)" + \
+ "|(.*A_COPY" + re_sep + "D" + re_sep + "H" + re_sep + "psi\n)"
+ exit_code, out, err = svntest.actions.run_and_verify_svn(
+ "Missing subtrees should raise error", [], svntest.verify.AnyOutput,
+ 'merge', sbox.repo_url + '/A', A_COPY_path)
+ svntest.verify.verify_outputs("Merge failed but not in the way expected",
+ err, None, err_re + missing, None,
+ True) # Match *all* lines of stderr
+
+ # Case 2: Immediates depth merge into infinite depth WC target.
+ # Only the two immediate children of the merge target should be reported
+ # as missing.
+ missing = "|(.*A_COPY" + re_sep + "mu\n)" + \
+ "|(.*A_COPY" + re_sep + "C\n)"
+ exit_code, out, err = svntest.actions.run_and_verify_svn(
+ "Missing subtrees should raise error", [], svntest.verify.AnyOutput,
+ 'merge', sbox.repo_url + '/A', A_COPY_path, '--depth=immediates')
+ svntest.verify.verify_outputs("Merge failed but not in the way expected",
+ err, None, err_re + missing, None, True)
+
+ # Case 3: Files depth merge into infinite depth WC target.
+ # Only the single file child of the merge target should be reported
+ # as missing.
+ missing = "|(.*A_COPY" + re_sep + "mu\n)"
+ exit_code, out, err = svntest.actions.run_and_verify_svn(
+ "Missing subtrees should raise error", [], svntest.verify.AnyOutput,
+ 'merge', sbox.repo_url + '/A', A_COPY_path, '--depth=files')
+ svntest.verify.verify_outputs("Merge failed but not in the way expected",
+ err, None, err_re + missing, None, True)
+
+ # Case 4: Empty depth merge into infinite depth WC target.
+ # Only the...oh, wait, the target is present and that is as deep
+ # as the merge goes, so this merge should succeed!
+ svntest.actions.run_and_verify_svn(
+ "Depth empty merge should succeed as long at the target is present",
+ svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A',
+ A_COPY_path, '--depth=empty')
########################################################################
# Run the tests
@@ -15667,8 +15942,8 @@ test_list = [ None,
SkipUnless(cherry_pick_text_conflict,
server_has_mergeinfo),
merge_file_replace,
- XFail(SkipUnless(merge_dir_replace,
- server_has_mergeinfo)),
+ SkipUnless(merge_dir_replace,
+ server_has_mergeinfo),
merge_dir_and_file_replace,
merge_file_replace_to_mixed_rev_wc,
SkipUnless(merge_ignore_whitespace,
@@ -15795,14 +16070,17 @@ test_list = [ None,
copy_then_replace_via_merge,
SkipUnless(record_only_merge,
server_has_mergeinfo),
- XFail(merge_automatic_conflict_resolution),
+ merge_automatic_conflict_resolution,
skipped_files_get_correct_mergeinfo,
- XFail(committed_case_only_move_and_revert,
- is_fs_case_insensitive),
+ committed_case_only_move_and_revert,
merge_into_wc_for_deleted_branch,
foreign_repos_del_and_props,
immediate_depth_merge_creates_minimal_subtree_mergeinfo,
record_only_merge_creates_self_referential_mergeinfo,
+ copy_causes_phantom_eol_conflict,
+ merge_into_locally_added_file,
+ merge_into_locally_added_directory,
+ merge_with_os_deleted_subtrees,
]
if __name__ == '__main__':
Modified: subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/py-tests-as-modules/subversion/tests/cmdline/merge_tree_conflict_tests.py Wed Sep 15 19:32:26 2010
@@ -623,6 +623,9 @@ def mergeinfo_recording_in_skipped_merge
'D/H/omega': Item("This is the file 'omega'.\n"),
'D/H/psi' : Item("This is the file 'psi'.\n"),
})
+ if svntest.main.wc_is_singledb(sbox.wc_dir):
+ # Delete removes directories in single-db
+ expected_disk.remove('B/E')
expected_skip = wc.State(A_COPY_path, {})
svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
A_url, None,
@@ -796,9 +799,11 @@ leaf_edit = svntest.actions.deep_trees_l
tree_del = svntest.actions.deep_trees_tree_del
leaf_del = svntest.actions.deep_trees_leaf_del
-state_after_leaf_edit = svntest.actions.deep_trees_after_leaf_edit
-state_after_leaf_del = svntest.actions.deep_trees_after_leaf_del
-state_after_tree_del = svntest.actions.deep_trees_after_tree_del
+disk_after_leaf_edit = svntest.actions.deep_trees_after_leaf_edit
+disk_after_leaf_del = svntest.actions.deep_trees_after_leaf_del
+disk_after_tree_del = svntest.actions.deep_trees_after_tree_del
+disk_after_leaf_del_no_ci = svntest.actions.deep_trees_after_leaf_del_no_ci
+disk_after_tree_del_no_ci = svntest.actions.deep_trees_after_tree_del_no_ci
deep_trees_conflict_output = svntest.actions.deep_trees_conflict_output
@@ -821,7 +826,7 @@ def tree_conflicts_on_merge_local_ci_4_1
expected_output = deep_trees_conflict_output
- expected_disk = state_after_tree_del
+ expected_disk = disk_after_tree_del
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -858,7 +863,7 @@ def tree_conflicts_on_merge_local_ci_4_2
expected_output = deep_trees_conflict_output
- expected_disk = state_after_tree_del
+ expected_disk = disk_after_tree_del
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -897,7 +902,7 @@ def tree_conflicts_on_merge_local_ci_5_1
expected_output = deep_trees_conflict_output
- expected_disk = state_after_leaf_edit
+ expected_disk = disk_after_leaf_edit
# We should detect 6 tree conflicts, and nothing should be deleted (when
# we skip tree conflict victims).
@@ -947,14 +952,7 @@ def tree_conflicts_on_merge_local_ci_5_2
expected_output = deep_trees_conflict_output
- expected_disk = svntest.wc.State('', {
- 'F' : Item(),
- 'D' : Item(),
- 'DF/D1' : Item(),
- 'DD/D1' : Item(),
- 'DDF/D1/D2' : Item(),
- 'DDD/D1/D2' : Item(),
- })
+ expected_disk = disk_after_leaf_del
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -995,7 +993,7 @@ def tree_conflicts_on_merge_local_ci_6(s
expected_output = deep_trees_conflict_output
- expected_disk = state_after_tree_del
+ expected_disk = disk_after_tree_del
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -1029,19 +1027,14 @@ def tree_conflicts_on_merge_local_ci_6(s
def tree_conflicts_on_merge_no_local_ci_4_1(sbox):
"tree conflicts 4.1: tree del (no ci), leaf edit"
+ sbox.build()
+
# use case 4, as in notes/tree-conflicts/use-cases.txt
# 4.1) local tree delete, incoming leaf edit
expected_output = deep_trees_conflict_output
- expected_disk = svntest.wc.State('', {
- 'F' : Item(),
- 'D/D1' : Item(),
- 'DF/D1' : Item(),
- 'DD/D1/D2' : Item(),
- 'DDF/D1/D2' : Item(),
- 'DDD/D1/D2/D3' : Item(),
- })
+ expected_disk = disk_after_tree_del_no_ci(sbox.wc_dir)
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -1083,18 +1076,13 @@ def tree_conflicts_on_merge_no_local_ci_
def tree_conflicts_on_merge_no_local_ci_4_2(sbox):
"tree conflicts 4.2: tree del (no ci), leaf del"
+ sbox.build()
+
# 4.2) local tree delete, incoming leaf delete
expected_output = deep_trees_conflict_output
- expected_disk = svntest.wc.State('', {
- 'F' : Item(),
- 'D/D1' : Item(),
- 'DF/D1' : Item(),
- 'DD/D1/D2' : Item(),
- 'DDF/D1/D2' : Item(),
- 'DDD/D1/D2/D3' : Item(),
- })
+ expected_disk = disk_after_tree_del_no_ci(sbox.wc_dir)
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -1142,7 +1130,7 @@ def tree_conflicts_on_merge_no_local_ci_
expected_output = deep_trees_conflict_output
- expected_disk = state_after_leaf_edit
+ expected_disk = disk_after_leaf_edit
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -1150,23 +1138,23 @@ def tree_conflicts_on_merge_no_local_ci_
'D/D1' : Item(status=' M', treeconflict='C', wc_rev='3'),
'D/D1/delta' : Item(status='A ', wc_rev='0'),
'DD' : Item(status=' ', wc_rev='3'),
- 'DD/D1' : Item(status=' M', treeconflict='C', wc_rev='3'),
- 'DD/D1/D2' : Item(status=' ', wc_rev='3'),
+ 'DD/D1' : Item(status=' ', treeconflict='C', wc_rev='3'),
+ 'DD/D1/D2' : Item(status=' M', wc_rev='3'),
'DD/D1/D2/epsilon' : Item(status='A ', wc_rev='0'),
'DDD' : Item(status=' ', wc_rev='3'),
- 'DDD/D1' : Item(status=' M', treeconflict='C', wc_rev='3'),
+ 'DDD/D1' : Item(status=' ', treeconflict='C', wc_rev='3'),
'DDD/D1/D2' : Item(status=' ', wc_rev='3'),
- 'DDD/D1/D2/D3' : Item(status=' ', wc_rev='3'),
+ 'DDD/D1/D2/D3' : Item(status=' M', wc_rev='3'),
'DDD/D1/D2/D3/zeta' : Item(status='A ', wc_rev='0'),
'DDF' : Item(status=' ', wc_rev='3'),
- 'DDF/D1' : Item(status=' M', treeconflict='C', wc_rev='3'),
+ 'DDF/D1' : Item(status=' ', treeconflict='C', wc_rev='3'),
'DDF/D1/D2' : Item(status=' ', wc_rev='3'),
- 'DDF/D1/D2/gamma' : Item(status='M ', wc_rev='3'),
+ 'DDF/D1/D2/gamma' : Item(status='MM', wc_rev='3'),
'DF' : Item(status=' ', wc_rev='3'),
- 'DF/D1' : Item(status=' M', treeconflict='C', wc_rev='3'),
- 'DF/D1/beta' : Item(status='M ', wc_rev='3'),
+ 'DF/D1' : Item(status=' ', treeconflict='C', wc_rev='3'),
+ 'DF/D1/beta' : Item(status='MM', wc_rev='3'),
'F' : Item(status=' ', wc_rev='3'),
- 'F/alpha' : Item(status='M ', treeconflict='C', wc_rev='3'),
+ 'F/alpha' : Item(status='MM', treeconflict='C', wc_rev='3'),
})
expected_skip = svntest.wc.State('', {
@@ -1191,14 +1179,7 @@ def tree_conflicts_on_merge_no_local_ci_
expected_output = deep_trees_conflict_output
- expected_disk = svntest.wc.State('', {
- 'F' : Item(),
- 'D/D1' : Item(),
- 'DF/D1' : Item(),
- 'DD/D1/D2' : Item(),
- 'DDF/D1/D2' : Item(),
- 'DDD/D1/D2/D3' : Item(),
- })
+ expected_disk = disk_after_leaf_del_no_ci(sbox.wc_dir)
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -1240,19 +1221,14 @@ def tree_conflicts_on_merge_no_local_ci_
def tree_conflicts_on_merge_no_local_ci_6(sbox):
"tree conflicts 6: tree del (no ci), tree del"
+ sbox.build()
+
# use case 6, as in notes/tree-conflicts/use-cases.txt
# local tree delete, incoming tree delete
expected_output = deep_trees_conflict_output
- expected_disk = svntest.wc.State('', {
- 'F' : Item(),
- 'D/D1' : Item(),
- 'DF/D1' : Item(),
- 'DD/D1/D2' : Item(),
- 'DDF/D1/D2' : Item(),
- 'DDD/D1/D2/D3' : Item(),
- })
+ expected_disk = disk_after_tree_del_no_ci(sbox.wc_dir)
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
@@ -1296,15 +1272,28 @@ def tree_conflicts_merge_edit_onto_missi
# local tree missing (via shell delete), incoming leaf edit
+ # Note: In 1.7 merge tracking aware merges raise an error if the
+ # merge target has subtrees missing due to a shell delete. To
+ # preserve the original intent of this test we'll run the merge
+ # with the --ignore-ancestry option, which neither considers nor
+ # records mergeinfo. With this option the merge should "succeed"
+ # while skipping the missing paths. Of course with no mergeinfo
+ # recorded and everything skipped, there is nothing to commit, so
+ # unlike most of the tree conflict tests we don't bother with the
+ # final commit step.
+
+ sbox.build()
expected_output = wc.State('', {
})
- expected_disk = state_after_tree_del
+ expected_disk = disk_after_tree_del
+ # Don't expect any mergeinfo property changes because we run
+ # the merge with the --ignore-ancestry option.
expected_status = svntest.wc.State('', {
- '' : Item(status=' M', wc_rev=3),
+ '' : Item(status=' ', wc_rev=3),
'F' : Item(status=' ', wc_rev=3),
- 'F/alpha' : Item(status='!M', wc_rev=3),
+ 'F/alpha' : Item(status='! ', wc_rev=3),
'D' : Item(status=' ', wc_rev=3),
'D/D1' : Item(status='! ', wc_rev='?'),
'DF' : Item(status=' ', wc_rev=3),
@@ -1323,6 +1312,19 @@ def tree_conflicts_merge_edit_onto_missi
'DDD/D1/D2/D3' : Item(status=' '),
})
+ if svntest.main.wc_is_singledb(sbox.wc_dir):
+ expected_status.tweak('D/D1', wc_rev=3, entry_rev='?')
+ expected_status.tweak('DF/D1', wc_rev=3, entry_rev='?')
+ expected_status.tweak('DF/D1/beta', wc_rev=3, status='! ')
+ expected_status.tweak('DD/D1', wc_rev=3, entry_rev='?')
+ expected_status.tweak('DD/D1/D2', wc_rev=3, status='! ')
+ expected_status.tweak('DDF/D1', wc_rev=3, entry_rev='?')
+ expected_status.tweak('DDF/D1/D2', wc_rev=3, status='! ')
+ expected_status.tweak('DDF/D1/D2/gamma', wc_rev=3, status='! ')
+ expected_status.tweak('DDD/D1', wc_rev=3, entry_rev='?')
+ expected_status.tweak('DDD/D1/D2', wc_rev=3, status='! ')
+ expected_status.tweak('DDD/D1/D2/D3', wc_rev=3, status='! ')
+
expected_skip = svntest.wc.State('', {
'F/alpha' : Item(),
})
@@ -1337,18 +1339,7 @@ def tree_conflicts_merge_edit_onto_missi
expected_disk,
expected_status,
expected_skip,
-
- ### This should not be happening!
- ### The commit succeeds (it only commits mergeinfo).
- ### But then the work queue freaks out while trying to install
- ### F/alpha into the WC, because F/alpha is missing from disk.
- ### We end up with a working copy that cannot be cleaned up.
- ### To make this test pass for now we'll expect this error.
- ### When the problem is fixed this test will start to fail
- ### and should be adjusted.
- commit_block_string=".*Error bumping revisions post-commit",
-
- ) ], False)
+ ) ], False, do_commit_conflicts=False, ignore_ancestry=True)
#----------------------------------------------------------------------
def tree_conflicts_merge_del_onto_missing(sbox):
@@ -1356,15 +1347,28 @@ def tree_conflicts_merge_del_onto_missin
# local tree missing (via shell delete), incoming leaf edit
+ # Note: In 1.7 merge tracking aware merges raise an error if the
+ # merge target has subtrees missing due to a shell delete. To
+ # preserve the original intent of this test we'll run the merge
+ # with the --ignore-ancestry option, which neither considers nor
+ # records mergeinfo. With this option the merge should "succeed"
+ # while skipping the missing paths. Of course with no mergeinfo
+ # recorded and everything skipped, there is nothing to commit, so
+ # unlike most of the tree conflict tests we don't bother with the
+ # final commit step.
+
+ sbox.build()
expected_output = wc.State('', {
})
- expected_disk = state_after_tree_del
+ expected_disk = disk_after_tree_del
+ # Don't expect any mergeinfo property changes because we run
+ # the merge with the --ignore-ancestry option.
expected_status = svntest.wc.State('', {
- '' : Item(status=' M', wc_rev=3),
+ '' : Item(status=' ', wc_rev=3),
'F' : Item(status=' ', wc_rev=3),
- 'F/alpha' : Item(status='!M', wc_rev=3),
+ 'F/alpha' : Item(status='! ', wc_rev=3),
'D' : Item(status=' ', wc_rev=3),
'D/D1' : Item(status='! ', wc_rev='?'),
'DF' : Item(status=' ', wc_rev=3),
@@ -1383,6 +1387,19 @@ def tree_conflicts_merge_del_onto_missin
'DDD/D1/D2/D3' : Item(status=' '),
})
+ if svntest.main.wc_is_singledb(sbox.wc_dir):
+ expected_status.tweak('D/D1', wc_rev=3)
+ expected_status.tweak('DF/D1', wc_rev=3)
+ expected_status.tweak('DF/D1/beta', wc_rev=3, status='! ')
+ expected_status.tweak('DD/D1', wc_rev=3)
+ expected_status.tweak('DD/D1/D2', wc_rev=3, status='! ')
+ expected_status.tweak('DDF/D1', wc_rev=3)
+ expected_status.tweak('DDF/D1/D2', wc_rev=3, status='! ')
+ expected_status.tweak('DDF/D1/D2/gamma', wc_rev=3, status='! ')
+ expected_status.tweak('DDD/D1', wc_rev=3)
+ expected_status.tweak('DDD/D1/D2', wc_rev=3, status='! ')
+ expected_status.tweak('DDD/D1/D2/D3', wc_rev=3, status='! ')
+
expected_skip = svntest.wc.State('', {
'F/alpha' : Item(),
'D/D1' : Item(),
@@ -1397,18 +1414,7 @@ def tree_conflicts_merge_del_onto_missin
expected_disk,
expected_status,
expected_skip,
-
- ### This should not be happening!
- ### The commit succeeds (it only commits mergeinfo).
- ### But then the work queue freaks out while trying to install
- ### F/alpha into the WC, because F/alpha is missing from disk.
- ### We end up with a working copy that cannot be cleaned up.
- ### To make this test pass for now we'll expect this error.
- ### When the problem is fixed this test will start to fail
- ### and should be adjusted.
- commit_block_string=".*Error bumping revisions post-commit",
-
- ) ], False)
+ ) ], False, do_commit_conflicts=False, ignore_ancestry=True)
#----------------------------------------------------------------------
def merge_replace_setup(sbox):
@@ -1703,7 +1709,6 @@ def merge_replace_causes_tree_conflict(s
"--- Recording mergeinfo for merge between repository URLs into '" \
+ A + "':\n",
' U ' + A + '\n',
- ' G ' + A + '\n',
'Summary of conflicts:\n',
' Tree conflicts: 4\n',
])
@@ -1892,7 +1897,7 @@ test_list = [ None,
tree_conflicts_on_merge_local_ci_6,
tree_conflicts_on_merge_no_local_ci_4_1,
tree_conflicts_on_merge_no_local_ci_4_2,
- XFail(tree_conflicts_on_merge_no_local_ci_5_1),
+ tree_conflicts_on_merge_no_local_ci_5_1,
XFail(tree_conflicts_on_merge_no_local_ci_5_2),
tree_conflicts_on_merge_no_local_ci_6,
tree_conflicts_merge_edit_onto_missing,