Hi All,
I have attached a test case for Issue 3867
(http://subversion.tigris.org/issues/show_bug.cgi?id=3867)
Issue Summary:
reintegrate merges create mergeinfo for non-existent paths
Regards,
Arwin Arni
Index: subversion/tests/cmdline/merge_reintegrate_tests.py
===================================================================
--- subversion/tests/cmdline/merge_reintegrate_tests.py (revision 1121879)
+++ subversion/tests/cmdline/merge_reintegrate_tests.py (working copy)
@@ -2248,6 +2248,96 @@
None, None, None, None,
None, 1, 1)
+@Issue(3867)
+@XFail()
+def generous_mergeinfo(sbox):
+ "extra harmless mergeinfo created"
+
+ sbox.build()
+ wc_dir=sbox.wc_dir
+
+ mu_path = os.path.join(sbox.wc_dir, "A", "mu")
+ lambda_path = os.path.join(sbox.wc_dir, "A", "B", "lambda")
+ alpha_path = os.path.join(sbox.wc_dir, "A", "B", "E", "alpha")
+ beta_path = os.path.join(sbox.wc_dir, "A", "B", "E", "beta")
+
+ A_path = os.path.join(sbox.wc_dir, "A")
+ A_path_1 = os.path.join(sbox.wc_dir, "A@1")
+ A_COPY_path = os.path.join(sbox.wc_dir, "A_COPY")
+ A_COPY_url = sbox.repo_url + "/A_COPY"
+ # Make 4 commits under /A pushing the repo to rev5
+
+ svntest.main.file_write(mu_path, "New content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+ svntest.main.file_write(lambda_path, "New content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+ svntest.main.file_write(alpha_path, "New content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+ svntest.main.file_write(beta_path, "New content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+
+ # Branch A@1 as A_COPY in revision 6
+
+ svntest.main.run_svn(None, "cp", A_path_1, A_COPY_path)
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+
+ # Make 4 commits under /A pushing the repo to rev10
+
+ svntest.main.file_write(mu_path, "Newer content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+ svntest.main.file_write(lambda_path, "Newer content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+ svntest.main.file_write(alpha_path, "Newer content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+ svntest.main.file_write(beta_path, "Newer content.\n")
+ svntest.main.run_svn(None, "ci", "-mm", wc_dir)
+
+ # Update the working copy to allow the merge
+ svntest.main.run_svn(None, "up", wc_dir)
+
+ # Reintegrate A_COPY to A.
+ # The resulting merginfo on A should be - /A_COPY:6-10
+ # as opposed to /A_COPY:2-10. (A_COPY didn't exist till revision 6)
+ expected_output = wc.State(A_path, {
+ })
+ expected_mergeinfo_output = wc.State(A_path, {
+ '' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(A_path, {
+ })
+ expected_disk = wc.State('', {
+ '' : Item(props={SVN_PROP_MERGEINFO :
+ '/A_COPY:6-10'}),
+ 'B' : Item(),
+ 'mu' : Item("Newer content.\n"),
+ 'B/E' : Item(),
+ 'B/E/alpha' : Item("Newer content.\n"),
+ 'B/E/beta' : Item("Newer content.\n"),
+ 'B/lambda' : Item("Newer content.\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_COPY_path, {})
+
+ svntest.actions.run_and_verify_merge(A_path, None, None,
+ A_COPY_url, None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk, None, expected_skip,
+ None, None, None, None, None,
+ 1, 1, "--reintegrate", A_path)
+
########################################################################
# Run the tests
@@ -2268,6 +2358,7 @@
reintegrate_with_self_referential_mergeinfo,
added_subtrees_with_mergeinfo_break_reintegrate,
two_URL_merge_removes_valid_mergeinfo_from_target,
+ generous_mergeinfo,
]
if __name__ == '__main__':
* subversion/tests/cmdline/merge_reintegrate_tests.py
(generous_mergeinfo) : New XFail test for Issue 3867
Patch by: Arwin Arni <arwin{_AT_}collab.net>