You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by jc...@apache.org on 2010/12/02 22:13:38 UTC
svn commit: r1041583 [4/5] - in
/subversion/branches/diff-optimizations-bytes: ./ build/
contrib/hook-scripts/ contrib/server-side/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/java...
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_reintegrate_tests.py Thu Dec 2 21:13:35 2010
@@ -37,6 +37,7 @@ Item = wc.StateItem
XFail = svntest.testcase.XFail
Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
+exp_noop_up_out = svntest.actions.expected_noop_update_output
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
@@ -1005,7 +1006,7 @@ def reintegrate_with_subtree_mergeinfo(s
# r10 - Merge r9 from A_COPY_3/D to A/D, creating explicit subtree
# mergeinfo under A. For this and every subsequent merge we update the WC
# first to allow full inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up',
wc_dir)
expected_status.tweak(wc_rev=9)
svntest.actions.run_and_verify_svn(
@@ -1032,7 +1033,7 @@ def reintegrate_with_subtree_mergeinfo(s
expected_disk.tweak('A_COPY_2/mu', contents="New content")
# r12 - Merge r11 from A_COPY_2/mu to A_COPY/mu
- svntest.actions.run_and_verify_svn(None, ["At revision 11.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(11), [], 'up',
wc_dir)
expected_status.tweak(wc_rev=11)
svntest.actions.run_and_verify_svn(
@@ -1050,7 +1051,7 @@ def reintegrate_with_subtree_mergeinfo(s
# r13 - Do a 'synch' cherry harvest merge of all available revisions
# from A to A_COPY
- svntest.actions.run_and_verify_svn(None, ["At revision 12.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(12), [], 'up',
wc_dir)
expected_status.tweak(wc_rev=12)
svntest.actions.run_and_verify_svn(
@@ -1105,7 +1106,7 @@ def reintegrate_with_subtree_mergeinfo(s
expected_disk.tweak('A_COPY/B/E/alpha', contents="New content")
# Now, reintegrate A_COPY to A. This should succeed.
- svntest.actions.run_and_verify_svn(None, ["At revision 14.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(14), [], 'up',
wc_dir)
expected_status.tweak(wc_rev=14)
expected_output = wc.State(A_path, {
@@ -1341,7 +1342,7 @@ def reintegrate_with_subtree_mergeinfo(s
# /A_COPY/D/gamma_moved:17-19
#
# shows that it is fully synched up with trunk.
- svntest.actions.run_and_verify_svn(None, ["At revision 19.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(19), [], 'up',
wc_dir)
expected_output = wc.State(A_path, {
'B/E/alpha' : Item(status='U '),
@@ -1638,7 +1639,7 @@ def reintegrate_with_self_referential_me
# r6 Copy A to A2 and then manually set some self-referential mergeinfo on
# A2/B and A2.
- svntest.actions.run_and_verify_svn(None, ["At revision 5.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(5), [],
'up', wc_dir)
svntest.actions.run_and_verify_svn(None, None, [],
'copy', A_path, A2_path)
@@ -1669,7 +1670,7 @@ def reintegrate_with_self_referential_me
# Update to uniform revision and reintegrate A2.1 back to A2.
# Note that the mergeinfo on A2/B is not changed by the reintegration
# and so is not expected to by updated to describe the merge.
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
'up', wc_dir)
expected_output = wc.State(A2_path, {
'mu' : Item(status='U '),
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_tests.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/merge_tests.py Thu Dec 2 21:13:35 2010
@@ -38,6 +38,7 @@ XFail = svntest.testcase.XFail
Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
Wimp = svntest.testcase.Wimp
+exp_noop_up_out = svntest.actions.expected_noop_update_output
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
@@ -4843,7 +4844,7 @@ def mergeinfo_inheritance(sbox):
# Update the disconnected WC it so it will get the most recent mergeinfo
# from the repos when merging.
- svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], 'up',
other_wc)
# Merge r5:4 into the root of the disconnected WC.
@@ -4942,7 +4943,7 @@ def mergeinfo_elision(sbox):
wc_dir)
# Update A_COPY to get all paths to the same working revision.
- svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [],
'up', wc_dir)
wc_status.tweak(wc_rev=7)
@@ -5406,7 +5407,7 @@ def merge_to_switched_path(sbox):
None, None, None, None, None, 1)
# Update working copy to allow elision (if any).
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
'up', wc_dir)
# Set some mergeinfo on a working copy parent of our switched subtree
@@ -5551,7 +5552,7 @@ def merge_to_path_with_switched_children
A_COPY_gamma_path = os.path.join(wc_dir, "A_COPY", "D", "gamma")
H_COPY_2_path = os.path.join(wc_dir, "A_COPY_2", "D", "H")
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], 'up',
wc_dir)
wc_status.tweak(wc_rev=8)
@@ -5953,7 +5954,7 @@ def merge_to_path_with_switched_children
# Update merge target so working revisions are uniform and all
# possible elision occurs.
- svntest.actions.run_and_verify_svn(None, ["At revision 10.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [],
'up', A_COPY_path)
# Do the reverse merge.
@@ -7194,7 +7195,7 @@ def merge_away_subtrees_noninheritable_r
nu_COPY_path = os.path.join(wc_dir, "A_COPY", "nu")
# Make a change to directory A/D/H and commit as r8.
- svntest.actions.run_and_verify_svn(None, ['At revision 7.\n'], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [],
'update', wc_dir)
svntest.actions.run_and_verify_svn(
@@ -7633,7 +7634,7 @@ def merge_to_sparse_directories(sbox):
wc_disk.tweak('A/mu', contents="New content")
# r8 - Add a prop to A/D and commit.
- svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [],
'up', wc_dir)
svntest.actions.run_and_verify_svn(None,
["property 'prop:name' set on '" +
@@ -7648,7 +7649,7 @@ def merge_to_sparse_directories(sbox):
None, wc_dir)
# r9 - Add a prop to A and commit.
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
'up', wc_dir)
svntest.actions.run_and_verify_svn(None,
["property 'prop:name' set on '" +
@@ -9721,7 +9722,7 @@ def new_subtrees_should_not_break_merge(
# Commit this merge as r9.
#
# Update the wc first to make setting the expected status a bit easier.
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
'up', wc_dir)
wc_status.tweak(wc_rev=8)
expected_output = wc.State(wc_dir, {
@@ -9740,7 +9741,7 @@ def new_subtrees_should_not_break_merge(
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
wc_status, None, wc_dir)
# Update the WC.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [],
'up', wc_dir)
wc_status.tweak(wc_rev=9)
@@ -9832,7 +9833,7 @@ def new_subtrees_should_not_break_merge(
wc_status.tweak('A_COPY/D/G/rho', wc_rev=10)
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
wc_status, None, wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 10.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [],
'up', wc_dir)
wc_status.tweak(wc_rev=10)
@@ -11612,7 +11613,7 @@ def subtree_merges_dont_intersect_with_t
wc_disk.tweak('A/D/H/psi', contents="Even newer content")
# Update the WC.
- svntest.actions.run_and_verify_svn(None, ['At revision 8.\n'], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
'update', wc_dir)
wc_status.tweak(wc_rev=8)
@@ -11685,7 +11686,7 @@ def subtree_merges_dont_intersect_with_t
wc_dir)
# Update the WC.
- svntest.actions.run_and_verify_svn(None, ['At revision 9.\n'], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [],
'update', wc_dir)
# Make sure we have mergeinfo that meets the two criteria set out above.
@@ -11941,7 +11942,7 @@ def subtree_source_missing_in_requested_
svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
'merge r6 to A_COPY',
wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 10.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [], 'up',
wc_dir)
# r11 - Merge r8 to A_COPY.
@@ -11970,7 +11971,7 @@ def subtree_source_missing_in_requested_
svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
'merge r8 to A_COPY/D/H/omega',
wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 11.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(11), [], 'up',
wc_dir)
# r12 - modify A/D/H/omega yet again.
@@ -11990,7 +11991,7 @@ def subtree_source_missing_in_requested_
svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
'cherry harvest to A_COPY/D/H/omega',
wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 13.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(13), [], 'up',
wc_dir)
# Check that svn:mergeinfo is as expected.
@@ -12157,7 +12158,7 @@ def subtree_source_missing_in_requested_
# Update A_COPY/D/H/rho back to r13 so it's mergeinfo doesn't include
# r12. Then merge a range, -r6:12 which should delete a subtree
# (A_COPY/D/H/psi).
- svntest.actions.run_and_verify_svn(None, ["At revision 14.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(14), [], 'up',
wc_dir)
expected_output = wc.State(A_COPY_path, {
'D/H/psi' : Item(status='D '),
@@ -12375,7 +12376,7 @@ def commit_to_subtree_added_by_merge(sbo
# *did* succeed, but the wrong path ('A/D/H/nu' rather than 'A_COPY/D/H/nu')
# is affected. We can see this by running an update; since we just
# committed there shouldn't be any incoming changes.
- svntest.actions.run_and_verify_svn(None, ["At revision 5.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(5), [], 'up',
wc_dir)
@@ -12557,7 +12558,7 @@ def subtree_merges_dont_cause_spurious_c
wc_disk.tweak('A/D/G/rho', contents="Even *newer* content")
# Update the WC to allow full mergeinfo inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], 'up',
wc_dir)
wc_status.tweak(wc_rev=8)
@@ -12653,7 +12654,7 @@ def subtree_merges_dont_cause_spurious_c
wc_status, None, wc_dir)
# Update the WC to allow full mergeinfo inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up',
wc_dir)
wc_status.tweak(wc_rev=9)
@@ -12834,7 +12835,7 @@ def merge_target_and_subtrees_need_nonin
None, wc_dir)
# Update the WC to allow full mergeinfo inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up',
wc_dir)
# Merge all available revisions from A to A_COPY, the merge logic
@@ -13078,7 +13079,7 @@ def merge_adds_mergeinfo_correctly(sbox)
D_COPY_2_path = os.path.join(wc_dir, "A_COPY_2", "D")
# Update working copy to allow full inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [],
'up', wc_dir)
wc_status.tweak(wc_rev=7)
@@ -13216,7 +13217,7 @@ def merge_adds_mergeinfo_correctly(sbox)
# the mergeinfo describing this merge '/A_COPY_2:9' should also be present
# in A_COPY's explicit mergeinfo.
# Update working copy to allow full inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [],
'up', wc_dir)
expected_output = wc.State(A_COPY_path, {
'D' : Item(status=' U'),
@@ -13339,7 +13340,7 @@ def natural_history_filtering(sbox):
#
# 7) Merge all available revisions from 'branch1' to 'branch2'.
# 'branch2' should have explicit merginfo for both 'branch1' *and* for
- # the revisions on 'trunk' which occured after 'branch2' was copied as
+ # the revisions on 'trunk' which occurred after 'branch2' was copied as
# these are not part of 'branch2's natural history.
sbox.build()
@@ -13437,7 +13438,7 @@ def natural_history_filtering(sbox):
# r9: Merge all available revisions from A to A_COPY. But first
# update working copy to allow full inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
'up', wc_dir)
wc_status.tweak(wc_rev=8)
expected_output = wc.State(A_COPY_path, {
@@ -13524,7 +13525,7 @@ def natural_history_filtering(sbox):
None, wc_dir)
# Again update the working copy to allow full inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [],
'up', wc_dir)
wc_status.tweak(wc_rev=9)
@@ -13761,7 +13762,7 @@ def no_self_referential_filtering_on_add
# r9: Merge r8 from A_COPY to A.
#
# Update first to avoid an out of date error.
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], 'up',
wc_dir)
wc_status.tweak(wc_rev=8)
svntest.actions.run_and_verify_svn(
@@ -13934,7 +13935,7 @@ def merge_range_prior_to_rename_source_e
wc_status, None, wc_dir)
# r10 - Merge all available revisions (i.e. -r1:9) from A to A_COPY.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up',
wc_dir)
wc_status.tweak(wc_rev=9)
svntest.actions.run_and_verify_svn(
@@ -13968,7 +13969,7 @@ def merge_range_prior_to_rename_source_e
wc_status, None, wc_dir)
# r11 - Reverse merge -r9:1 from A/B to A_COPY/B
- svntest.actions.run_and_verify_svn(None, ["At revision 10.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [], 'up',
wc_dir)
wc_status.tweak(wc_rev=10)
svntest.actions.run_and_verify_svn(
@@ -13995,7 +13996,8 @@ def merge_range_prior_to_rename_source_e
sbox.repo_url + '/A/D/H/nu_moved',
'-m', 'Move nu to nu_moved')
svntest.actions.run_and_verify_svn(None,
- ["D " + nu_path + "\n",
+ ["Updating '%s' ...\n" % (wc_dir),
+ "D " + nu_path + "\n",
"A " + nu_moved_path + "\n",
"Updated to revision 12.\n"],
[], 'up', wc_dir)
@@ -14092,7 +14094,7 @@ def merge_range_prior_to_rename_source_e
# Properties on 'A_COPY_2\B':
# svn:mergeinfo
# /A/B:3-13
- svntest.actions.run_and_verify_svn(None, ["At revision 13.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(13), [], 'up',
wc_dir)
svntest.actions.run_and_verify_svn(None,
None, # Don't check stdout, we test this
@@ -14105,7 +14107,7 @@ def merge_range_prior_to_rename_source_e
None, None, [], 'ci', '-m',
'Merge all from A/B to A_COPY_2/B\nMerge -r2:9 from A to A_COPY_2',
wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 14.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(14), [], 'up',
wc_dir)
# Now reverse merge -r13:7 from A to A_COPY_2.
@@ -14284,7 +14286,7 @@ def set_up_natural_history_gap(sbox):
# Update the WC to a uniform revision.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
wc_status, None, wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [],
'up', wc_dir)
return wc_disk, wc_status
@@ -14668,7 +14670,7 @@ def noop_file_merge(sbox):
wc_dir);
# Update working copy to allow full inheritance and elision.
- svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [],
'up', wc_dir)
# Merge all available revisions from A/D/H/chi to A_COPY/D/H/chi.
@@ -14828,7 +14830,7 @@ def record_only_merge(sbox):
wc_dir)
# r10 - Merge r8 from A to A_COPY.
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up',
wc_dir)
svntest.actions.run_and_verify_svn(None,
expected_merge_output(
@@ -14883,7 +14885,7 @@ def record_only_merge(sbox):
'commit', '-m', 'Several subtree merges',
wc_dir)
- svntest.actions.run_and_verify_svn(None, ["At revision 11.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(11), [], 'up',
wc_dir)
# Now do a --record-only merge of r10 and r11 from A_COPY to A2.
@@ -15212,7 +15214,7 @@ def skipped_files_get_correct_mergeinfo(
#
# 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"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
'up', wc_dir)
svntest.actions.run_and_verify_svn(None, None, [],
'up', '--set-depth=empty', H_COPY_path)
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/mergeinfo_tests.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/mergeinfo_tests.py Thu Dec 2 21:13:35 2010
@@ -36,6 +36,7 @@ Item = wc.StateItem
XFail = svntest.testcase.XFail
Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
+exp_noop_up_out = svntest.actions.expected_noop_update_output
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
@@ -169,7 +170,7 @@ def non_inheritable_mergeinfo(sbox):
# Update the WC, then merge r4 from A to A_COPY and r6 from A to A_COPY
# at --depth empty and commit the merges as r7.
- svntest.actions.run_and_verify_svn(None, ["At revision 6.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(6), [], 'up',
wc_dir)
expected_status.tweak(wc_rev=6)
svntest.actions.run_and_verify_svn(
@@ -195,7 +196,7 @@ def non_inheritable_mergeinfo(sbox):
expected_status, None, wc_dir)
# Update the WC a last time to ensure full inheritance.
- svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], 'up',
wc_dir)
# Despite being non-inheritable, r6 should still show as merged to A_COPY
@@ -248,7 +249,7 @@ def recursive_mergeinfo(sbox):
nu2_path = os.path.join(wc_dir, "A2", "C", "nu2")
# Rename A to A2 in r7.
- svntest.actions.run_and_verify_svn(None, ["At revision 6.\n"], [], 'up', wc_dir)
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(6), [], 'up', wc_dir)
svntest.actions.run_and_verify_svn(None, None, [],
'ren', A_path, A2_path)
svntest.actions.run_and_verify_svn(None, None, [],
@@ -264,7 +265,7 @@ def recursive_mergeinfo(sbox):
# Do several merges to create varied subtree mergeinfo
# Merge r4 from A2 to A_COPY at depth empty
- svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], 'up',
wc_dir)
svntest.actions.run_and_verify_svn(
None,
@@ -318,7 +319,7 @@ def recursive_mergeinfo(sbox):
# Commit everything this far as r9
svntest.actions.run_and_verify_svn(None, None, [],
'ci', wc_dir, '-m', 'Many merges')
- svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up',
wc_dir)
# Test svn mergeinfo -R / --depth infinity.
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/redirect_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/redirect_tests.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/redirect_tests.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/redirect_tests.py Thu Dec 2 21:13:35 2010
@@ -129,7 +129,9 @@ def redirected_update(sbox):
exit_code, out, err = svntest.main.run_svn(None, 'up', wc_dir)
if err:
raise svntest.Failure
- if not redirect_regex.match(out[0]):
+ if not re.match("^Updating '.*' ...", out[0]):
+ raise svntest.Failure
+ if not redirect_regex.match(out[1]):
raise svntest.Failure
# Verify that we have the expected URL.
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/schedule_tests.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/schedule_tests.py Thu Dec 2 21:13:35 2010
@@ -37,7 +37,7 @@ SkipUnless = svntest.testcase.SkipUnless
XFail = svntest.testcase.XFail
Wimp = svntest.testcase.Wimp
Item = svntest.wc.StateItem
-
+exp_noop_up_out = svntest.actions.expected_noop_update_output
######################################################################
# Tests
@@ -543,7 +543,7 @@ def status_add_deleted_directory(sbox):
# Update will *not* remove the entry for A despite it being marked
# deleted.
- svntest.actions.run_and_verify_svn(None, ['At revision 2.\n'], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(2), [],
'up', wc_dir)
expected_status.tweak('', 'iota', wc_rev=2)
svntest.actions.run_and_verify_status(wc_dir, expected_status)
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests.py Thu Dec 2 21:13:35 2010
@@ -814,21 +814,19 @@ def commit_a_copy_of_root(sbox):
#
# See also http://svn.haxx.se/dev/archive-2010-11/0411.shtml and
#
-### TODO: Once the above failure is fixed, delete-revprops.expected.dump
-### needs to be updated for this test to PASS!
#
# Note: For those who may poke around this test in the future, r3 of
# delete-revprops.dump was created with the following svnmucc command:
#
-# svnmucc.exe -mm cp head %ROOT_URL%-1/trunk/A %ROOT_URL%-1/trunk/H
-# rm %ROOT_URL%-1/trunk/H/B
-# cp head %ROOT_URL%-1/trunk/X %ROOT_URL%-1/trunk/B
+# svnmucc.exe -mm cp head %ROOT_URL%/trunk/A %ROOT_URL%/trunk/H
+# rm %ROOT_URL%/trunk/H/B
+# cp head %ROOT_URL%/trunk/X %ROOT_URL%/trunk/B
#
# r4 was created with this svnmucc command:
#
-# svnmucc.exe -mm cp head %ROOT_URL%-1/trunk/A %ROOT_URL%-1/trunk/H/Z
-# rm %ROOT_URL%-1/trunk/H/Z/B
-# mkdir %ROOT_URL%-1/trunk/H/Z/B
+# svnmucc.exe -mm cp head %ROOT_URL%/trunk/A %ROOT_URL%/trunk/H/Z
+# rm %ROOT_URL%/trunk/H/Z/B
+# mkdir %ROOT_URL%/trunk/H/Z/B
def descend_into_replace(sbox):
"descending into replaced dir looks in src"
run_test(sbox, "descend_into_replace.dump", subdir='/trunk/H',
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.expected.dump
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.expected.dump?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.expected.dump (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.expected.dump Thu Dec 2 21:13:35 2010
@@ -233,3 +233,179 @@ PROPS-END
This is the file 'mu'.
+Revision-number: 4
+Prop-content-length: 108
+Content-length: 108
+
+K 10
+svn:author
+V 7
+jrandom
+K 8
+svn:date
+V 27
+2010-11-22T15:40:03.023927Z
+K 7
+svn:log
+V 7
+log msg
+PROPS-END
+
+Node-path: trunk/H/Z
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/H/Z/B
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/H/Z/C
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/H/Z/D
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/H/Z/D/G
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/H/Z/D/G/pi
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 23
+Text-content-md5: adddfc3e6b605b5f90ceeab11b4e8ab6
+Text-content-sha1: 411e258dc14b42701fdc29b75f653e93f8686415
+Content-length: 33
+
+PROPS-END
+This is the file 'pi'.
+
+
+Node-path: trunk/H/Z/D/G/rho
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 24
+Text-content-md5: 82f2211cf4ab22e3555fc7b835fbc604
+Text-content-sha1: 56388a031dffbf9df7c32e1f299b1d5d7ef60881
+Content-length: 34
+
+PROPS-END
+This is the file 'rho'.
+
+
+Node-path: trunk/H/Z/D/G/tau
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 24
+Text-content-md5: 9936e2716e469bb686deb98c280ead58
+Text-content-sha1: 62e8c07d56bee94ea4577e80414fa8805aaf0175
+Content-length: 34
+
+PROPS-END
+This is the file 'tau'.
+
+
+Node-path: trunk/H/Z/D/H
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/H/Z/D/H/chi
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 24
+Text-content-md5: 8f5ebad6d1f7775c2682e54417cbe4d3
+Text-content-sha1: abeac1bf62099ab66b44779198dc19f40e3244f4
+Content-length: 34
+
+PROPS-END
+This is the file 'chi'.
+
+
+Node-path: trunk/H/Z/D/H/omega
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 26
+Text-content-md5: fe4ec8bdd3d2056db4f55b474a10fadc
+Text-content-sha1: c06e671bf15a6af55086176a0931d3b5034c82e6
+Content-length: 36
+
+PROPS-END
+This is the file 'omega'.
+
+
+Node-path: trunk/H/Z/D/H/psi
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 24
+Text-content-md5: e81f8f68ba50e749c200cb3c9ce5d2b1
+Text-content-sha1: 9c438bde39e8ccbbd366df2638e3cb6700950204
+Content-length: 34
+
+PROPS-END
+This is the file 'psi'.
+
+
+Node-path: trunk/H/Z/D/gamma
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 26
+Text-content-md5: 412138bd677d64cd1c32fafbffe6245d
+Text-content-sha1: 74b75d7f2e1a0292f17d5a57c570bd89783f5d1c
+Content-length: 36
+
+PROPS-END
+This is the file 'gamma'.
+
+
+Node-path: trunk/H/Z/mu
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 23
+Text-content-md5: baf78ae06a2d5b7d9554c5f1280d3fa8
+Text-content-sha1: b4d00c56351d1a752e24d839d41a362d8da4a4c7
+Content-length: 33
+
+PROPS-END
+This is the file 'mu'.
+
+
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/actions.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/actions.py Thu Dec 2 21:13:35 2010
@@ -356,6 +356,13 @@ def load_repo(sbox, dumpfile_path = None
return dump_str
+def expected_noop_update_output(rev):
+ """Return an ExpectedOutput object describing what we'd expect to
+ see from an update to revision REV that was effectively a no-op (no
+ server changes transmitted)."""
+ return verify.createExpectedOutput("Updating '.*' ...|At revision %d."
+ % (rev),
+ "no-op update")
######################################################################
# Subversion Actions
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/main.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/main.py Thu Dec 2 21:13:35 2010
@@ -731,7 +731,7 @@ def create_repos(path):
# (e.g. due to a missing 'svnadmin' binary).
raise SVNRepositoryCreateFailure("".join(stderr).rstrip())
- # Allow unauthenticated users to write to the repos, for ra_svn testing.
+ # Require authentication to write to the repos, for ra_svn testing.
file_write(get_svnserve_conf_file_path(path),
"[general]\nauth-access = write\n");
if options.enable_sasl:
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/update_tests.py?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/update_tests.py Thu Dec 2 21:13:35 2010
@@ -39,6 +39,7 @@ Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
XFail = svntest.testcase.XFail
Item = svntest.wc.StateItem
+exp_noop_up_out = svntest.actions.expected_noop_update_output
from svntest.main import SVN_PROP_MERGEINFO, server_has_mergeinfo
@@ -1168,11 +1169,13 @@ def another_hudson_problem(sbox):
# as 'deleted' and should not alter gamma's entry.
if not svntest.main.wc_is_singledb(wc_dir):
- expected_output = ['D '+G_path+'\n',
+ expected_output = ["Updating '%s' ...\n" % (G_path),
+ 'D '+G_path+'\n',
'Updated to revision 3.\n',
]
else:
- expected_output = ['Restored \'' + G_path + '\'\n',
+ expected_output = ["Updating '%s' ...\n" % (G_path),
+ 'Restored \'' + G_path + '\'\n',
'Restored \'' + G_path + os.path.sep + 'pi\'\n',
'Restored \'' + G_path + os.path.sep + 'rho\'\n',
'Restored \'' + G_path + os.path.sep + 'tau\'\n',
@@ -1226,9 +1229,9 @@ def update_deleted_targets(sbox):
None, wc_dir)
# Explicit update must not remove the 'deleted=true' entries
- svntest.actions.run_and_verify_svn(None, ['At revision 2.\n'], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(2), [],
'update', gamma_path)
- svntest.actions.run_and_verify_svn(None, ['At revision 2.\n'], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(2), [],
'update', F_path)
# Update to r1 to restore items, since the parent directory is already
@@ -3350,7 +3353,7 @@ def mergeinfo_update_elision(sbox):
expected_status, None, wc_dir)
# Update A to get all paths to the same working revision.
- svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [],
+ svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [],
'up', wc_dir)
# Merge r6:7 into A/B_COPY/E
@@ -3394,7 +3397,7 @@ def mergeinfo_update_elision(sbox):
# r8 - Commit the merge
svntest.actions.run_and_verify_svn(None,
- ["At revision 7.\n"],
+ exp_noop_up_out(7),
[], 'update', wc_dir)
expected_output = wc.State(wc_dir,
@@ -3792,7 +3795,8 @@ def update_accept_conflicts(sbox):
# Just leave the conflicts alone, since run_and_verify_svn already uses
# the --non-interactive option.
svntest.actions.run_and_verify_svn(None,
- ['C %s\n' % (iota_path_backup,),
+ ["Updating '%s' ...\n" % (iota_path_backup),
+ 'C %s\n' % (iota_path_backup,),
'Updated to revision 2.\n',
'Summary of conflicts:\n',
' Text conflicts: 1\n'],
@@ -3802,7 +3806,8 @@ def update_accept_conflicts(sbox):
# lambda: --accept=postpone
# Just leave the conflicts alone.
svntest.actions.run_and_verify_svn(None,
- ['C %s\n' % (lambda_path_backup,),
+ ["Updating '%s' ...\n" % (lambda_path_backup),
+ 'C %s\n' % (lambda_path_backup,),
'Updated to revision 2.\n',
'Summary of conflicts:\n',
' Text conflicts: 1\n'],
@@ -3813,7 +3818,8 @@ def update_accept_conflicts(sbox):
# mu: --accept=base
# Accept the pre-update base file.
svntest.actions.run_and_verify_svn(None,
- ['G %s\n' % (mu_path_backup,),
+ ["Updating '%s' ...\n" % (mu_path_backup),
+ 'G %s\n' % (mu_path_backup,),
'Updated to revision 2.\n'],
[],
'update', '--accept=base',
@@ -3822,7 +3828,8 @@ def update_accept_conflicts(sbox):
# alpha: --accept=mine
# Accept the user's working file.
svntest.actions.run_and_verify_svn(None,
- ['G %s\n' % (alpha_path_backup,),
+ ["Updating '%s' ...\n" % (alpha_path_backup),
+ 'G %s\n' % (alpha_path_backup,),
'Updated to revision 2.\n'],
[],
'update', '--accept=mine-full',
@@ -3831,7 +3838,8 @@ def update_accept_conflicts(sbox):
# beta: --accept=theirs
# Accept their file.
svntest.actions.run_and_verify_svn(None,
- ['G %s\n' % (beta_path_backup,),
+ ["Updating '%s' ...\n" % (beta_path_backup),
+ 'G %s\n' % (beta_path_backup,),
'Updated to revision 2.\n'],
[],
'update', '--accept=theirs-full',
@@ -3842,7 +3850,8 @@ def update_accept_conflicts(sbox):
# conflicts in place, so expect a message on stderr, but expect
# svn to exit with an exit code of 0.
svntest.actions.run_and_verify_svn2(None,
- ['G %s\n' % (pi_path_backup,),
+ ["Updating '%s' ...\n" % (pi_path_backup),
+ 'G %s\n' % (pi_path_backup,),
'Updated to revision 2.\n'],
"system(.*) returned.*", 0,
'update', '--accept=edit',
@@ -3851,7 +3860,8 @@ def update_accept_conflicts(sbox):
# rho: --accept=launch
# Run the external merge tool, it should leave conflict markers in place.
svntest.actions.run_and_verify_svn(None,
- ['C %s\n' % (rho_path_backup,),
+ ["Updating '%s' ...\n" % (rho_path_backup),
+ 'C %s\n' % (rho_path_backup,),
'Updated to revision 2.\n',
'Summary of conflicts:\n',
' Text conflicts: 1\n'],
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/dirent_uri-test.c Thu Dec 2 21:13:35 2010
@@ -1514,7 +1514,6 @@ test_relpath_is_ancestor(apr_pool_t *poo
} tests[] = {
{ "foo", "foo/bar", TRUE},
{ "food/bar", "foo/bar", FALSE},
- { "/", "/foo", TRUE},
{ "", "foo", TRUE},
{ "", ".bar", TRUE},
{ "foo/bar", "foo", FALSE},
@@ -1846,8 +1845,8 @@ test_relpath_get_longest_ancestor(apr_po
{
const char *retval;
- retval = svn_uri_get_longest_ancestor(tests[i].path1, tests[i].path2,
- pool);
+ retval = svn_relpath_get_longest_ancestor(tests[i].path1, tests[i].path2,
+ pool);
if (strcmp(tests[i].result, retval))
return svn_error_createf
@@ -2859,6 +2858,198 @@ test_dirent_is_under_root(apr_pool_t *po
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_fspath_is_canonical(apr_pool_t *pool)
+{
+ struct {
+ const char *path;
+ svn_boolean_t canonical;
+ } tests[] = {
+ { "", FALSE },
+ { ".", FALSE },
+ { "/", TRUE },
+ { "/a", TRUE },
+ { "/a/", FALSE },
+ { "//a", FALSE },
+ { "/a/b", TRUE },
+ { "/a//b", FALSE },
+ { "\\", FALSE },
+ { "\\a", FALSE },
+ { "/\\a", TRUE }, /* a single component */
+ { "/a\\", TRUE }, /* a single component */
+ { "/a\\b", TRUE }, /* a single component */
+ };
+ int i;
+
+ for (i = 0; i < COUNT_OF(tests); i++)
+ {
+ svn_boolean_t canonical
+ = svn_fspath__is_canonical(tests[i].path);
+
+ if (tests[i].canonical != canonical)
+ return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+ "svn_fspath__is_canonical(\"%s\") returned "
+ "\"%s\" expected \"%s\"",
+ tests[i].path,
+ canonical ? "TRUE" : "FALSE",
+ tests[i].canonical ? "TRUE" : "FALSE");
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_fspath_join(apr_pool_t *pool)
+{
+ int i;
+
+ static const char * const joins[][3] = {
+ { "/", "", "/" },
+ { "/", "d", "/d" },
+ { "/", "d/e", "/d/e" },
+ { "/abc", "", "/abc" },
+ { "/abc", "d", "/abc/d" },
+ { "/abc", "d/e", "/abc/d/e" },
+ };
+
+ for (i = 0; i < COUNT_OF(joins); i++ )
+ {
+ char *result = svn_fspath__join(joins[i][0], joins[i][1], pool);
+
+ SVN_TEST_STRING_ASSERT(result, joins[i][2]);
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_fspath_is_child(apr_pool_t *pool)
+{
+ int i, j;
+
+ static const char * const paths[] = {
+ "/",
+ "/f",
+ "/foo",
+ "/foo/bar",
+ "/foo/bars",
+ "/foo/bar/baz",
+ };
+
+ static const char * const
+ remainders[COUNT_OF(paths)][COUNT_OF(paths)] = {
+ { 0, "f", "foo", "foo/bar", "foo/bars", "foo/bar/baz" },
+ { 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, "bar", "bars", "bar/baz" },
+ { 0, 0, 0, 0, 0, "baz" },
+ { 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0 },
+ };
+
+ for (i = 0; i < COUNT_OF(paths); i++)
+ {
+ for (j = 0; j < COUNT_OF(paths); j++)
+ {
+ const char *remainder
+ = svn_fspath__is_child(paths[i], paths[j], pool);
+
+ SVN_TEST_STRING_ASSERT(remainder, remainders[i][j]);
+ }
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_fspath_dirname_basename_split(apr_pool_t *pool)
+{
+ int i;
+
+ static const struct {
+ const char *path;
+ const char *dirname;
+ const char *basename;
+ } tests[] = {
+ { "/", "/", "" },
+ { "/a", "/", "a" },
+ { "/abc", "/", "abc" },
+ { "/x/abc", "/x", "abc" },
+ { "/x/y/abc", "/x/y", "abc" },
+ };
+
+ for (i = 0; i < COUNT_OF(tests); i++)
+ {
+ const char *result_dirname, *result_basename;
+
+ result_dirname = svn_fspath__dirname(tests[i].path, pool);
+ SVN_TEST_STRING_ASSERT(result_dirname, tests[i].dirname);
+
+ result_basename = svn_fspath__basename(tests[i].path, pool);
+ SVN_TEST_STRING_ASSERT(result_basename, tests[i].basename);
+
+ svn_fspath__split(&result_dirname, &result_basename, tests[i].path,
+ pool);
+ SVN_TEST_STRING_ASSERT(result_dirname, tests[i].dirname);
+ SVN_TEST_STRING_ASSERT(result_basename, tests[i].basename);
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_fspath_get_longest_ancestor(apr_pool_t *pool)
+{
+ int i;
+
+ /* Paths to test and their expected results. Same as in
+ * test_relpath_get_longest_ancestor() but with '/' prefix. */
+ struct {
+ const char *path1;
+ const char *path2;
+ const char *result;
+ } tests[] = {
+ { "/foo", "/foo/bar", "/foo" },
+ { "/foo/bar", "/foo/bar", "/foo/bar" },
+ { "/", "/foo", "/" },
+ { "/", "/foo", "/" },
+ { "/", "/.bar", "/" },
+ { "/.bar", "/", "/" },
+ { "/foo/bar", "/foo", "/foo" },
+ { "/foo/bar", "/foo", "/foo" },
+ { "/rif", "/raf", "/" },
+ { "/foo", "/bar", "/" },
+ { "/foo", "/foo/bar", "/foo" },
+ { "/foo.", "/foo./.bar", "/foo." },
+ { "/", "/", "/" },
+ { "/http:/test", "/http:/test", "/http:/test" },
+ { "/http:/test", "/http:/taste", "/http:" },
+ { "/http:/test", "/http:/test/foo", "/http:/test" },
+ { "/http:/test", "/file:/test/foo", "/" },
+ { "/http:/test", "/http:/testF", "/http:" },
+ { "/file:/A/C", "/file:/B/D", "/file:" },
+ { "/file:/A/C", "/file:/A/D", "/file:/A" },
+ { "/X:/foo", "/X:", "/X:" },
+ { "/X:/folder1", "/X:/folder2", "/X:" },
+ { "/X:", "/X:foo", "/" },
+ { "/X:foo", "/X:bar", "/" },
+ };
+
+ for (i = 0; i < COUNT_OF(tests); i++)
+ {
+ const char *result;
+
+ result = svn_fspath__get_longest_ancestor(tests[i].path1, tests[i].path2,
+ pool);
+ SVN_TEST_STRING_ASSERT(tests[i].result, result);
+
+ /* changing the order of the paths should return the same result */
+ result = svn_fspath__get_longest_ancestor(tests[i].path2, tests[i].path1,
+ pool);
+ SVN_TEST_STRING_ASSERT(tests[i].result, result);
+ }
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
@@ -2959,5 +3150,15 @@ struct svn_test_descriptor_t test_funcs[
"test svn_uri_get_file_url_from_dirent"),
SVN_TEST_PASS2(test_dirent_is_under_root,
"test svn_dirent_is_under_root"),
+ SVN_TEST_PASS2(test_fspath_is_canonical,
+ "test svn_fspath__is_canonical"),
+ SVN_TEST_PASS2(test_fspath_join,
+ "test svn_fspath__join"),
+ SVN_TEST_PASS2(test_fspath_is_child,
+ "test svn_fspath__is_child"),
+ SVN_TEST_PASS2(test_fspath_dirname_basename_split,
+ "test svn_fspath__dirname/basename/split"),
+ SVN_TEST_PASS2(test_fspath_get_longest_ancestor,
+ "test svn_fspath__get_longest_ancestor"),
SVN_TEST_NULL
};
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c Thu Dec 2 21:13:35 2010
@@ -75,7 +75,8 @@
#define MD5_2 "5d41402abc4b2a76b9719d911017c592"
#define SHA1_1 "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d"
-#define I_TC_DATA "((conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
+#define F_TC_DATA "(conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
+#define G_TC_DATA "(conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
static const char * const TESTING_DATA = (
/* Load our test data.
@@ -262,7 +263,13 @@ static const char * const TESTING_DATA =
" null, null, null, null);"
"insert into actual_node values ("
" 1, 'I', '', null, null, null, null, null, 'changelist', null, "
- "'" I_TC_DATA "', null, null, null, null);"
+ " null, null, null, null, null);"
+ "insert into actual_node values ("
+ " 1, 'F', '', null, null, null, null, null, null, null, "
+ " '" F_TC_DATA "', null, null, null, null);"
+ "insert into actual_node values ("
+ " 1, 'G', '', null, null, null, null, null, null, null, "
+ " '" G_TC_DATA "', null, null, null, null);"
" "
"insert into nodes values ("
" 1, 'M', 0, '', 1, 'M', null, 'normal', "
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c Thu Dec 2 21:13:35 2010
@@ -75,7 +75,8 @@
#define MD5_1 "2d18c5e57e84c5b8a5e9a6e13fa394dc"
#define MD5_2 "5d41402abc4b2a76b9719d911017c592"
-#define I_TC_DATA "((conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
+#define F_TC_DATA "(conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
+#define G_TC_DATA "(conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
static const char * const TESTING_DATA = (
/* Load our test data.
@@ -262,7 +263,13 @@ static const char * const TESTING_DATA =
" null, null, null, null);"
"insert into actual_node values ("
" 1, 'I', '', null, null, null, null, null, 'changelist', null, "
- "'" I_TC_DATA "', null, null, null, null);"
+ " null, null, null, null, null);"
+ "insert into actual_node values ("
+ " 1, 'F', '', null, null, null, null, null, null, null, "
+ " '" F_TC_DATA "', null, null, null, null);"
+ "insert into actual_node values ("
+ " 1, 'G', '', null, null, null, null, null, null, null, "
+ " '" G_TC_DATA "', null, null, null, null);"
" "
"insert into nodes values ("
" 1, 'M', 0, '', 1, 'M', 1, 'normal', "
Modified: subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/op-depth-test.c?rev=1041583&r1=1041582&r2=1041583&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/op-depth-test.c Thu Dec 2 21:13:35 2010
@@ -21,6 +21,9 @@
* ====================================================================
*/
+/* To avoid warnings... */
+#define SVN_DEPRECATED
+
#include <apr_pools.h>
#include <apr_general.h>
@@ -231,6 +234,19 @@ wc_resolved(wc_baton_t *b, const char *p
return svn_client_resolved(wc_path(b, path), TRUE, ctx, b->pool);
}
+static svn_error_t *
+wc_move(wc_baton_t *b, const char *src, const char *dst)
+{
+ svn_client_ctx_t *ctx;
+ apr_array_header_t *paths = apr_array_make(b->pool, 1,
+ sizeof(const char *));
+
+ SVN_ERR(svn_client_create_context(&ctx, b->pool));
+ APR_ARRAY_PUSH(paths, const char *) = wc_path(b, src);
+ return svn_client_move6(paths, wc_path(b, dst),
+ FALSE, FALSE, NULL, NULL, NULL, ctx, b->pool);
+}
+
/* Create the Greek tree on disk in the WC, and commit it. */
static svn_error_t *
add_and_commit_greek_tree(wc_baton_t *b)
@@ -322,12 +338,6 @@ typedef struct {
* Append an error message to BATON->errors if they differ or are not both
* present.
*
- * If the FOUND row has field values that should have been elided
- * (because they match the parent row), then do so now. We want to ignore
- * any such lack of elision, for the purposes of these tests, because the
- * method of copying in use (at the time this tweak is introduced) does
- * calculate these values itself, it simply copies from the source rows.
- *
* Implements svn_hash_diff_func_t. */
static svn_error_t *
compare_nodes_rows(const void *key, apr_ssize_t klen,
@@ -337,37 +347,6 @@ compare_nodes_rows(const void *key, apr_
comparison_baton_t *b = baton;
nodes_row_t *expected = apr_hash_get(b->expected_hash, key, klen);
nodes_row_t *found = apr_hash_get(b->found_hash, key, klen);
- nodes_row_t elided;
-
- /* If the FOUND row has field values that should have been elided
- * (because they match the parent row), then do so now. */
- if (found && found->op_depth > 0 && found->repo_relpath)
- {
- const char *parent_relpath, *name, *parent_key;
- nodes_row_t *parent_found;
-
- svn_relpath_split(&parent_relpath, &name, found->local_relpath,
- b->scratch_pool);
- parent_key = apr_psprintf(b->scratch_pool, "%d %s",
- found->op_depth, parent_relpath);
- parent_found = apr_hash_get(b->found_hash, parent_key,
- APR_HASH_KEY_STRING);
- if (parent_found && parent_found->op_depth > 0
- && parent_found->repo_relpath
- && found->op_depth == parent_found->op_depth
- && found->repo_revnum == parent_found->repo_revnum
- && strcmp(found->repo_relpath,
- svn_relpath_join(parent_found->repo_relpath, name,
- b->scratch_pool)) == 0)
- {
- /* Iterating in hash order, which is arbitrary, so only make
- changes in a local copy */
- elided = *found;
- found = &elided;
- found->repo_relpath = NULL;
- found->repo_revnum = SVN_INVALID_REVNUM;
- }
- }
if (! expected)
{
@@ -523,8 +502,8 @@ wc_wc_copies(wc_baton_t *b)
/* base dir */
{ source_base_dir, "A/C/copy2", {
{ 3, "", "normal", 1, source_base_dir },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM }
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" }
} },
/* added file */
@@ -546,18 +525,18 @@ wc_wc_copies(wc_baton_t *b)
/* copied dir */
{ source_copied_dir, "A/C/copy6", {
{ 3, "", "normal", 1, source_base_dir },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM }
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" }
} },
/* copied tree with everything in it */
{ source_everything, "A/C/copy7", {
{ 3, "", "normal", 1, source_everything },
- { 3, "lambda", "normal", NO_COPY_FROM },
- { 3, "E", "normal", NO_COPY_FROM },
- { 3, "E/alpha", "normal", NO_COPY_FROM },
- { 3, "E/beta", "normal", NO_COPY_FROM },
- { 3, "F", "normal", NO_COPY_FROM },
+ { 3, "lambda", "normal", 1, "A/B/lambda" },
+ { 3, "E", "normal", 1, "A/B/E" },
+ { 3, "E/alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "E/beta", "normal", 1, "A/B/E/beta" },
+ { 3, "F", "normal", 1, "A/B/F" },
/* Each add is an op_root */
{ 4, "file-added", "normal", NO_COPY_FROM },
{ 4, "D-added", "normal", NO_COPY_FROM },
@@ -565,16 +544,16 @@ wc_wc_copies(wc_baton_t *b)
/* Each copied-copy subtree is an op_root */
{ 4, "lambda-copied", "normal", 1, source_base_file },
{ 4, "E-copied", "normal", 1, source_base_dir },
- { 4, "E-copied/alpha", "normal", NO_COPY_FROM },
- { 4, "E-copied/beta", "normal", NO_COPY_FROM }
+ { 4, "E-copied/alpha", "normal", 1, "A/B/E/alpha" },
+ { 4, "E-copied/beta", "normal", 1, "A/B/E/beta" }
} },
/* dir onto a schedule-delete file */
{ source_base_dir, "A/D/gamma", {
{ 0, "", "normal", 1, "A/D/gamma" },
{ 3, "", "normal", 1, source_base_dir },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM }
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" }
} },
/* file onto a schedule-delete dir */
@@ -645,8 +624,8 @@ repo_wc_copies(wc_baton_t *b)
/* dir onto nothing */
{ "A/B/E", "A/C/copy2", {
{ 3, "", "normal", 1, "A/B/E" },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM },
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" },
} },
/* file onto a schedule-delete file */
@@ -665,16 +644,16 @@ repo_wc_copies(wc_baton_t *b)
{ 3, "pi", "base-deleted", NO_COPY_FROM },
{ 3, "rho", "base-deleted", NO_COPY_FROM },
{ 3, "tau", "base-deleted", NO_COPY_FROM },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM },
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" },
} },
/* dir onto a schedule-delete file */
{ "A/B/E", "A/D/gamma", {
{ 0, "", "normal", 1, "A/D/gamma" },
{ 3, "", "normal", 1, "A/B/E" },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM },
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" },
} },
/* file onto a schedule-delete dir */
@@ -960,8 +939,8 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -971,12 +950,12 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 3, "A/B-copied/E", "normal", 1, "A/D/G" },
- { 3, "A/B-copied/E/pi", "normal", NO_COPY_FROM},
- { 3, "A/B-copied/E/rho", "normal", NO_COPY_FROM},
- { 3, "A/B-copied/E/tau", "normal", NO_COPY_FROM},
+ { 3, "A/B-copied/E/pi", "normal", 1, "A/D/G/pi" },
+ { 3, "A/B-copied/E/rho", "normal", 1, "A/D/G/rho" },
+ { 3, "A/B-copied/E/tau", "normal", 1, "A/D/G/tau" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -987,12 +966,12 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 3, "A/B-copied/E", "normal", 1, "A/D/G" },
- { 3, "A/B-copied/E/pi", "normal", NO_COPY_FROM},
- { 3, "A/B-copied/E/rho", "not-present", NO_COPY_FROM},
- { 3, "A/B-copied/E/tau", "normal", NO_COPY_FROM},
+ { 3, "A/B-copied/E/pi", "normal", 1, "A/D/G/pi" },
+ { 3, "A/B-copied/E/rho", "not-present", 1, "A/D/G/rho" },
+ { 3, "A/B-copied/E/tau", "normal", 1, "A/D/G/tau" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -1003,8 +982,8 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -1227,7 +1206,7 @@ insert_dirs(wc_baton_t *b,
return SVN_NO_ERROR;
}
-static int count_rows(nodes_row_t *rows)
+static apr_int64_t count_rows(nodes_row_t *rows)
{
nodes_row_t *first = rows;
while(rows->local_relpath)
@@ -1245,7 +1224,8 @@ base_dir_insert_remove(wc_baton_t *b,
nodes_row_t *after;
const char *dir_abspath = svn_path_join(b->wc_abspath, local_relpath,
b->pool);
- int i, num_before = count_rows(before), num_added = count_rows(added);
+ int i;
+ apr_int64_t num_before = count_rows(before), num_added = count_rows(added);
SVN_ERR(insert_dirs(b, before));
@@ -1598,7 +1578,7 @@ test_temp_op_make_copy(const svn_test_op
b.pool = pool;
SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
- "base_dir_insert_remove", opts, pool));
+ "temp_op_make_copy", opts, pool));
SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
{
@@ -1628,9 +1608,9 @@ test_temp_op_make_copy(const svn_test_op
{ 2, "A/B/C", "base-deleted", NO_COPY_FROM },
{ 3, "A/B/C", "normal", NO_COPY_FROM },
{ 2, "A/F", "normal", 1, "S2" },
- { 2, "A/F/G", "normal", NO_COPY_FROM },
- { 2, "A/F/H", "not-present", NO_COPY_FROM },
- { 2, "A/F/E", "base-deleted", NO_COPY_FROM },
+ { 2, "A/F/G", "normal", 1, "S2/G" },
+ { 2, "A/F/H", "not-present", 1, "S2/H" },
+ { 2, "A/F/E", "base-deleted", 2, "A/F/E" },
{ 0 }
};
/* / norm -
@@ -1656,19 +1636,19 @@ test_temp_op_make_copy(const svn_test_op
{ 0, "A/X", "normal", 2, "A/X" },
{ 0, "A/X/Y", "incomplete", 2, "A/X/Y" },
{ 1, "A", "normal", 2, "A" },
- { 1, "A/B", "base-deleted", NO_COPY_FROM },
- { 1, "A/B/C", "base-deleted", NO_COPY_FROM },
- { 1, "A/F", "base-deleted", NO_COPY_FROM },
- { 1, "A/F/G", "base-deleted", NO_COPY_FROM },
- { 1, "A/F/H", "base-deleted", NO_COPY_FROM },
- { 1, "A/F/E", "base-deleted", NO_COPY_FROM },
- { 1, "A/X", "normal", NO_COPY_FROM },
- { 1, "A/X/Y", "incomplete", NO_COPY_FROM },
+ { 1, "A/B", "base-deleted", 2, "A/B" },
+ { 1, "A/B/C", "base-deleted", 2, "A/B/C" },
+ { 1, "A/F", "base-deleted", 2, "A/F" },
+ { 1, "A/F/G", "base-deleted", 2, "A/F/G" },
+ { 1, "A/F/H", "base-deleted", 2, "A/F/H" },
+ { 1, "A/F/E", "base-deleted", 2, "A/F/E" },
+ { 1, "A/X", "normal", 2, "A/X" },
+ { 1, "A/X/Y", "incomplete", 2, "A/X/Y" },
{ 2, "A/B", "normal", NO_COPY_FROM },
{ 3, "A/B/C", "normal", NO_COPY_FROM },
{ 2, "A/F", "normal", 1, "S2" },
- { 2, "A/F/G", "normal", NO_COPY_FROM },
- { 2, "A/F/H", "not-present", NO_COPY_FROM },
+ { 2, "A/F/G", "normal", 1, "S2/G" },
+ { 2, "A/F/H", "not-present", 1, "S2/H" },
{ 0 }
};
@@ -1678,6 +1658,98 @@ test_temp_op_make_copy(const svn_test_op
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_wc_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ wc_baton_t b;
+
+ b.pool = pool;
+ SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
+ "wc_move", opts, pool));
+ SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ SVN_ERR(wc_move(&b, "A/B/C", "A/B/C-move"));
+ {
+ nodes_row_t rows[] = {
+ { 0, "", "normal", 1, "" },
+ { 0, "A", "normal", 1, "A" },
+ { 0, "A/B", "normal", 1, "A/B" },
+ { 0, "A/B/C", "normal", 1, "A/B/C" },
+ { 3, "A/B/C", "base-deleted", NO_COPY_FROM },
+ { 3, "A/B/C-move", "normal", 1, "A/B/C" },
+ { 0 }
+ };
+ SVN_ERR(check_db_rows(&b, "", rows));
+ }
+
+ SVN_ERR(wc_move(&b, "A/B", "A/B-move"));
+ {
+ nodes_row_t rows[] = {
+ { 0, "", "normal", 1, "" },
+ { 0, "A", "normal", 1, "A" },
+ { 0, "A/B", "normal", 1, "A/B" },
+ { 0, "A/B/C", "normal", 1, "A/B/C" },
+ { 2, "A/B", "base-deleted", NO_COPY_FROM },
+ { 2, "A/B/C", "base-deleted", NO_COPY_FROM },
+ { 2, "A/B-move", "normal", 1, "A/B" },
+ { 2, "A/B-move/C", "not-present", 1, "A/B/C" },
+ { 3, "A/B-move/C-move", "normal", 1, "A/B/C" },
+ { 0 }
+ };
+ SVN_ERR(check_db_rows(&b, "", rows));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_mixed_rev_copy(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ wc_baton_t b;
+
+ b.pool = pool;
+ SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
+ "mixed_rev_copy", opts, pool));
+ SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_commit(&b, ""));
+
+ SVN_ERR(wc_copy(&b, "A", "X"));
+ {
+ nodes_row_t rows[] = {
+ { 1, "X", "normal", 1, "A" },
+ { 1, "X/B", "normal", 2, "A/B" },
+ { 1, "X/B/C", "normal", 3, "A/B/C" },
+ { 0 }
+ };
+ SVN_ERR(check_db_rows(&b, "X", rows));
+ }
+
+ SVN_ERR(wc_copy(&b, "A/B", "X/Y"));
+ {
+ nodes_row_t rows[] = {
+ { 1, "X", "normal", 1, "A" },
+ { 1, "X/B", "normal", 2, "A/B" },
+ { 1, "X/B/C", "normal", 3, "A/B/C" },
+ { 2, "X/Y", "normal", 2, "A/B" },
+ { 2, "X/Y/C", "normal", 3, "A/B/C" },
+ { 0 }
+ };
+ SVN_ERR(check_db_rows(&b, "X", rows));
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* ---------------------------------------------------------------------- */
/* The list of test functions */
@@ -1711,11 +1783,16 @@ struct svn_test_descriptor_t test_funcs[
SVN_TEST_OPTS_WIMP(test_adds_change_kind,
"test_adds_change_kind",
"needs op_depth"),
- SVN_TEST_OPTS_WIMP(test_base_dir_insert_remove,
- "test_base_dir_insert_remove",
- "needs op_depth"),
+ SVN_TEST_OPTS_PASS(test_base_dir_insert_remove,
+ "test_base_dir_insert_remove"),
SVN_TEST_OPTS_WIMP(test_temp_op_make_copy,
"test_temp_op_make_copy",
"needs op_depth"),
+ SVN_TEST_OPTS_WIMP(test_wc_move,
+ "test_wc_move",
+ "needs op_depth"),
+ SVN_TEST_OPTS_WIMP(test_mixed_rev_copy,
+ "test_mixed_rev_copy",
+ "needs op_depth"),
SVN_TEST_NULL
};