summaryrefslogtreecommitdiff
path: root/subversion/tests/cmdline/merge_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/tests/cmdline/merge_tests.py')
-rwxr-xr-xsubversion/tests/cmdline/merge_tests.py147
1 files changed, 64 insertions, 83 deletions
diff --git a/subversion/tests/cmdline/merge_tests.py b/subversion/tests/cmdline/merge_tests.py
index a67dada..3ca42a9 100755
--- a/subversion/tests/cmdline/merge_tests.py
+++ b/subversion/tests/cmdline/merge_tests.py
@@ -697,7 +697,7 @@ def simple_property_merges(sbox):
def merge_similar_unrelated_trees(sbox):
"merging similar trees ancestrally unrelated"
- ## See http://subversion.tigris.org/issues/show_bug.cgi?id=1249. ##
+ ## See https://issues.apache.org/jira/browse/SVN-1249. ##
sbox.build()
wc_dir = sbox.wc_dir
@@ -3939,7 +3939,7 @@ def avoid_repeated_merge_on_subtree_with_merge_info(sbox):
check_props=True)
# Test for part of Issue #2821, see
- # http://subversion.tigris.org/issues/show_bug.cgi?id=2821#desc22
+ # https://issues.apache.org/jira/browse/SVN-2821#desc22
#
# Revert all local changes.
svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir)
@@ -4966,11 +4966,11 @@ def merge_to_switched_path(sbox):
A_COPY_D_G_rho_path = sbox.ospath('A_COPY/D/G/rho')
expected = svntest.verify.UnorderedOutput(
- ["A " + os.path.join(G_COPY_path, "pi") + "\n",
- "A " + os.path.join(G_COPY_path, "rho") + "\n",
- "A " + os.path.join(G_COPY_path, "tau") + "\n",
- "Checked out revision 6.\n",
- "A " + G_COPY_path + "\n"])
+ ["A " + G_COPY_path + "\n",
+ "A " + os.path.join(G_COPY_path, "pi") + "\n",
+ "A " + os.path.join(G_COPY_path, "rho") + "\n",
+ "A " + os.path.join(G_COPY_path, "tau") + "\n",
+ ])
# r7 - Copy A/D/G to A/D/G_COPY and commit.
svntest.actions.run_and_verify_svn(expected, [], 'copy',
@@ -6007,7 +6007,7 @@ def foreign_repos_does_not_update_mergeinfo(sbox):
def avoid_reflected_revs(sbox):
"avoid repeated merges for cyclic merging"
- # See <http://subversion.tigris.org/issues/show_bug.cgi?id=2897>.
+ # See <https://issues.apache.org/jira/browse/SVN-2897>.
#
# This test cherry-picks some changes (all of them, in fact) from the
# parent branch 'A' to the child branch 'A_COPY', and then tries to
@@ -8294,7 +8294,7 @@ def cherry_picking(sbox):
def propchange_of_subdir_raises_conflict(sbox):
"merge of propchange on subdir raises conflict"
- ## See http://subversion.tigris.org/issues/show_bug.cgi?id=2969. ##
+ ## See https://issues.apache.org/jira/browse/SVN-2969. ##
# Create a WC with a single branch
sbox.build()
@@ -8515,7 +8515,7 @@ def reverse_merge_prop_add_on_child(sbox):
def merge_target_with_non_inheritable_mergeinfo(sbox):
"merge target with non inheritable mergeinfo"
- ## See http://subversion.tigris.org/issues/show_bug.cgi?id=2970. ##
+ ## See https://issues.apache.org/jira/browse/SVN-2970. ##
# Create a WC with a single branch
sbox.build()
@@ -8547,7 +8547,7 @@ def merge_target_with_non_inheritable_mergeinfo(sbox):
expected_output = wc.State(A_COPY_B_path, {
'lambda' : Item(status='U '),
})
- # Issue #3642 http://subversion.tigris.org/issues/show_bug.cgi?id=3642
+ # Issue #3642 https://issues.apache.org/jira/browse/SVN-3642
#
# We don't expect A_COPY/B/F to have mergeinfo recorded on it because
# not only is it unaffected by the merge at depth immediates, it could
@@ -8820,7 +8820,7 @@ def merge_from_renamed_branch_fails_while_avoiding_repeat_merge(sbox):
#Merge r4 from A/RENAMED_C to A/C
#Merge r2:5 from A/RENAMED_C to A/C <-- This fails tracked via #3032.
- ## See http://subversion.tigris.org/issues/show_bug.cgi?id=3032. ##
+ ## See https://issues.apache.org/jira/browse/SVN-3032. ##
# Create a WC with a single branch
sbox.build()
@@ -9250,7 +9250,7 @@ def new_subtrees_should_not_break_merge(sbox):
# so we expect only subtree merges on A_COPY/D, A_COPY_D_H, and
# A_COPY/D/H/nu. The fact that A/D/H/nu doesn't exist at r6 should not cause
# the merge to fail -- see
- # http://subversion.tigris.org/issues/show_bug.cgi?id=3067#desc7.
+ # https://issues.apache.org/jira/browse/SVN-3067#desc7.
expected_output = wc.State(A_COPY_path, {
'D/H/omega': Item(status='U '),
})
@@ -10495,7 +10495,7 @@ def reverse_merge_away_all_mergeinfo(sbox):
# Another test for issue #3067: 'subtrees with intersecting mergeinfo,
# that don't exist at the start of a merge range shouldn't break the
# merge'. Specifically see
-# http://subversion.tigris.org/issues/show_bug.cgi?id=3067#desc5
+# https://issues.apache.org/jira/browse/SVN-3067#desc5
@SkipUnless(server_has_mergeinfo)
@Issues(3138,3067,4217)
def dont_merge_revs_into_subtree_that_predate_it(sbox):
@@ -10614,7 +10614,7 @@ def dont_merge_revs_into_subtree_that_predate_it(sbox):
# Cherry harvest all eligible revisions from 'A/D/H' to 'H_COPY'.
#
# This is where we see the problem described in
- # http://subversion.tigris.org/issues/show_bug.cgi?id=3067#desc5.
+ # https://issues.apache.org/jira/browse/SVN-3067#desc5.
#
# Use run_and_verify_svn() because run_and_verify_merge*() require
# explicit revision ranges.
@@ -11786,7 +11786,7 @@ def subtree_source_missing_in_requested_range(sbox):
# Another test for issue #3067: 'subtrees that don't exist at the start
# or end of a merge range shouldn't break the merge'
#
-# See http://subversion.tigris.org/issues/show_bug.cgi?id=3067#desc34
+# See https://issues.apache.org/jira/browse/SVN-3067#desc34
@Issue(3067)
@SkipUnless(server_has_mergeinfo)
def subtrees_with_empty_mergeinfo(sbox):
@@ -12848,6 +12848,39 @@ def natural_history_filtering(sbox):
# the revisions on 'trunk' which occurred after 'branch2' was copied as
# these are not part of 'branch2's natural history.
+ def path_join(head, tail):
+ if not head: return tail
+ if not tail: return head
+ return head + '/' + tail
+
+ def greek_file_item(path):
+ if path[-1:].islower():
+ basename = re.sub('.*/', '', path)
+ return Item("This is the file '" + basename + "'.\n")
+ return Item()
+
+ A_paths = [
+ "",
+ "B",
+ "B/lambda",
+ "B/E",
+ "B/E/alpha",
+ "B/E/beta",
+ "B/F",
+ "mu",
+ "C",
+ "D",
+ "D/gamma",
+ "D/G",
+ "D/G/pi",
+ "D/G/rho",
+ "D/G/tau",
+ "D/H",
+ "D/H/chi",
+ "D/H/omega",
+ "D/H/psi",
+ ]
+
sbox.build()
wc_dir = sbox.wc_dir
@@ -12861,68 +12894,16 @@ def natural_history_filtering(sbox):
# r7: Make a second 'branch': Copy A to A_COPY_2
expected = svntest.verify.UnorderedOutput(
- ["A " + os.path.join(A_COPY_2_path, "B") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "lambda") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "E") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "E", "alpha") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "E", "beta") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "F") + "\n",
- "A " + os.path.join(A_COPY_2_path, "mu") + "\n",
- "A " + os.path.join(A_COPY_2_path, "C") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "gamma") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G", "pi") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G", "rho") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G", "tau") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H", "chi") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H", "omega") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H", "psi") + "\n",
- "Checked out revision 6.\n",
- "A " + A_COPY_2_path + "\n"])
- wc_status.add({
- "A_COPY_2" + "/B" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/lambda" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/E" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/E/alpha" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/E/beta" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/F" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/mu" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/C" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/gamma" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G/pi" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G/rho" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G/tau" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H/chi" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H/omega" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H/psi" : Item(status=' ', wc_rev=7),
- "A_COPY_2" : Item(status=' ', wc_rev=7),
- })
- wc_disk.add({
- "A_COPY_2" : Item(),
- "A_COPY_2" + '/B' : Item(),
- "A_COPY_2" + '/B/lambda' : Item("This is the file 'lambda'.\n"),
- "A_COPY_2" + '/B/E' : Item(),
- "A_COPY_2" + '/B/E/alpha' : Item("This is the file 'alpha'.\n"),
- "A_COPY_2" + '/B/E/beta' : Item("New content"),
- "A_COPY_2" + '/B/F' : Item(),
- "A_COPY_2" + '/mu' : Item("This is the file 'mu'.\n"),
- "A_COPY_2" + '/C' : Item(),
- "A_COPY_2" + '/D' : Item(),
- "A_COPY_2" + '/D/gamma' : Item("This is the file 'gamma'.\n"),
- "A_COPY_2" + '/D/G' : Item(),
- "A_COPY_2" + '/D/G/pi' : Item("This is the file 'pi'.\n"),
- "A_COPY_2" + '/D/G/rho' : Item("New content"),
- "A_COPY_2" + '/D/G/tau' : Item("This is the file 'tau'.\n"),
- "A_COPY_2" + '/D/H' : Item(),
- "A_COPY_2" + '/D/H/chi' : Item("New content"),
- "A_COPY_2" + '/D/H/omega' : Item("This is the file 'omega'.\n"),
- "A_COPY_2" + '/D/H/psi' : Item("New content"),
- })
+ [ "A " + sbox.ospath(path_join("A_COPY_2", p)) + "\n"
+ for p in A_paths ])
+ wc_status.add(
+ { path_join("A_COPY_2", p) : Item(status=' ', wc_rev=7)
+ for p in A_paths })
+ wc_disk.add(
+ { path_join("A_COPY_2", p) :
+ Item("New content") if p in ['B/E/beta', 'D/G/rho', 'D/H/chi', 'D/H/psi']
+ else greek_file_item(p)
+ for p in A_paths })
svntest.actions.run_and_verify_svn(expected, [], 'copy',
sbox.repo_url + "/A",
A_COPY_2_path)
@@ -13305,7 +13286,7 @@ def no_self_referential_filtering_on_added_path(sbox):
# how can any prop changes be merged to it? The answer is that
# the merge code does some quiet housekeeping, merging C_MOVED's
# inherited mergeinfo into its incoming mergeinfo, see
- # http://subversion.tigris.org/issues/show_bug.cgi?id=4309
+ # https://issues.apache.org/jira/browse/SVN-4309
# This test is not covering issue #4309 so we let the current
# behavior pass.
expected_mergeinfo_output = wc.State(A_COPY_2_path, {
@@ -13374,7 +13355,7 @@ def no_self_referential_filtering_on_added_path(sbox):
#----------------------------------------------------------------------
# Test for issue #3324
-# http://subversion.tigris.org/issues/show_bug.cgi?id=3324
+# https://issues.apache.org/jira/browse/SVN-3324
@Issue(3324)
@SkipUnless(server_has_mergeinfo)
def merge_range_prior_to_rename_source_existence(sbox):
@@ -13881,7 +13862,7 @@ def dont_merge_gaps_in_history(sbox):
#----------------------------------------------------------------------
# Test for issue #3432 'Merge can record mergeinfo from natural history
-# gaps'. See http://subversion.tigris.org/issues/show_bug.cgi?id=3432
+# gaps'. See https://issues.apache.org/jira/browse/SVN-3432
@Issue(3432)
@SkipUnless(server_has_mergeinfo)
def handle_gaps_in_implicit_mergeinfo(sbox):
@@ -15122,7 +15103,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
+# mergeinfo'. See https://issues.apache.org/jira/browse/SVN-3642
@Issue(3642)
def immediate_depth_merge_creates_minimal_subtree_mergeinfo(sbox):
"no spurious mergeinfo from immediate depth merges"
@@ -15817,7 +15798,7 @@ def subtree_merges_inherit_invalid_working_mergeinfo(sbox):
#----------------------------------------------------------------------
# Test for issue #3686 'executable flag not correctly set on merge'
-# See http://subversion.tigris.org/issues/show_bug.cgi?id=3686
+# See https://issues.apache.org/jira/browse/SVN-3686
@Issue(3686)
@SkipUnless(server_has_mergeinfo)
@SkipUnless(svntest.main.is_posix_os)