You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/15 10:52:18 UTC
svn commit: r1532250 [33/37] - in /subversion/branches/cache-server: ./
build/ build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ contrib/client-side/emacs/ contrib/hook-scripts/
contrib/server-side/fsfsfixer/ contrib/se...
Modified: subversion/branches/cache-server/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/log_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/log_tests.py Tue Oct 15 08:52:06 2013
@@ -33,7 +33,7 @@ from svntest import wc
from svntest.main import server_has_mergeinfo
from svntest.main import SVN_PROP_MERGEINFO
-from merge_tests import set_up_branch
+from svntest.mergetrees import set_up_branch
from diff_tests import make_diff_header, make_no_diff_deleted_header
# (abbreviation)
@@ -1875,14 +1875,12 @@ def merge_sensitive_log_reverse_merges(s
# Merge -c3,5 from A to A_COPY, commit as r7
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', '-c3,5', A_path, A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Merge -c3,5 from A to A_COPY',
- wc_dir)
+ sbox.simple_commit(message='Merge -c3,5 from A to A_COPY')
# Merge -c-3,-5,4,6 from A to A_COPY, commit as r8
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', '-c-3,4,-5,6', A_path, A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Merge -c-3,-5,4,6 from A to A_COPY',
- wc_dir)
+ sbox.simple_commit(message='Merge -c-3,-5,4,6 from A to A_COPY')
# Update so
svntest.main.run_svn(None, 'up', wc_dir)
@@ -1938,58 +1936,55 @@ def merge_sensitive_log_ignores_cyclic_m
# Make an edit on the "branch" to A_COPY/mu, commit as r7.
svntest.main.file_write(mu_COPY_path, "Branch edit.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'Branch edit', wc_dir)
+ sbox.simple_commit(message='Branch edit')
# Make an edit on both the "trunk" and the "branch", commit as r8.
svntest.main.file_write(chi_path, "Trunk edit.\n")
svntest.main.file_write(tau_COPY_path, "Branch edit.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'Branch and trunk edits in one rev',
- wc_dir)
+ sbox.simple_commit(message='Branch and trunk edits in one rev')
# Sync merge A to A_COPY, commit as r9
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Sync merge A to A_COPY', wc_dir)
+ sbox.simple_commit(message='Sync merge A to A_COPY')
# Reintegrate A_COPY to A, commit as r10
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', '--reintegrate',
sbox.repo_url + '/A_COPY', A_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Reintegrate A_COPY to A', wc_dir)
+ sbox.simple_commit(message='Reintegrate A_COPY to A')
# Do a --record-only merge of r10 from A to A_COPY, commit as r11.
# This will allow us to continue using the branch without deleting it.
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m',
- '--record-only merge r10 from A to A_COPY', wc_dir)
+ sbox.simple_commit(message='--record-only merge r10 from A to A_COPY')
# Make an edit on the "branch"; add A_COPY/C and A_COPY/C/Z/nu,
# commit as r12.
svntest.main.run_svn(None, 'mkdir', Z_COPY_path)
svntest.main.file_write(nu_COPY_path, "A new branch file.\n")
svntest.main.run_svn(None, 'add', nu_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Branch edit: Add a subtree', wc_dir)
+ sbox.simple_commit(message='Branch edit: Add a subtree')
# Make an edit on the "trunk"; add A/C/X and A/C/X/kappa,
# commit as r13.
svntest.main.run_svn(None, 'mkdir', X_path)
svntest.main.file_write(kappa_path, "A new trunk file.\n")
svntest.main.run_svn(None, 'add', kappa_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Trunk edit: Add a subtree', wc_dir)
+ sbox.simple_commit(message='Trunk edit: Add a subtree')
svntest.main.run_svn(None, 'up', wc_dir)
# Sync merge A to A_COPY, commit as r14
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Sync merge A to A_COPY', wc_dir)
+ sbox.simple_commit(message='Sync merge A to A_COPY')
# Reintegrate A_COPY to A, commit as r15
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', '--reintegrate',
sbox.repo_url + '/A_COPY', A_path)
- svntest.main.run_svn(None, 'ci', '-m', '2nd reintegrate of A_COPY to A',
- wc_dir)
+ sbox.simple_commit(message='2nd reintegrate of A_COPY to A')
# Run 'svn log -g A'. We expect to see r13, r10, r6, r5, r4, and r3 only
# once, as part of A's own history, not as merged in from A_COPY.
@@ -2090,17 +2085,17 @@ def merge_sensitive_log_copied_path_inhe
# r3 - Modify a file (A_COPY/D/gamma) on the branch
svntest.main.file_write(gamma_COPY_path, "Branch edit.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'Branch edit', wc_dir)
+ sbox.simple_commit(message='Branch edit')
# r4 - Reintegrate A_COPY to A
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', '--reintegrate',
sbox.repo_url + '/A_COPY', A_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Reintegrate A_COPY to A', wc_dir)
+ sbox.simple_commit(message='Reintegrate A_COPY to A')
# r5 - Move file modified by reintegrate (A/D/gamma to A/C/gamma).
svntest.main.run_svn(None, 'move', old_gamma_path, new_gamma_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Move file', wc_dir)
+ sbox.simple_commit(message='Move file')
# 'svn log -g --stop-on-copy ^/A/C/gamma' hould return *only* r5
# Previously this test failed because the change in gamma's inherited
@@ -2189,6 +2184,7 @@ def log_diff(sbox):
compare_diff_output(r9diff, log_chain[1]['diff_lines'])
compare_diff_output(r8diff, log_chain[2]['diff_lines'])
+@Skip(svntest.main.is_fs_type_fsx)
def log_xml_old(sbox):
"log --xml shows kind for old style repository"
@@ -2369,7 +2365,6 @@ def merge_sensitive_log_with_search(sbox
# Test for issue #4355 'svn_client_log5 broken with multiple revisions
# which span a rename'.
@Issue(4355)
-@XFail()
@SkipUnless(server_has_mergeinfo)
def log_multiple_revs_spanning_rename(sbox):
"log for multiple revs which span a rename"
@@ -2403,6 +2398,7 @@ def log_multiple_revs_spanning_rename(sb
svntest.main.file_write(msg_file, msg)
svntest.main.file_append(mu_path2, "4")
svntest.main.run_svn(None, 'ci', '-F', msg_file, wc_dir)
+ svntest.main.run_svn(None, 'up', wc_dir)
# Check that log can handle a revision range that spans a rename.
exit_code, output, err = svntest.actions.run_and_verify_svn(
@@ -2456,7 +2452,8 @@ def log_multiple_revs_spanning_rename(sb
log_chain = parse_log_output(output)
check_log_chain(log_chain, [1,4,3,2])
- # As above, but revision ranges from younger to older revs fail:
+ # As above, but revision ranges from younger to older. Previously this
+ # failed with:
#
# >svn log ^/trunk -r1:1 -r2:4
# ------------------------------------------------------------------------
Modified: subversion/branches/cache-server/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/merge_authz_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/merge_authz_tests.py Tue Oct 15 08:52:06 2013
@@ -41,8 +41,8 @@ Issues = svntest.testcase.Issues_deco
Issue = svntest.testcase.Issue_deco
Wimp = svntest.testcase.Wimp_deco
-from merge_tests import set_up_branch
-from merge_tests import expected_merge_output
+from svntest.mergetrees import set_up_branch
+from svntest.mergetrees import expected_merge_output
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import write_restrictive_svnserve_conf
from svntest.main import write_authz_file
@@ -659,7 +659,7 @@ def reintegrate_fails_if_no_root_access(
' U ' + A_COPY_path + '\n'])
svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge',
sbox.repo_url + '/A', A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'synch A_COPY with A', wc_dir)
+ sbox.simple_commit(message='synch A_COPY with A')
# Update so we are ready for reintegrate.
svntest.main.run_svn(None, 'up', wc_dir)
Modified: subversion/branches/cache-server/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/merge_automatic_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/merge_automatic_tests.py Tue Oct 15 08:52:06 2013
@@ -43,10 +43,10 @@ Wimp = svntest.testcase.Wimp_deco
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
-from merge_tests import local_path
-from merge_tests import expected_merge_output
-from merge_tests import svn_merge
-from merge_tests import set_up_branch
+from svntest.mergetrees import local_path
+from svntest.mergetrees import expected_merge_output
+from svntest.mergetrees import svn_merge
+from svntest.mergetrees import set_up_branch
#----------------------------------------------------------------------
Modified: subversion/branches/cache-server/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/merge_reintegrate_tests.py Tue Oct 15 08:52:06 2013
@@ -44,8 +44,8 @@ exp_noop_up_out = svntest.actions.expect
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
-from merge_tests import set_up_branch
-from merge_tests import expected_merge_output
+from svntest.mergetrees import set_up_branch
+from svntest.mergetrees import expected_merge_output
#----------------------------------------------------------------------
def run_reintegrate(src_url, tgt_path):
@@ -2584,13 +2584,13 @@ def reintegrate_replaced_source(sbox):
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path,
'-c3')
- svntest.main.run_svn(None, 'ci', '-m', 'Merge r3 from A to A_COPY', wc_dir)
+ sbox.simple_commit(message='Merge r3 from A to A_COPY')
# r8 - Merge r4 from A to A_COPY
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path,
'-c4')
- svntest.main.run_svn(None, 'ci', '-m', 'Merge r4 from A to A_COPY', wc_dir)
+ sbox.simple_commit(message='Merge r4 from A to A_COPY')
# r9 - Merge r5 from A to A_COPY. Make an additional edit to
# A_COPY/B/E/beta.
@@ -2598,7 +2598,7 @@ def reintegrate_replaced_source(sbox):
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path,
'-c5')
svntest.main.file_write(beta_COPY_path, "Branch edit mistake.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'Merge r5 from A to A_COPY', wc_dir)
+ sbox.simple_commit(message='Merge r5 from A to A_COPY')
# r10 - Delete A_COPY and replace it with A_COPY@8. This removes the edit
# we made above in r9 to A_COPY/B/E/beta.
@@ -2606,19 +2606,17 @@ def reintegrate_replaced_source(sbox):
svntest.main.run_svn(None, 'delete', A_COPY_path)
svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A_COPY@8',
A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Replace A_COPY with A_COPY@8',
- wc_dir)
+ sbox.simple_commit(message='Replace A_COPY with A_COPY@8')
# r11 - Make an edit on A_COPY/mu.
svntest.main.file_write(mu_COPY_path, "Branch edit.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'Branch edit',
- wc_dir)
+ sbox.simple_commit(message='Branch edit')
# r12 - Do a final sync merge of A to A_COPY in preparation for
# reintegration.
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Sycn A_COPY with A', wc_dir)
+ sbox.simple_commit(message='Sync A_COPY with A')
# Reintegrate A_COPY to A. The resulting mergeinfo should be
# '/A_COPY:2-8,10-12' because of the replacement which removed /A_COPY:9
Modified: subversion/branches/cache-server/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/merge_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/merge_tests.py Tue Oct 15 08:52:06 2013
@@ -51,86 +51,16 @@ from svntest.actions import make_conflic
from svntest.actions import inject_conflict_into_expected_state
from svntest.verify import RegexListOutput
-def expected_merge_output(rev_ranges, additional_lines=[], foreign=False,
- elides=False, two_url=False, target=None,
- text_conflicts=0, prop_conflicts=0, tree_conflicts=0,
- text_resolved=0, prop_resolved=0, tree_resolved=0,
- skipped_paths=0):
- """Generate an (inefficient) regex representing the expected merge
- output and mergeinfo notifications from REV_RANGES and ADDITIONAL_LINES.
-
- REV_RANGES is a list of revision ranges for which mergeinfo is being
- recorded. Each range is of the form [start, end] (where both START and
- END are inclusive, unlike in '-rX:Y') or the form [single_rev] (which is
- like '-c SINGLE_REV'). If REV_RANGES is None then only the standard
- notification for a 3-way merge is expected.
-
- ADDITIONAL_LINES is a list of strings to match the other lines of output;
- these are basically regular expressions except that backslashes will be
- escaped herein. If ADDITIONAL_LINES is a single string, it is interpreted
- the same as a list containing that string.
-
- If ELIDES is true, add to the regex an expression representing elision
- notification. If TWO_URL is true, tweak the regex to expect the
- appropriate mergeinfo notification for a 3-way merge.
-
- TARGET is the local path to the target, as it should appear in
- notifications; if None, it is not checked.
-
- TEXT_CONFLICTS, PROP_CONFLICTS, TREE_CONFLICTS and SKIPPED_PATHS specify
- the number of each kind of conflict to expect.
- """
-
- if rev_ranges is None:
- lines = [svntest.main.merge_notify_line(None, None, False, foreign)]
- else:
- lines = []
- for rng in rev_ranges:
- start_rev = rng[0]
- if len(rng) > 1:
- end_rev = rng[1]
- else:
- end_rev = None
- lines += [svntest.main.merge_notify_line(start_rev, end_rev,
- True, foreign, target)]
- lines += [svntest.main.mergeinfo_notify_line(start_rev, end_rev, target)]
-
- if (elides):
- lines += ["--- Eliding mergeinfo from .*\n"]
-
- if (two_url):
- lines += ["--- Recording mergeinfo for merge between repository URLs .*\n"]
-
- # Address "The Backslash Plague"
- #
- # If ADDITIONAL_LINES are present there are possibly paths in it with
- # multiple components and on Windows these components are separated with
- # '\'. These need to be escaped properly in the regexp for the match to
- # work correctly. See http://aspn.activestate.com/ASPN/docs/ActivePython
- # /2.2/howto/regex/regex.html#SECTION000420000000000000000.
- if isinstance(additional_lines, str):
- additional_lines = [additional_lines]
- if sys.platform == 'win32':
- additional_lines = [line.replace("\\", "\\\\") for line in additional_lines]
- lines += additional_lines
-
- lines += svntest.main.summary_of_conflicts(
- text_conflicts, prop_conflicts, tree_conflicts,
- text_resolved, prop_resolved, tree_resolved,
- skipped_paths,
- as_regex=True)
-
- return "|".join(lines)
-
-def check_mergeinfo_recursively(root_path, subpaths_mergeinfo):
- """Check that the mergeinfo properties on and under ROOT_PATH are those in
- SUBPATHS_MERGEINFO, a {path: mergeinfo-prop-val} dictionary."""
- expected = svntest.verify.UnorderedOutput(
- [path + ' - ' + subpaths_mergeinfo[path] + '\n'
- for path in subpaths_mergeinfo])
- svntest.actions.run_and_verify_svn(None, expected, [],
- 'propget', '-R', SVN_PROP_MERGEINFO,
- root_path)
+from svntest.mergetrees import expected_merge_output, \
+ check_mergeinfo_recursively, \
+ set_up_dir_replace, \
+ set_up_branch, \
+ local_path, \
+ svn_mkfile, \
+ svn_modfile, \
+ svn_copy, \
+ svn_merge, \
+ noninheritable_mergeinfo_test_set_up
######################################################################
# Tests
@@ -726,7 +656,7 @@ def simple_property_merges(sbox):
'E/alpha.prej'
: Item(error_message('foo', 'foo_val', 'mod_foo')),
'E/beta.prej'
- : Item(error_message('foo', 'foo?\\129val', 'mod?\\129foo')),
+ : Item(error_message('foo', 'foo?\\81val', 'mod?\\81foo')),
})
expected_disk.tweak('E', 'E/alpha', props={'bar' : 'bar_val'})
expected_disk.tweak('E/beta', props={'bar' : 'bar\201val'})
@@ -2346,118 +2276,6 @@ def merge_prop_change_to_deleted_target(
'-r1:2', '--ignore-ancestry', '.')
#----------------------------------------------------------------------
-def set_up_dir_replace(sbox):
- """Set up the working copy for directory replace tests, creating
- directory 'A/B/F/foo' with files 'new file' and 'new file2' within
- it (r2), and merging 'foo' onto 'C' (r3), then deleting 'A/B/F/foo'
- (r4)."""
-
- sbox.build()
- wc_dir = sbox.wc_dir
-
- C_path = sbox.ospath('A/C')
- F_path = sbox.ospath('A/B/F')
- F_url = sbox.repo_url + '/A/B/F'
-
- foo_path = os.path.join(F_path, 'foo')
- new_file = os.path.join(foo_path, "new file")
- new_file2 = os.path.join(foo_path, "new file 2")
-
- # Make directory foo in F, and add some files within it.
- svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', foo_path)
- svntest.main.file_append(new_file, "Initial text in new file.\n")
- svntest.main.file_append(new_file2, "Initial text in new file 2.\n")
- svntest.main.run_svn(None, "add", new_file)
- svntest.main.run_svn(None, "add", new_file2)
-
- # Commit all the new content, creating r2.
- expected_output = wc.State(wc_dir, {
- 'A/B/F/foo' : Item(verb='Adding'),
- 'A/B/F/foo/new file' : Item(verb='Adding'),
- 'A/B/F/foo/new file 2' : Item(verb='Adding'),
- })
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/B/F/foo' : Item(status=' ', wc_rev=2),
- 'A/B/F/foo/new file' : Item(status=' ', wc_rev=2),
- 'A/B/F/foo/new file 2' : Item(status=' ', wc_rev=2),
- })
- svntest.actions.run_and_verify_commit(wc_dir,
- expected_output,
- expected_status,
- None, wc_dir)
-
- # Merge foo onto C
- expected_output = wc.State(C_path, {
- 'foo' : Item(status='A '),
- 'foo/new file' : Item(status='A '),
- 'foo/new file 2' : Item(status='A '),
- })
- expected_mergeinfo_output = wc.State(C_path, {
- '' : Item(status=' U'),
- })
- expected_elision_output = wc.State(C_path, {
- })
- expected_disk = wc.State('', {
- '' : Item(props={SVN_PROP_MERGEINFO : '/A/B/F:2'}),
- 'foo' : Item(),
- 'foo/new file' : Item("Initial text in new file.\n"),
- 'foo/new file 2' : Item("Initial text in new file 2.\n"),
- })
- expected_status = wc.State(C_path, {
- '' : Item(status=' M', wc_rev=1),
- 'foo' : Item(status='A ', wc_rev='-', copied='+'),
- 'foo/new file' : Item(status=' ', wc_rev='-', copied='+'),
- 'foo/new file 2' : Item(status=' ', wc_rev='-', copied='+'),
- })
- expected_skip = wc.State(C_path, { })
- svntest.actions.run_and_verify_merge(C_path, '1', '2', F_url, None,
- expected_output,
- expected_mergeinfo_output,
- expected_elision_output,
- expected_disk,
- expected_status,
- expected_skip,
- None, None, None, None, None, 1)
- # Commit merge of foo onto C, creating r3.
- expected_output = svntest.wc.State(wc_dir, {
- 'A/C' : Item(verb='Sending'),
- 'A/C/foo' : Item(verb='Adding'),
- })
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/B/F/foo' : Item(status=' ', wc_rev=2),
- 'A/C' : Item(status=' ', wc_rev=3),
- 'A/B/F/foo/new file' : Item(status=' ', wc_rev=2),
- 'A/B/F/foo/new file 2' : Item(status=' ', wc_rev=2),
- 'A/C/foo' : Item(status=' ', wc_rev=3),
- 'A/C/foo/new file' : Item(status=' ', wc_rev=3),
- 'A/C/foo/new file 2' : Item(status=' ', wc_rev=3),
-
- })
- svntest.actions.run_and_verify_commit(wc_dir,
- expected_output,
- expected_status,
- None, wc_dir)
-
- # Delete foo on F, creating r4.
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', foo_path)
- expected_output = svntest.wc.State(wc_dir, {
- 'A/B/F/foo' : Item(verb='Deleting'),
- })
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/C' : Item(status=' ', wc_rev=3),
- 'A/C/foo' : Item(status=' ', wc_rev=3),
- 'A/C/foo/new file' : Item(status=' ', wc_rev=3),
- 'A/C/foo/new file 2' : Item(status=' ', wc_rev=3),
- })
- svntest.actions.run_and_verify_commit(wc_dir,
- expected_output,
- expected_status,
- None, wc_dir)
-
-#----------------------------------------------------------------------
# A merge that replaces a directory
# Tests for Issue #2144 and Issue #2607
@SkipUnless(server_has_mergeinfo)
@@ -4479,154 +4297,6 @@ def obey_reporter_api_semantics_while_do
None, 1)
#----------------------------------------------------------------------
-def set_up_branch(sbox, branch_only = False, nbr_of_branches = 1):
- '''Starting with standard greek tree, copy 'A' NBR_OF_BRANCHES times
- to A_COPY, A_COPY_2, A_COPY_3, and so on. Then, unless BRANCH_ONLY is
- true, make four modifications (setting file contents to "New content")
- under A:
- r(2 + NBR_OF_BRANCHES) - A/D/H/psi
- r(3 + NBR_OF_BRANCHES) - A/D/G/rho
- r(4 + NBR_OF_BRANCHES) - A/B/E/beta
- r(5 + NBR_OF_BRANCHES) - A/D/H/omega
- Return (expected_disk, expected_status).'''
-
- # With the default parameters, the branching looks like this:
- #
- # A -1-----3-4-5-6--
- # \
- # A_COPY 2-----------
-
- wc_dir = sbox.wc_dir
-
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_disk = svntest.main.greek_state.copy()
-
- def copy_A(dest_name, rev):
- expected = svntest.verify.UnorderedOutput(
- ["A " + os.path.join(wc_dir, dest_name, "B") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "lambda") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E", "alpha") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E", "beta") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "F") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "mu") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "C") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "gamma") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "pi") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "rho") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "tau") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "chi") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "omega") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "psi") + "\n",
- "Checked out revision " + str(rev - 1) + ".\n",
- "A " + os.path.join(wc_dir, dest_name) + "\n"])
- expected_status.add({
- dest_name + "/B" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/lambda" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E/alpha" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E/beta" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/F" : Item(status=' ', wc_rev=rev),
- dest_name + "/mu" : Item(status=' ', wc_rev=rev),
- dest_name + "/C" : Item(status=' ', wc_rev=rev),
- dest_name + "/D" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/gamma" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/pi" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/rho" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/tau" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/chi" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/omega" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/psi" : Item(status=' ', wc_rev=rev),
- dest_name : Item(status=' ', wc_rev=rev)})
- expected_disk.add({
- dest_name : Item(),
- dest_name + '/B' : Item(),
- dest_name + '/B/lambda' : Item("This is the file 'lambda'.\n"),
- dest_name + '/B/E' : Item(),
- dest_name + '/B/E/alpha' : Item("This is the file 'alpha'.\n"),
- dest_name + '/B/E/beta' : Item("This is the file 'beta'.\n"),
- dest_name + '/B/F' : Item(),
- dest_name + '/mu' : Item("This is the file 'mu'.\n"),
- dest_name + '/C' : Item(),
- dest_name + '/D' : Item(),
- dest_name + '/D/gamma' : Item("This is the file 'gamma'.\n"),
- dest_name + '/D/G' : Item(),
- dest_name + '/D/G/pi' : Item("This is the file 'pi'.\n"),
- dest_name + '/D/G/rho' : Item("This is the file 'rho'.\n"),
- dest_name + '/D/G/tau' : Item("This is the file 'tau'.\n"),
- dest_name + '/D/H' : Item(),
- dest_name + '/D/H/chi' : Item("This is the file 'chi'.\n"),
- dest_name + '/D/H/omega' : Item("This is the file 'omega'.\n"),
- dest_name + '/D/H/psi' : Item("This is the file 'psi'.\n"),
- })
-
- # Make a branch A_COPY to merge into.
- svntest.actions.run_and_verify_svn(None, expected, [], 'copy',
- sbox.repo_url + "/A",
- os.path.join(wc_dir,
- dest_name))
-
- expected_output = wc.State(wc_dir, {dest_name : Item(verb='Adding')})
- svntest.actions.run_and_verify_commit(wc_dir,
- expected_output,
- expected_status,
- None,
- wc_dir)
- for i in range(nbr_of_branches):
- if i == 0:
- copy_A('A_COPY', i + 2)
- else:
- copy_A('A_COPY_' + str(i + 1), i + 2)
-
- if branch_only:
- return expected_disk, expected_status
-
- # Make some changes under A which we'll later merge under A_COPY:
-
- # r(nbr_of_branches + 2) - modify and commit A/D/H/psi
- svntest.main.file_write(sbox.ospath('A/D/H/psi'),
- "New content")
- expected_output = wc.State(wc_dir, {'A/D/H/psi' : Item(verb='Sending')})
- expected_status.tweak('A/D/H/psi', wc_rev=nbr_of_branches + 2)
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
- expected_disk.tweak('A/D/H/psi', contents="New content")
-
- # r(nbr_of_branches + 3) - modify and commit A/D/G/rho
- svntest.main.file_write(sbox.ospath('A/D/G/rho'),
- "New content")
- expected_output = wc.State(wc_dir, {'A/D/G/rho' : Item(verb='Sending')})
- expected_status.tweak('A/D/G/rho', wc_rev=nbr_of_branches + 3)
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
- expected_disk.tweak('A/D/G/rho', contents="New content")
-
- # r(nbr_of_branches + 4) - modify and commit A/B/E/beta
- svntest.main.file_write(sbox.ospath('A/B/E/beta'),
- "New content")
- expected_output = wc.State(wc_dir, {'A/B/E/beta' : Item(verb='Sending')})
- expected_status.tweak('A/B/E/beta', wc_rev=nbr_of_branches + 4)
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
- expected_disk.tweak('A/B/E/beta', contents="New content")
-
- # r(nbr_of_branches + 5) - modify and commit A/D/H/omega
- svntest.main.file_write(sbox.ospath('A/D/H/omega'),
- "New content")
- expected_output = wc.State(wc_dir, {'A/D/H/omega' : Item(verb='Sending')})
- expected_status.tweak('A/D/H/omega', wc_rev=nbr_of_branches + 5)
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
- expected_disk.tweak('A/D/H/omega', contents="New content")
-
- return expected_disk, expected_status
-
-#----------------------------------------------------------------------
@SkipUnless(server_has_mergeinfo)
@Issues(2733,2734)
def mergeinfo_inheritance(sbox):
@@ -10535,7 +10205,7 @@ def merge_range_predates_history(sbox):
# Tweak a file and commit. (r2)
svntest.main.file_append(iota_path, "More data.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'tweak iota', wc_dir)
+ sbox.simple_commit(message='tweak iota')
# Create our trunk and branches directory, and update working copy. (r3)
svntest.main.run_svn(None, 'mkdir', trunk_url, branches_url,
@@ -10545,7 +10215,7 @@ def merge_range_predates_history(sbox):
# Add a file to the trunk and commit. (r4)
svntest.main.file_append(trunk_file_path, "This is the file 'file'.\n")
svntest.main.run_svn(None, 'add', trunk_file_path)
- svntest.main.run_svn(None, 'ci', '-m', 'add trunk file', wc_dir)
+ sbox.simple_commit(message='add trunk file')
# Branch trunk from r3, and update working copy. (r5)
svntest.main.run_svn(None, 'cp', trunk_url, branch_url, '-r3',
@@ -10659,7 +10329,7 @@ def foreign_repos(sbox):
### TODO: Use run_and_verify_merge() ###
svntest.main.run_svn(None, 'merge', '-c2', sbox.repo_url, wc_dir2)
- svntest.main.run_svn(None, 'ci', '-m', 'Merge from foreign repos', wc_dir2)
+ sbox2.simple_commit(message='Merge from foreign repo')
svntest.actions.verify_disk(wc_dir2, expected_disk, True)
# Now, let's make a third checkout -- our second from the original
@@ -10721,7 +10391,7 @@ def foreign_repos_uuid(sbox):
svntest.actions.verify_disk(wc_dir, expected_disk, True)
svntest.main.run_svn(None, 'merge', '-c2', sbox.repo_url, wc_dir2)
- svntest.main.run_svn(None, 'ci', '-m', 'Merge from foreign repos', wc_dir2)
+ sbox2.simple_commit(message='Merge from foreign repos')
# Run info to check the copied rev to make sure it's right
zeta2_path = os.path.join(wc_dir2, 'A', 'D', 'G', 'zeta')
@@ -10843,7 +10513,7 @@ def foreign_repos_2_url(sbox):
svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A-tag1',
sbox.repo_url + '/A-tag2',
os.path.join(wc_dir2, 'A'))
- svntest.main.run_svn(None, 'ci', '-m', 'Merge from foreign repos', wc_dir2)
+ sbox2.simple_commit(message='Merge from foreign repos')
svntest.actions.verify_disk(wc_dir2, expected_disk, True)
#----------------------------------------------------------------------
@@ -12527,84 +12197,6 @@ def commit_to_subtree_added_by_merge(sbo
#----------------------------------------------------------------------
-# Helper functions. These take local paths using '/' separators.
-
-def local_path(path):
- "Convert a path from '/' separators to the local style."
- return os.sep.join(path.split('/'))
-
-def svn_mkfile(path):
- "Make and add a file with some default content, and keyword expansion."
- path = local_path(path)
- dirname, filename = os.path.split(path)
- svntest.main.file_write(path, "This is the file '" + filename + "'.\n" +
- "Last changed in '$Revision$'.\n")
- svntest.actions.run_and_verify_svn(None, None, [], 'add', path)
- svntest.actions.run_and_verify_svn(None, None, [], 'propset',
- 'svn:keywords', 'Revision', path)
-
-def svn_modfile(path):
- "Make text and property mods to a WC file."
- path = local_path(path)
- svntest.main.file_append(path, "An extra line.\n")
- svntest.actions.run_and_verify_svn(None, None, [], 'propset',
- 'newprop', 'v', path)
-
-def svn_copy(s_rev, path1, path2):
- "Copy a WC path locally."
- path1 = local_path(path1)
- path2 = local_path(path2)
- svntest.actions.run_and_verify_svn(None, None, [], 'copy', '--parents',
- '-r', s_rev, path1, path2)
-
-def svn_merge(rev_range, source, target, lines=None, elides=[],
- text_conflicts=0, prop_conflicts=0, tree_conflicts=0,
- text_resolved=0, prop_resolved=0, tree_resolved=0,
- args=[]):
- """Merge a single change from path SOURCE to path TARGET and verify the
- output and that there is no error. (The changes made are not verified.)
-
- REV_RANGE is either a number (to cherry-pick that specific change) or a
- two-element list [X,Y] to pick the revision range '-r(X-1):Y'.
-
- LINES is a list of regular expressions to match other lines of output; if
- LINES is 'None' then match all normal (non-conflicting) merges.
-
- ELIDES is a list of paths on which mergeinfo elision should be reported.
-
- TEXT_CONFLICTS, PROP_CONFLICTS and TREE_CONFLICTS specify the number of
- each kind of conflict to expect.
-
- ARGS are additional arguments passed to svn merge.
- """
-
- source = local_path(source)
- target = local_path(target)
- elides = [local_path(p) for p in elides]
- if isinstance(rev_range, int):
- mi_rev_range = [rev_range]
- rev_arg = '-c' + str(rev_range)
- else:
- mi_rev_range = rev_range
- rev_arg = '-r' + str(rev_range[0] - 1) + ':' + str(rev_range[1])
- if lines is None:
- lines = ["(A |D |[UG] | [UG]|[UG][UG]) " + target + ".*\n"]
- else:
- # Expect mergeinfo on the target; caller must supply matches for any
- # subtree mergeinfo paths.
- lines.append(" [UG] " + target + "\n")
- exp_out = expected_merge_output([mi_rev_range], lines, target=target,
- elides=elides,
- text_conflicts=text_conflicts,
- prop_conflicts=prop_conflicts,
- tree_conflicts=tree_conflicts,
- text_resolved=text_resolved,
- prop_resolved=prop_resolved,
- tree_resolved=tree_resolved)
- svntest.actions.run_and_verify_svn(None, exp_out, [],
- 'merge', rev_arg, source, target, *args)
-
-#----------------------------------------------------------------------
# Tests for merging the deletion of a node, where the node to be deleted
# is the same as or different from the node that was deleted.
@@ -14913,17 +14505,17 @@ def copy_then_replace_via_merge(sbox):
main.file_append(AJK_zeta, 'new text')
main.file_append(AJL_zeta, 'new text')
main.run_svn(None, 'add', AJ)
- main.run_svn(None, 'ci', wc_dir, '-m', 'create tree J') # r3
+ sbox.simple_commit(message='create tree J') # r3
main.run_svn(None, 'up', wc_dir)
# Copy J to the branch via merge
main.run_svn(None, 'merge', url_A, branch)
- main.run_svn(None, 'ci', wc_dir, '-m', 'merge to branch') # r4
+ sbox.simple_commit(message='merge to branch') # r4
main.run_svn(None, 'up', wc_dir)
# In A, replace J with a slightly different tree
main.run_svn(None, 'rm', AJ)
- main.run_svn(None, 'ci', wc_dir, '-m', 'rm AJ') # r5
+ sbox.simple_commit(message='rm AJ') # r5
main.run_svn(None, 'up', wc_dir)
os.makedirs(AJL)
@@ -14933,7 +14525,7 @@ def copy_then_replace_via_merge(sbox):
main.file_append(AJL_zeta, 'really new text')
main.file_append(AJM_zeta, 'really new text')
main.run_svn(None, 'add', AJ)
- main.run_svn(None, 'ci', wc_dir, '-m', 'create tree J again') # r6
+ sbox.simple_commit(message='create tree J again') # r6
main.run_svn(None, 'up', wc_dir)
# Run merge to replace /branch/J in one swell foop.
@@ -17212,62 +16804,6 @@ def record_only_merge_adds_new_subtree_m
None, None, None, None,
None, 1, False)
-#----------------------------------------------------------------------
-# Setup helper for issue #4056 and issue #4057 tests.
-def noninheritable_mergeinfo_test_set_up(sbox):
- '''Starting with standard greek tree, copy 'A' to 'branch' in r2 and
- then made a file edit to A/B/lambda in r3.
- Return (expected_output, expected_mergeinfo_output, expected_elision_output,
- expected_status, expected_disk, expected_skip) for a merge of
- r3 from ^/A/B to branch/B.'''
-
- sbox.build()
- wc_dir = sbox.wc_dir
-
- lambda_path = sbox.ospath('A/B/lambda')
- B_branch_path = sbox.ospath('branch/B')
-
- # r2 - Branch ^/A to ^/branch.
- svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A',
- sbox.repo_url + '/branch', '-m', 'make a branch')
-
- # r3 - Make an edit to A/B/lambda.
- svntest.main.file_write(lambda_path, "trunk edit.\n")
- svntest.main.run_svn(None, 'commit', '-m', 'file edit', wc_dir)
- svntest.main.run_svn(None, 'up', wc_dir)
-
- expected_output = wc.State(B_branch_path, {
- 'lambda' : Item(status='U '),
- })
- expected_mergeinfo_output = wc.State(B_branch_path, {
- '' : Item(status=' U'),
- 'lambda' : Item(status=' U'),
- })
- expected_elision_output = wc.State(B_branch_path, {
- 'lambda' : Item(status=' U'),
- })
- expected_status = wc.State(B_branch_path, {
- '' : Item(status=' M'),
- 'lambda' : Item(status='M '),
- 'E' : Item(status=' '),
- 'E/alpha' : Item(status=' '),
- 'E/beta' : Item(status=' '),
- 'F' : Item(status=' '),
- })
- expected_status.tweak(wc_rev='3')
- expected_disk = wc.State('', {
- '' : Item(props={SVN_PROP_MERGEINFO : '/A/B:3'}),
- 'lambda' : Item("trunk edit.\n"),
- 'E' : Item(),
- 'E/alpha' : Item("This is the file 'alpha'.\n"),
- 'E/beta' : Item("This is the file 'beta'.\n"),
- 'F' : Item(),
- })
- expected_skip = wc.State(B_branch_path, {})
-
- return expected_output, expected_mergeinfo_output, expected_elision_output, \
- expected_status, expected_disk, expected_skip
-
#----------------------------------------------------------------------
# Test for issue #4056 "don't record non-inheritable mergeinfo if missing
@@ -17508,12 +17044,11 @@ def merge_source_with_replacement(sbox):
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'del', A_path)
svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A@5', A_path)
- svntest.main.run_svn(None, 'ci', '-m',
- 'Replace A with older version of itself', wc_dir)
+ sbox.simple_commit(message='Replace A with older version of itself')
# r8: Make an edit to A/D/H/omega:
svntest.main.file_write(omega_path, "New content for 'omega'.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'file edit', wc_dir)
+ sbox.simple_commit(message='file edit')
# Update and sync merge ^/A to A_COPY.
#
@@ -17616,7 +17151,7 @@ def reverse_merge_with_rename(sbox):
# r8 - Make and edit to trunk/D/H/omega (which was also edited in r6).
svntest.main.file_write(omega_path, "Edit 'omega' on trunk.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'Another omega edit', wc_dir)
+ sbox.simple_commit(message='Another omega edit')
# r9 - Sync merge ^/trunk to A_COPY.
svntest.actions.run_and_verify_svn(None,
@@ -17624,7 +17159,7 @@ def reverse_merge_with_rename(sbox):
# type of merge to death elsewhere.
[], 'merge', sbox.repo_url + '/trunk',
A_COPY_path)
- svntest.main.run_svn(None, 'ci', '-m', 'Sync A_COPY with ^/trunk', wc_dir)
+ sbox.simple_commit(message='Sync A_COPY with ^/trunk')
svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
# Reverse merge -r9:1 from ^/trunk to A_COPY. This should return
@@ -18194,7 +17729,7 @@ def merge_target_selection(sbox):
svntest.actions.run_and_verify_svn(None, expected_output, [],
'merge', '^/dir', '-c', '4', 'binary-file')
-@Issue(3405)
+@Issue(3405) # seems to be the wrong issue number
def merge_properties_on_adds(sbox):
"merged directory properties are added"
@@ -19005,6 +18540,156 @@ def conflicted_split_merge_with_resolve(
prop_resolved=1, expect_error=False)
try_merge(target, 8, ['-r6:3', '-r10:7'], expect, '7')
+#----------------------------------------------------------------------
+# Test for issue 4367 'merge to shallow WC, repeat merge to infinite
+# depth WC is broken'.
+@SkipUnless(server_has_mergeinfo)
+@Issues(4367)
+def merge_to_empty_target_merge_to_infinite_target(sbox):
+ "repeat merge to infinite depth WC conflicts"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ wc_disk, wc_status = set_up_branch(sbox, branch_only=True)
+ A_COPY_path = sbox.ospath('A_COPY')
+ C_COPY_path = sbox.ospath('A_COPY/C')
+ E_path = sbox.ospath('A/B/E')
+ J_path = sbox.ospath('A/C/J')
+ K_path = sbox.ospath('A/C/J/K')
+ nu1_path = sbox.ospath('A/C/J/nu1')
+ nu2_path = sbox.ospath('A/C/J/K/nu2')
+ L_path = sbox.ospath('A/B/L')
+ nu3_path = sbox.ospath('A/B/L/nu3')
+
+ B1_path = sbox.ospath('A/B/B1')
+ B1a_path = sbox.ospath('A/B/B1/B1a')
+ test1_path = sbox.ospath('A/B/B1/test.txt')
+ test2_path = sbox.ospath('A/B/B1/B1a/test.txt')
+
+ C1_path = sbox.ospath('A/C/C1')
+ test3_path = sbox.ospath('A/C/C1/test.txt')
+
+ # r3 - Add some subtrees:
+ # A /A/B/B1
+ # A /A/B/B1/B1a
+ # A /A/B/B1/B1a/test.txt
+ # A /A/B/B1/test.txt
+ svntest.main.run_svn(None, 'mkdir', B1_path)
+ svntest.main.run_svn(None, 'mkdir', B1a_path)
+ svntest.main.file_append(test1_path, "New file.\n")
+ svntest.main.file_append(test2_path, "New file.\n")
+ svntest.main.run_svn(None, 'add', test1_path, test2_path)
+ sbox.simple_commit()
+
+ # r4 - Add some another subtree.
+ # A /A/C/C1
+ # A /A/C/C1/test.txt
+ svntest.main.run_svn(None, 'mkdir', C1_path)
+ svntest.main.file_append(test3_path, "New file.\n")
+ svntest.main.run_svn(None, 'add', test3_path)
+ sbox.simple_commit()
+
+ # r5 - Delete part of the subtree added in r3.
+ # D /A/B/B1/B1a
+ svntest.main.run_svn(None, 'del', B1a_path)
+ sbox.simple_commit()
+
+ # r6 - Set depth of A_COPY to empty, merge all available revs from ^/A.
+ svntest.actions.run_and_verify_svn(None, None, [], 'up',
+ '--set-depth=empty', A_COPY_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'up',
+ '--set-depth=infinity', C_COPY_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'merge', '^/A',
+ A_COPY_path)
+ sbox.simple_commit()
+
+ # Update A_COPY back to depth infinity and retry the prior merge.
+ svntest.actions.run_and_verify_svn(None, None, [], 'up',
+ '--set-depth=infinity', A_COPY_path)
+
+ expected_output = wc.State(A_COPY_path, {
+ 'B/B1' : Item(status='A '),
+ 'B/B1/test.txt' : Item(status='A '),
+ 'B/B1/B1a' : Item(status='D ', prev_status='A '),
+ 'B/B1/B1a/test.txt' : Item(status='A '),
+ })
+ expected_mergeinfo_output = wc.State(A_COPY_path, {
+ '' : Item(status=' U'),
+ 'B' : Item(status=' G'),
+ })
+ expected_elision_output = wc.State(A_COPY_path, {
+ 'B' : Item(status=' U'),
+ })
+ expected_status = wc.State(A_COPY_path, {
+ '' : Item(status=' M'),
+ 'B' : Item(status=' '),
+ 'mu' : Item(status=' '),
+ 'B/B1' : Item(status='A ', copied='+'),
+ 'B/B1/test.txt' : Item(status=' ', copied='+'),
+ 'B/B1/B1a' : Item(status='D ', copied='+'),
+ 'B/B1/B1a/test.txt' : Item(status='D ', copied='+'),
+ '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=' '),
+ 'C/C1' : Item(status=' '),
+ 'C/C1/test.txt' : 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=6)
+ expected_status.tweak('B/B1', 'B/B1/test.txt', 'B/B1/B1a',
+ 'B/B1/B1a/test.txt', wc_rev='-')
+ expected_disk = wc.State('', {
+ '' : Item(props={SVN_PROP_MERGEINFO : '/A:2-6'}),
+ 'B' : Item(),
+ 'mu' : Item("This is the file 'mu'.\n"),
+ 'B/B1' : Item(),
+ 'B/B1/test.txt' : Item("New file.\n"),
+ '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(props={SVN_PROP_MERGEINFO : '/A/C:2-5'}),
+ 'C/C1' : Item(),
+ 'C/C1/test.txt' : Item("New file.\n"),
+ '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_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, 0)
+
+ # Commit the merge.
+ #sbox.simple_commit()
+
########################################################################
# Run the tests
@@ -19149,6 +18834,7 @@ test_list = [ None,
multiple_editor_drive_merge_notifications,
single_editor_drive_merge_notifications,
conflicted_split_merge_with_resolve,
+ merge_to_empty_target_merge_to_infinite_target,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/merge_tree_conflict_tests.py Tue Oct 15 08:52:06 2013
@@ -43,10 +43,10 @@ Wimp = svntest.testcase.Wimp_deco
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
-from merge_tests import set_up_branch
-from merge_tests import svn_copy
-from merge_tests import svn_merge
-from merge_tests import expected_merge_output
+from svntest.mergetrees import set_up_branch
+from svntest.mergetrees import svn_copy
+from svntest.mergetrees import svn_merge
+from svntest.mergetrees import expected_merge_output
#----------------------------------------------------------------------
@SkipUnless(server_has_mergeinfo)
Modified: subversion/branches/cache-server/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/mergeinfo_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/mergeinfo_tests.py Tue Oct 15 08:52:06 2013
@@ -44,10 +44,9 @@ exp_noop_up_out = svntest.actions.expect
from svntest.main import SVN_PROP_MERGEINFO
from svntest.main import server_has_mergeinfo
-# Get a couple merge helpers from merge_tests.py
-import merge_tests
-from merge_tests import set_up_branch
-from merge_tests import expected_merge_output
+# Get a couple merge helpers
+from svntest.mergetrees import set_up_branch
+from svntest.mergetrees import expected_merge_output
def adjust_error_for_server_version(expected_err):
"Return the expected error regexp appropriate for the server version."
@@ -780,6 +779,31 @@ def noninheritable_mergeinfo_not_always_
[], sbox.repo_url + '/A', sbox.repo_url + '/branch',
'--show-revs', 'eligible', '-R')
+@SkipUnless(server_has_mergeinfo)
+def mergeinfo_log(sbox):
+ "'mergeinfo --log' on a path with mergeinfo"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # make a branch 'A2'
+ sbox.simple_repo_copy('A', 'A2') # r2
+ # make a change in branch 'A'
+ sbox.simple_mkdir('A/newdir')
+ sbox.simple_commit() # r3
+ sbox.simple_update()
+
+ # Dummy up some mergeinfo.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', SVN_PROP_MERGEINFO, '/A:3',
+ sbox.ospath('A2'))
+ svntest.actions.run_and_verify_svn(None,
+ None, [],
+ 'mergeinfo', '--show-revs=merged',
+ '--log', sbox.repo_url + '/A',
+ sbox.ospath('A2'))
+
+
########################################################################
# Run the tests
@@ -797,6 +821,7 @@ test_list = [ None,
wc_target_inherits_mergeinfo_from_repos,
natural_history_is_not_eligible_nor_merged,
noninheritable_mergeinfo_not_always_eligible,
+ mergeinfo_log,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/move_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/move_tests.py Tue Oct 15 08:52:06 2013
@@ -1234,6 +1234,295 @@ def move_missing(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
+def nested_replaces(sbox):
+ "nested replaces"
+
+ repo_dir, repo_url = sbox.add_repo_path('blank')
+ wc_dir = sbox.add_wc_path('blank')
+ svntest.main.create_repos(repo_dir)
+ ospath = lambda dirent: sbox.ospath(dirent, wc_dir)
+
+ ## r1: setup
+ svntest.actions.run_and_verify_svnmucc(None, None, [],
+ '-U', repo_url,
+ '-m', 'r1: create tree',
+ 'mkdir', 'A', 'mkdir', 'A/B', 'mkdir', 'A/B/C',
+ 'mkdir', 'X', 'mkdir', 'X/Y', 'mkdir', 'X/Y/Z',
+ # sentinel files
+ 'put', os.devnull, 'A/a',
+ 'put', os.devnull, 'A/B/b',
+ 'put', os.devnull, 'A/B/C/c',
+ 'put', os.devnull, 'X/x',
+ 'put', os.devnull, 'X/Y/y',
+ 'put', os.devnull, 'X/Y/Z/z')
+
+ svntest.main.run_svn(None, 'checkout', '-q', repo_url, wc_dir)
+ r1_status = svntest.wc.State(wc_dir, {
+ '' : Item(status=' ', wc_rev='1'),
+ 'A' : Item(status=' ', wc_rev='1'),
+ 'A/B' : Item(status=' ', wc_rev='1'),
+ 'A/B/C' : Item(status=' ', wc_rev='1'),
+ 'X' : Item(status=' ', wc_rev='1'),
+ 'X/Y' : Item(status=' ', wc_rev='1'),
+ 'X/Y/Z' : Item(status=' ', wc_rev='1'),
+ 'A/a' : Item(status=' ', wc_rev='1'),
+ 'A/B/b' : Item(status=' ', wc_rev='1'),
+ 'A/B/C/c' : Item(status=' ', wc_rev='1'),
+ 'X/x' : Item(status=' ', wc_rev='1'),
+ 'X/Y/y' : Item(status=' ', wc_rev='1'),
+ 'X/Y/Z/z' : Item(status=' ', wc_rev='1'),
+ })
+ svntest.actions.run_and_verify_status(wc_dir, r1_status)
+
+ ## r2: juggling
+ moves = [
+ ('A', 'A2'),
+ ('X', 'X2'),
+ ('A2/B/C', 'X'),
+ ('X2/Y/Z', 'A'),
+ ('A2/B', 'A/B'),
+ ('X2/Y', 'X/Y'),
+ ('A2', 'X/Y/Z'),
+ ('X2', 'A/B/C'),
+ ]
+ for src, dst in moves:
+ svntest.main.run_svn(None, 'mv', ospath(src), ospath(dst))
+ r2_status = svntest.wc.State(wc_dir, {
+ '' : Item(status=' ', wc_rev='1'),
+ 'A' : Item(status='R ', copied='+', moved_from='X/Y/Z', moved_to='X/Y/Z', wc_rev='-'),
+ 'A/B' : Item(status='A ', copied='+', moved_from='X/Y/Z/B', wc_rev='-', entry_status='R '),
+ 'A/B/C' : Item(status='R ', copied='+', moved_from='X', moved_to='X', wc_rev='-'),
+ 'A/B/C/Y' : Item(status='D ', copied='+', wc_rev='-', moved_to='X/Y'),
+ 'A/B/C/Y/y' : Item(status='D ', copied='+', wc_rev='-'),
+ 'A/B/C/Y/Z' : Item(status='D ', copied='+', wc_rev='-'),
+ 'A/B/C/Y/Z/z':Item(status='D ', copied='+', wc_rev='-'),
+ 'X' : Item(status='R ', copied='+', moved_from='A/B/C', moved_to='A/B/C', wc_rev='-'),
+ 'X/Y' : Item(status='A ', copied='+', moved_from='A/B/C/Y', wc_rev='-', entry_status='R '),
+ 'X/Y/Z' : Item(status='R ', copied='+', moved_from='A', moved_to='A', wc_rev='-'),
+ 'X/Y/Z/B' : Item(status='D ', copied='+', wc_rev='-', moved_to='A/B'),
+ 'X/Y/Z/B/b' : Item(status='D ', copied='+', wc_rev='-'),
+ 'X/Y/Z/B/C' : Item(status='D ', copied='+', wc_rev='-'),
+ 'X/Y/Z/B/C/c':Item(status='D ', copied='+', wc_rev='-'),
+ 'A/a' : Item(status='D ', wc_rev='1'),
+ 'A/B/b' : Item(status='D ', wc_rev='1'),
+ 'A/B/C/c' : Item(status='D ', copied='+', wc_rev='-'),
+ 'X/x' : Item(status='D ', wc_rev='1'),
+ 'X/Y/y' : Item(status='D ', wc_rev='1'),
+ 'X/Y/Z/z' : Item(status='D ', copied='+', wc_rev='-'),
+ 'X/c' : Item(status=' ', copied='+', wc_rev='-'),
+ 'A/z' : Item(status=' ', copied='+', wc_rev='-'),
+ 'A/B/b' : Item(status=' ', copied='+', wc_rev='-'),
+ 'X/Y/y' : Item(status=' ', copied='+', wc_rev='-'),
+ 'X/Y/Z/a' : Item(status=' ', copied='+', wc_rev='-'),
+ 'A/B/C/x' : Item(status=' ', copied='+', wc_rev='-'),
+ })
+ svntest.actions.run_and_verify_status(wc_dir, r2_status)
+
+ svntest.main.run_svn(None, 'commit', '-m', 'r2: juggle the tree', wc_dir)
+ expected_output = svntest.verify.UnorderedRegexListOutput(map(re.escape, [
+ ' R /A (from /X/Y/Z:1)',
+ ' A /A/B (from /A/B:1)',
+ ' R /A/B/C (from /X:1)',
+ ' R /X (from /A/B/C:1)',
+ ' A /X/Y (from /X/Y:1)',
+ ' R /X/Y/Z (from /A:1)',
+ ' D /X/Y/Z/B',
+ ' D /A/B/C/Y',
+ ]) + [
+ '^-', '^r2', '^-', '^Changed paths:',
+ ])
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'log', '-qvr2', repo_url)
+
+ ## Test updating to r1.
+ svntest.main.run_svn(None, 'update', '-r1', wc_dir)
+ svntest.actions.run_and_verify_status(wc_dir, r1_status)
+
+def setup_move_many(sbox):
+ "helper function which creates a wc with node A/A/A which is moved 3 times"
+
+ sbox.simple_rm('A', 'iota')
+ sbox.simple_mkdir('A',
+ 'A/A',
+ 'A/A/A',
+ 'A/A/A/A',
+ 'B',
+ 'B/A',
+ 'B/A/A',
+ 'B/A/A/A',
+ 'C',
+ 'C/A',
+ 'C/A/A',
+ 'C/A/A/A')
+ sbox.simple_commit()
+ sbox.simple_update()
+
+ sbox.simple_move('A/A/A', 'AAA_1')
+
+ sbox.simple_rm('A')
+ sbox.simple_move('B', 'A')
+
+ sbox.simple_move('A/A/A', 'AAA_2')
+
+ sbox.simple_rm('A/A')
+ sbox.simple_move('C/A', 'A/A')
+
+ sbox.simple_move('A/A/A', 'AAA_3')
+
+def move_many_status(wc_dir):
+ "obtain standard status after setup_move_many"
+
+ return svntest.wc.State(wc_dir, {
+ '' : Item(status=' ', wc_rev='2'),
+
+ 'AAA_1' : Item(status='A ', copied='+', moved_from='A/A/A', wc_rev='-'),
+ 'AAA_1/A' : Item(status=' ', copied='+', wc_rev='-'),
+
+ 'AAA_2' : Item(status='A ', copied='+', moved_from='A/A/A', wc_rev='-'),
+ 'AAA_2/A' : Item(status=' ', copied='+', wc_rev='-'),
+
+ 'AAA_3' : Item(status='A ', copied='+', moved_from='A/A/A', wc_rev='-'),
+ 'AAA_3/A' : Item(status=' ', copied='+', wc_rev='-'),
+
+ 'A' : Item(status='R ', copied='+', moved_from='B', wc_rev='-'),
+ 'A/A' : Item(status='R ', copied='+', moved_from='C/A', wc_rev='-'),
+ 'A/A/A' : Item(status='D ', copied='+', wc_rev='-', moved_to='AAA_3'),
+ 'A/A/A/A' : Item(status='D ', copied='+', wc_rev='-'),
+
+ 'B' : Item(status='D ', wc_rev='2', moved_to='A'),
+ 'B/A' : Item(status='D ', wc_rev='2'),
+ 'B/A/A' : Item(status='D ', wc_rev='2'),
+ 'B/A/A/A' : Item(status='D ', wc_rev='2'),
+
+ 'C' : Item(status=' ', wc_rev='2'),
+ 'C/A' : Item(status='D ', wc_rev='2', moved_to='A/A'),
+ 'C/A/A' : Item(status='D ', wc_rev='2'),
+ 'C/A/A/A' : Item(status='D ', wc_rev='2'),
+ })
+
+def move_many_update_delete(sbox):
+ "move many and delete-on-update"
+
+ sbox.build()
+ setup_move_many(sbox)
+
+ wc_dir = sbox.wc_dir
+
+ # Verify start situation
+ expected_status = move_many_status(wc_dir)
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ # And now create a tree conflict
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'rm', sbox.repo_url + '/B',
+ '-m', '')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'B' : Item(status=' ', treeconflict='C'),
+ })
+
+
+ expected_status.tweak('', 'C', 'C/A', 'C/A/A', 'C/A/A/A', wc_rev='3')
+ expected_status.tweak('A', moved_from=None)
+ expected_status.remove('B/A', 'B/A/A', 'B/A/A/A')
+ expected_status.tweak('B', status='! ', treeconflict='C', wc_rev=None, moved_to=None)
+
+ svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+ expected_status)
+
+ # Would be nice if we could run the resolver as a separate step,
+ # but 'svn resolve' just fails for any value but working
+
+@XFail()
+def move_many_update_add(sbox):
+ "move many and add-on-update"
+
+ sbox.build()
+ setup_move_many(sbox)
+
+ wc_dir = sbox.wc_dir
+
+ # Verify start situation
+ expected_status = move_many_status(wc_dir)
+ #svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ # And now create a tree conflict
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mkdir', sbox.repo_url + '/B/A/A/BB',
+ '-m', '')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'B' : Item(status=' ', treeconflict='C'),
+ 'B/A' : Item(status=' ', treeconflict='U'),
+ 'B/A/A' : Item(status=' ', treeconflict='U'),
+ 'B/A/A/BB' : Item(status=' ', treeconflict='A'),
+ # And while resolving
+ 'A/A/' : Item(status=' ', treeconflict='C')
+ })
+
+ expected_status.tweak('',
+ 'B', 'B/A', 'B/A/A', 'B/A/A/A',
+ 'C', 'C/A', 'C/A/A', 'C/A/A/A',
+ wc_rev='3')
+
+ expected_status.tweak('A/A', treeconflict='C')
+ expected_status.add({
+ 'A/A/A/BB' : Item(status='D ', copied='+', wc_rev='-'),
+ 'B/A/A/BB' : Item(status='D ', wc_rev='3'),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+ expected_status,
+ None, None, None,
+ None, None, None,
+ wc_dir, '--accept', 'mine-conflict')
+
+ # And another one
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mkdir', sbox.repo_url + '/C/A/A/BB',
+ '-m', '')
+
+ expected_status.tweak('',
+ 'B', 'B/A', 'B/A/A', 'B/A/A/A',
+ 'C', 'C/A', 'C/A/A', 'C/A/A/A',
+ wc_rev='4')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'C/A' : Item(status=' ', treeconflict='C'),
+ 'C/A/A' : Item(status=' ', treeconflict='U'),
+ 'C/A/A/BB' : Item(status=' ', treeconflict='A'),
+ })
+
+ # This currently triggers an assertion failure
+ svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+ expected_status,
+ None, None, None,
+ None, None, None,
+ wc_dir, '--accept', 'mine-conflict')
+
+@Issue(4437)
+@XFail()
+def move_del_moved(sbox):
+ "delete moved node, still a move"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ sbox.simple_mkdir('A/NEW')
+ sbox.simple_move('A/mu', 'A/NEW/mu')
+ sbox.simple_rm('A/NEW/mu')
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('A/mu', status='D ')
+ expected_status.add({
+ 'A/NEW' : Item(status='A ', wc_rev='-')
+ })
+
+ # A/mu still reports that it is moved to A/NEW/mu, while it is already
+ # deleted there.
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+
#######################################################################
# Run the tests
@@ -1245,6 +1534,10 @@ test_list = [ None,
deeper_move_file_test,
property_merge,
move_missing,
+ nested_replaces,
+ move_many_update_delete,
+ move_many_update_add,
+ move_del_moved,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/prop_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/prop_tests.py Tue Oct 15 08:52:06 2013
@@ -910,7 +910,7 @@ def prop_value_conversions(sbox):
svntest.actions.set_prop('some-prop', 'bar\n', iota_path)
# NOTE: When writing out multi-line prop values in svn:* props, the
- # client converts to local encoding and local eoln style.
+ # client converts to local encoding and local eol style.
# Therefore, the expected output must contain the right kind of eoln
# strings. That's why we use os.linesep in the tests below, not just
# plain '\n'. The _last_ \n is also from the client, but it's not
@@ -2612,6 +2612,38 @@ def peg_rev_base_working(sbox):
'propget', '--strict', 'ordinal',
sbox.ospath('iota') + '@BASE')
+@Issue(4415)
+@XFail(svntest.main.is_ra_type_dav)
+def xml_unsafe_author(sbox):
+ "svn:author with XML unsafe chars"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ svntest.actions.enable_revprop_changes(sbox.repo_dir)
+
+ # client sends svn:author (via PROPPATCH for DAV)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset', '--revprop', '-r', '1',
+ 'svn:author', 'foo\bbar', wc_dir)
+
+ # mod_dav_svn sends svn:author (via REPORT for DAV)
+ sbox.simple_update(revision=0)
+ sbox.simple_update(revision=1)
+ expected_info = [{
+ 'Path' : re.escape(wc_dir),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : svntest.actions.get_wc_uuid(wc_dir),
+ 'Last Changed Author' : 'foo\bbar',
+ }]
+ svntest.actions.run_and_verify_info(expected_info, wc_dir)
+
+ # mod_dav_svn sends svn:author (via PROPFIND for DAV)
+ svntest.actions.run_and_verify_svn(None, ['foo\bbar'], [],
+ 'propget', '--revprop', '-r', '1',
+ 'svn:author', '--strict', wc_dir)
+
+
########################################################################
# Run the tests
@@ -2657,6 +2689,7 @@ test_list = [ None,
inheritable_ignores,
almost_known_prop_names,
peg_rev_base_working,
+ xml_unsafe_author,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/resolve_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/resolve_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/resolve_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/resolve_tests.py Tue Oct 15 08:52:06 2013
@@ -41,8 +41,8 @@ Issues = svntest.testcase.Issues_deco
Issue = svntest.testcase.Issue_deco
Wimp = svntest.testcase.Wimp_deco
-from merge_tests import set_up_branch
-from merge_tests import expected_merge_output
+from svntest.mergetrees import set_up_branch
+from svntest.mergetrees import expected_merge_output
######################################################################
@@ -570,7 +570,7 @@ def theirs_conflict_in_subdir(sbox):
alpha_path2 = os.path.join(wc2, 'A', 'B', 'E', 'alpha')
svntest.main.file_append(alpha_path, "Modified alpha.\n")
- svntest.main.run_svn(None, 'ci', '-m', 'logmsg', wc)
+ sbox.simple_commit(message='logmsg')
svntest.main.file_append(alpha_path2, "Modified alpha, too.\n")
svntest.main.run_svn(None, 'up', wc2)
Modified: subversion/branches/cache-server/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/revert_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/revert_tests.py Tue Oct 15 08:52:06 2013
@@ -1000,7 +1000,7 @@ def revert_add_over_not_present_dir(sbox
wc_dir = sbox.wc_dir
main.run_svn(None, 'rm', os.path.join(wc_dir, 'A/C'))
- main.run_svn(None, 'ci', wc_dir, '-m', 'Deleted dir')
+ sbox.simple_commit(message='Deleted dir')
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.remove('A/C')
@@ -1644,6 +1644,8 @@ def revert_obstructing_wc(sbox):
'revert', '-R', wc_dir)
+
+
########################################################################
# Run the tests
@@ -1683,7 +1685,7 @@ test_list = [ None,
revert_no_text_change_conflict_recursive,
revert_with_unversioned_targets,
revert_nonexistent,
- revert_obstructing_wc
+ revert_obstructing_wc,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/stat_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/stat_tests.py Tue Oct 15 08:52:06 2013
@@ -1468,7 +1468,7 @@ def status_depth_update(sbox):
svntest.main.run_svn(None, 'up', wc_dir)
svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', A_path)
svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', D_path)
- svntest.main.run_svn(None, 'ci', '-m', 'log message', wc_dir)
+ sbox.simple_commit(message='log message')
# update to r1
svntest.main.run_svn(None, 'up', '-r', '1', wc_dir)
@@ -2092,6 +2092,33 @@ def move_update_timestamps(sbox):
# beta is modified so timestamp is removed
no_text_timestamp(sbox.ospath('A/B/E2/beta'))
+@Issue(4398)
+def status_path_handling(sbox):
+ "relative/absolute path handling"
+
+ sbox.build(read_only=True)
+
+ # target is a relative path to a subdir
+ wc_dir = sbox.wc_dir
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ # target is an absolute path to a subdir
+ cwd = os.getcwd()
+ abs_wc_dir = os.path.join(cwd, wc_dir)
+ expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+ svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+ # target is an absolute path to a parent dir
+ os.chdir(sbox.ospath('A/B'))
+ expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+ svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+ # target is a relative path to a parent dir
+ rel_wc_dir = os.path.join('..', '..')
+ expected_status = svntest.actions.get_virginal_state(rel_wc_dir, 1)
+ svntest.actions.run_and_verify_status(rel_wc_dir, expected_status)
+
########################################################################
# Run the tests
@@ -2139,6 +2166,7 @@ test_list = [ None,
status_unversioned_dir,
status_case_changed,
move_update_timestamps,
+ status_path_handling,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/svnadmin_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/svnadmin_tests.py Tue Oct 15 08:52:06 2013
@@ -61,8 +61,7 @@ def check_hotcopy_bdb(src, dst):
if origerr or backerr or origout != backout:
raise svntest.Failure
-def check_hotcopy_fsfs(src, dst):
- "Verify that the SRC FSFS repository has been correctly copied to DST."
+def check_hotcopy_fsfs_fsx(src, dst):
# Walk the source and compare all files to the destination
for src_dirpath, src_dirs, src_files in os.walk(src):
# Verify that the current directory exists in the destination
@@ -146,6 +145,14 @@ def check_hotcopy_fsfs(src, dst):
f1.close()
f2.close()
+def check_hotcopy_fsfs(src, dst):
+ "Verify that the SRC FSFS repository has been correctly copied to DST."
+ check_hotcopy_fsfs_fsx(src, dst)
+
+def check_hotcopy_fsx(src, dst):
+ "Verify that the SRC FSX repository has been correctly copied to DST."
+ check_hotcopy_fsfs_fsx(src, dst)
+
#----------------------------------------------------------------------
# How we currently test 'svnadmin' --
@@ -386,8 +393,7 @@ def dump_copied_dir(sbox):
old_C_path = os.path.join(wc_dir, 'A', 'C')
new_C_path = os.path.join(wc_dir, 'A', 'B', 'C')
svntest.main.run_svn(None, 'cp', old_C_path, new_C_path)
- svntest.main.run_svn(None, 'ci', wc_dir, '--quiet',
- '-m', 'log msg')
+ sbox.simple_commit(message='log msg')
exit_code, output, errput = svntest.main.run_svnadmin("dump", repo_dir)
if svntest.verify.compare_and_display_lines(
@@ -410,8 +416,7 @@ def dump_move_dir_modify_child(sbox):
Q_path = os.path.join(wc_dir, 'A', 'Q')
svntest.main.run_svn(None, 'cp', B_path, Q_path)
svntest.main.file_append(os.path.join(Q_path, 'lambda'), 'hello')
- svntest.main.run_svn(None, 'ci', wc_dir, '--quiet',
- '-m', 'log msg')
+ sbox.simple_commit(message='log msg')
exit_code, output, errput = svntest.main.run_svnadmin("dump", repo_dir)
svntest.verify.compare_and_display_lines(
"Output of 'svnadmin dump' is unexpected.",
@@ -459,8 +464,10 @@ def hotcopy_dot(sbox):
if svntest.main.is_fs_type_fsfs():
check_hotcopy_fsfs(sbox.repo_dir, backup_dir)
- else:
+ if svntest.main.is_fs_type_bdb():
check_hotcopy_bdb(sbox.repo_dir, backup_dir)
+ if svntest.main.is_fs_type_fsx():
+ check_hotcopy_fsx(sbox.repo_dir, backup_dir)
#----------------------------------------------------------------------
@@ -551,9 +558,17 @@ def verify_windows_paths_in_repos(sbox):
if errput:
raise SVNUnexpectedStderr(errput)
- # unfortunately, FSFS needs to do more checks than BDB resulting in
- # different progress output
- if svntest.main.is_fs_type_fsfs():
+ # unfortunately, some backends needs to do more checks than other
+ # resulting in different progress output
+ if svntest.main.is_fs_type_fsx():
+ svntest.verify.compare_and_display_lines(
+ "Error while running 'svnadmin verify'.",
+ 'STDERR', ["* Verifying metadata at revision 0 ...\n",
+ "* Verifying repository metadata ...\n",
+ "* Verified revision 0.\n",
+ "* Verified revision 1.\n",
+ "* Verified revision 2.\n"], output)
+ elif svntest.main.is_fs_type_fsfs():
svntest.verify.compare_and_display_lines(
"Error while running 'svnadmin verify'.",
'STDERR', ["* Verifying repository metadata ...\n",
@@ -738,10 +753,10 @@ def recover_fsfs(sbox):
# Commit up to r3, so we can test various recovery scenarios.
svntest.main.file_append(os.path.join(sbox.wc_dir, 'iota'), 'newer line\n')
- svntest.main.run_svn(None, 'ci', sbox.wc_dir, '--quiet', '-m', 'log msg')
+ sbox.simple_commit(message='log msg')
svntest.main.file_append(os.path.join(sbox.wc_dir, 'iota'), 'newest line\n')
- svntest.main.run_svn(None, 'ci', sbox.wc_dir, '--quiet', '-m', 'log msg')
+ sbox.simple_commit(message='log msg')
# Remember the contents of the db/current file.
expected_current_contents = open(current_path).read()
@@ -949,10 +964,10 @@ def fsfs_recover_handle_missing_revs_or_
# Commit up to r3, so we can test various recovery scenarios.
svntest.main.file_append(os.path.join(sbox.wc_dir, 'iota'), 'newer line\n')
- svntest.main.run_svn(None, 'ci', sbox.wc_dir, '--quiet', '-m', 'log msg')
+ sbox.simple_commit(message='log msg')
svntest.main.file_append(os.path.join(sbox.wc_dir, 'iota'), 'newest line\n')
- svntest.main.run_svn(None, 'ci', sbox.wc_dir, '--quiet', '-m', 'log msg')
+ sbox.simple_commit(message='log msg')
rev_3 = fsfs_file(sbox.repo_dir, 'revs', '3')
rev_was_3 = rev_3 + '.was'
@@ -1470,8 +1485,8 @@ def verify_non_utf8_paths(sbox):
expected_stderr = [
"* Dumped revision 0.\n",
"WARNING 0x0002: E160005: "
- "While validating fspath '?\\230': "
- "Path '?\\230' is not in UTF-8"
+ "While validating fspath '?\\E6': "
+ "Path '?\\E6' is not in UTF-8"
"\n",
"* Dumped revision 1.\n",
]
@@ -1620,7 +1635,7 @@ def hotcopy_incremental_packed(sbox):
cwd = os.getcwd()
# Configure two files per shard to trigger packing
format_file = open(os.path.join(sbox.repo_dir, 'db', 'format'), 'wb')
- format_file.write("4\nlayout sharded 2\n")
+ format_file.write("6\nlayout sharded 2\n")
format_file.close()
# Pack revisions 0 and 1.
@@ -1828,6 +1843,67 @@ def recover_old(sbox):
svntest.main.run_svnadmin("recover", sbox.repo_dir)
+@SkipUnless(svntest.main.is_fs_type_fsfs)
+def verify_keep_going(sbox):
+ "svnadmin verify --keep-going test"
+
+ sbox.build(create_wc = False)
+ repo_url = sbox.repo_url
+ B_url = sbox.repo_url + '/B'
+ C_url = sbox.repo_url + '/C'
+
+ # Create A/B/E/bravo in r2.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mkdir', '-m', 'log_msg',
+ B_url)
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mkdir', '-m', 'log_msg',
+ C_url)
+
+ r2 = fsfs_file(sbox.repo_dir, 'revs', '2')
+ fp = open(r2, 'a')
+ fp.write("""inserting junk to corrupt the rev""")
+ fp.close()
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ "--keep-going",
+ sbox.repo_dir)
+
+ exp_out = svntest.verify.RegexListOutput([".*Verifying repository metadata",
+ ".*Verified revision 0.",
+ ".*Verified revision 1.",
+ ".*Error verifying revision 2.",
+ ".*Verified revision 3."])
+
+ exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*",
+ "svnadmin: E165011:.*"], False)
+
+
+ if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
+ output, errput, exp_out, exp_err):
+ raise svntest.Failure
+
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ sbox.repo_dir)
+
+ exp_out = svntest.verify.RegexListOutput([".*Verifying repository metadata",
+ ".*Verified revision 0.",
+ ".*Verified revision 1.",
+ ".*Error verifying revision 2."])
+
+ if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
+ output, errput, exp_out, exp_err):
+ raise svntest.Failure
+
+
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ "--quiet",
+ sbox.repo_dir)
+
+ if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.",
+ None, errput, None, "svnadmin: E165011:.*"):
+ raise svntest.Failure
+
########################################################################
# Run the tests
@@ -1864,6 +1940,7 @@ test_list = [ None,
locking,
mergeinfo_race,
recover_old,
+ verify_keep_going,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/svnlook_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/svnlook_tests.py Tue Oct 15 08:52:06 2013
@@ -709,10 +709,8 @@ fp.close()"""
' bogus_rev_prop\n',
' svn:date\n',
' svn:txn-client-compat-version\n',
+ ' svn:txn-user-agent\n',
]
- # ra_dav and ra_svn add the user-agent ephemeral property
- if svntest.main.is_ra_type_dav() or svntest.main.is_ra_type_svn():
- expected_data.append(' svn:txn-user-agent\n')
verify_logfile(logfilepath, svntest.verify.UnorderedOutput(expected_data))
def property_delete(sbox):
Modified: subversion/branches/cache-server/subversion/tests/cmdline/svnmucc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/svnmucc_tests.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/svnmucc_tests.py Tue Oct 15 08:52:06 2013
@@ -411,6 +411,48 @@ def no_log_msg_non_interactive(sbox):
'mkdir', 'A/subdir')
+def nested_replaces(sbox):
+ "nested replaces"
+
+ sbox.build(create_wc=False)
+ repo_url = sbox.repo_url
+ svntest.actions.run_and_verify_svnmucc(None, None, [],
+ '-U', repo_url, '-m', 'r2: create tree',
+ 'rm', 'A',
+ 'rm', 'iota',
+ 'mkdir', 'A', 'mkdir', 'A/B', 'mkdir', 'A/B/C',
+ 'mkdir', 'M', 'mkdir', 'M/N', 'mkdir', 'M/N/O',
+ 'mkdir', 'X', 'mkdir', 'X/Y', 'mkdir', 'X/Y/Z')
+ svntest.actions.run_and_verify_svnmucc(None, None, [],
+ '-U', repo_url, '-m', 'r3: nested replaces',
+ *("""
+rm A rm M rm X
+cp HEAD X/Y/Z A cp HEAD A/B/C M cp HEAD M/N/O X
+cp HEAD A/B A/B cp HEAD M/N M/N cp HEAD X/Y X/Y
+rm A/B/C rm M/N/O rm X/Y/Z
+cp HEAD X A/B/C cp HEAD A M/N/O cp HEAD M X/Y/Z
+rm A/B/C/Y
+ """.split()))
+
+ # ### TODO: need a smarter run_and_verify_log() that verifies copyfrom
+ expected_output = svntest.verify.UnorderedRegexListOutput(map(re.escape, [
+ ' R /A (from /X/Y/Z:2)',
+ ' A /A/B (from /A/B:2)',
+ ' R /A/B/C (from /X:2)',
+ ' R /M (from /A/B/C:2)',
+ ' A /M/N (from /M/N:2)',
+ ' R /M/N/O (from /A:2)',
+ ' R /X (from /M/N/O:2)',
+ ' A /X/Y (from /X/Y:2)',
+ ' R /X/Y/Z (from /M:2)',
+ ' D /A/B/C/Y',
+ ]) + [
+ '^-', '^r3', '^-', '^Changed paths:',
+ ])
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'log', '-qvr3', repo_url)
+
+
######################################################################
test_list = [ None,
@@ -419,6 +461,7 @@ test_list = [ None,
propset_root,
too_many_log_messages,
no_log_msg_non_interactive,
+ nested_replaces,
]
if __name__ == '__main__':
Modified: subversion/branches/cache-server/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/tests/cmdline/svntest/actions.py?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/cache-server/subversion/tests/cmdline/svntest/actions.py Tue Oct 15 08:52:06 2013
@@ -1916,11 +1916,11 @@ def get_virginal_state(wc_dir, rev):
return state
# Cheap administrative directory locking
-def lock_admin_dir(wc_dir, recursive=False):
+def lock_admin_dir(wc_dir, recursive=False, work_queue=False):
"Lock a SVN administrative directory"
db, root_path, relpath = wc.open_wc_db(wc_dir)
- svntest.main.run_wc_lock_tester(recursive, wc_dir)
+ svntest.main.run_wc_lock_tester(recursive, wc_dir, work_queue)
def set_incomplete(wc_dir, revision):
"Make wc_dir incomplete at revision"