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/02/04 21:48:13 UTC
svn commit: r1442344 [30/39] - in /subversion/branches/fsfs-format7: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ contrib/client-side/emacs/
contrib/server-side/fsfsfixer/fixer/ contrib/server-side/svncutter/ doc/...
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py Mon Feb 4 20:48:05 2013
@@ -394,7 +394,7 @@ def basic_commit_corruption(sbox):
# This commit should fail due to text base corruption.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status,
+ None, # expected_status,
"svn: E200014: Checksum",
wc_dir)
@@ -432,7 +432,9 @@ def basic_update_corruption(sbox):
# Make the "other" working copy
other_wc = sbox.add_wc_path('other')
- svntest.actions.duplicate_dir(wc_dir, other_wc)
+
+ svntest.actions.run_and_verify_svn("Checkout to wc2", None, [],
+ 'co', sbox.repo_url, other_wc)
# Make a local mod to mu
mu_path = sbox.ospath('A/mu')
@@ -459,10 +461,6 @@ def basic_update_corruption(sbox):
# Create expected disk tree for the update.
expected_disk = svntest.main.greek_state.copy()
- expected_disk.tweak('A/mu',
- contents=expected_disk.desc['A/mu'].contents
- + 'appended mu text')
-
# Create expected status tree for the update.
expected_status = svntest.actions.get_virginal_state(other_wc, 2)
@@ -481,11 +479,15 @@ def basic_update_corruption(sbox):
os.chmod(tb_dir_path, tb_dir_saved_mode)
os.chmod(mu_tb_path, mu_tb_saved_mode)
- # Do the update and check the results in three ways.
+ # Do the update and check the results in four ways.
+ fail_output = wc.State(other_wc, {
+ })
+ fail_status = svntest.actions.get_virginal_state(other_wc, 1)
+ fail_status.tweak('A', '', status='! ', wc_rev=2)
svntest.actions.run_and_verify_update(other_wc,
- expected_output,
+ fail_output,
expected_disk,
- expected_status,
+ fail_status,
"svn: E155017: Checksum", other_wc)
# Restore the uncorrupted text base.
@@ -496,8 +498,15 @@ def basic_update_corruption(sbox):
os.chmod(tb_dir_path, tb_dir_saved_mode)
os.chmod(mu_tb_path, mu_tb_saved_mode)
+ # Create expected status tree for the update.
+ expected_status = svntest.actions.get_virginal_state(other_wc, 2)
+
# This update should succeed. (Actually, I'm kind of astonished
# that this works without even an intervening "svn cleanup".)
+ expected_disk.tweak('A/mu',
+ contents=expected_disk.desc['A/mu'].contents
+ + 'appended mu text')
+
svntest.actions.run_and_verify_update(other_wc,
expected_output,
expected_disk,
@@ -1936,7 +1945,7 @@ def delete_keep_local(sbox):
# Update working copy to check disk state still greek tree
expected_disk = svntest.main.greek_state.copy()
expected_output = svntest.wc.State(wc_dir, {})
- expected_status.tweak(wc_rev = 2);
+ expected_status.tweak(wc_rev = 2)
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
@@ -2249,12 +2258,14 @@ def automatic_conflict_resolution(sbox):
# stdout, stderr
None,
".*invalid 'accept' ARG",
- 'resolve', '--accept=edit')
+ 'resolve', '--accept=edit',
+ '--force-interactive')
svntest.actions.run_and_verify_svn(None,
# stdout, stderr
None,
".*invalid 'accept' ARG",
- 'resolve', '--accept=launch')
+ 'resolve', '--accept=launch',
+ '--force-interactive')
# Run 'svn resolved --accept=NOPE. Using omega for the test.
svntest.actions.run_and_verify_svn("Resolve command", None,
".*NOPE' is not a valid --accept value",
@@ -2493,8 +2504,17 @@ def basic_relative_url_with_peg_revision
'^//A/@3', iota_url)
+def basic_auth_test_xfail_predicate():
+ """Predicate for XFail for basic_auth_test:
+ The test will fail if plaintext password storage is disabled,
+ and the RA method requires authentication."""
+ return (not svntest.main.is_os_windows()
+ and svntest.main.is_ra_type_dav()
+ and svntest.main.is_plaintext_password_storage_disabled())
+
# Issue 2242, auth cache picking up password from wrong username entry
@Issue(2242)
+@XFail(basic_auth_test_xfail_predicate)
def basic_auth_test(sbox):
"basic auth test"
@@ -2508,22 +2528,22 @@ def basic_auth_test(sbox):
# Checkout with jrandom
exit_code, output, errput = svntest.main.run_command(
- svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+ svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
'--username', 'jrandom', '--password', 'rayjandom',
'--config-dir', config_dir)
exit_code, output, errput = svntest.main.run_command(
- svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+ svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
'--username', 'jrandom', '--non-interactive', '--config-dir', config_dir)
# Checkout with jconstant
exit_code, output, errput = svntest.main.run_command(
- svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+ svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
'--username', 'jconstant', '--password', 'rayjandom',
'--config-dir', config_dir)
exit_code, output, errput = svntest.main.run_command(
- svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+ svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
'--username', 'jconstant', '--non-interactive',
'--config-dir', config_dir)
@@ -2531,7 +2551,7 @@ def basic_auth_test(sbox):
# a password and the above cached password belongs to jconstant
expected_err = ["authorization failed: Could not authenticate to server:"]
exit_code, output, errput = svntest.main.run_command(
- svntest.main.svn_binary, expected_err, 1, 'co', sbox.repo_url, wc_dir,
+ svntest.main.svn_binary, expected_err, True, 'co', sbox.repo_url, wc_dir,
'--username', 'jrandom', '--non-interactive', '--config-dir', config_dir)
def basic_add_svn_format_file(sbox):
@@ -2926,7 +2946,6 @@ def quiet_commits(sbox):
# Regression test for issue #4023: on Windows, 'svn rm' incorrectly deletes
# on-disk file if it is case-clashing with intended (non-on-disk) target.
@Issue(4023)
-@XFail(svntest.main.is_fs_case_insensitive)
def rm_missing_with_case_clashing_ondisk_item(sbox):
"""rm missing item with case-clashing ondisk item"""
@@ -2946,8 +2965,10 @@ def rm_missing_with_case_clashing_ondisk
})
svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status)
+ # Verify that the casing is not updated, because the path is on-disk.
+ expected_output = [ 'D %s\n' % iota_path ]
# 'svn rm' iota, should leave IOTA alone.
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
'rm', iota_path)
# Test status: the unversioned IOTA should still be there.
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/blame_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/blame_tests.py Mon Feb 4 20:48:05 2013
@@ -31,6 +31,8 @@ import os, sys, re
import svntest
from svntest.main import server_has_mergeinfo
+from prop_tests import binary_mime_type_on_text_file_warning
+
# For some basic merge setup used by blame -g tests.
from merge_tests import set_up_branch
@@ -126,7 +128,8 @@ def blame_binary(sbox):
# Then do it again, but this time we set the mimetype to binary.
iota = os.path.join(wc_dir, 'iota')
svntest.main.file_append(iota, "More new contents for iota\n")
- svntest.main.run_svn(None, 'propset', 'svn:mime-type', 'image/jpeg', iota)
+ svntest.main.run_svn(binary_mime_type_on_text_file_warning,
+ 'propset', 'svn:mime-type', 'image/jpeg', iota)
svntest.main.run_svn(None, 'ci',
'-m', '', iota)
@@ -859,6 +862,98 @@ def blame_multiple_targets(sbox):
multiple_wc_targets()
multiple_url_targets()
+@Issue(4034)
+def blame_eol_handling(sbox):
+ "blame it on the eol handling"
+
+ sbox.build()
+
+ if os.name == 'nt':
+ native_eol = '\r\n'
+ else:
+ native_eol = '\n'
+
+ for eol, prop, rev in [ ('\r', 'CR', 2),
+ ('\n', 'LF', 4),
+ ('\r\n', 'CRLF', 6),
+ (native_eol, 'native', 8) ]:
+
+ f1 = sbox.ospath('blame-%s' % prop)
+ f2 = sbox.ospath('blame-%s-prop' % prop)
+
+ file_data = 'line 1 ' + eol + \
+ 'line 2 ' + eol + \
+ 'line 3 ' + eol + \
+ 'line 4 ' + eol + \
+ 'line 5 ' + eol
+
+ svntest.main.file_write(f1, file_data, mode='wb')
+ svntest.main.file_write(f2, file_data, mode='wb')
+
+ sbox.simple_add('blame-%s' % prop,
+ 'blame-%s-prop' % prop)
+ sbox.simple_propset('svn:eol-style', prop, 'blame-%s-prop' % prop)
+ sbox.simple_commit()
+
+ file_data = 'line 1 ' + eol + \
+ 'line 2 ' + eol + \
+ 'line 2a' + eol + \
+ 'line 3 ' + eol + \
+ 'line 4 ' + eol + \
+ 'line 4a' + eol + \
+ 'line 5 ' + eol
+
+ svntest.main.file_write(f1, file_data, mode='wb')
+ svntest.main.file_write(f2, file_data, mode='wb')
+
+ sbox.simple_commit()
+
+ expected_output = [
+ ' %d jrandom line 1 \n' % rev,
+ ' %d jrandom line 2 \n' % rev,
+ ' %d jrandom line 2a\n' % (rev + 1),
+ ' %d jrandom line 3 \n' % rev,
+ ' %d jrandom line 4 \n' % rev,
+ ' %d jrandom line 4a\n' % (rev + 1),
+ ' %d jrandom line 5 \n' % rev,
+ ]
+
+ svntest.actions.run_and_verify_svn(f1 + '-base', expected_output, [],
+ 'blame', f1)
+
+ svntest.actions.run_and_verify_svn(f2 + '-base', expected_output, [],
+ 'blame', f2)
+
+ file_data = 'line 1 ' + eol + \
+ 'line 2 ' + eol + \
+ 'line 2a' + eol + \
+ 'line 3 ' + eol + \
+ 'line 3b' + eol + \
+ 'line 4 ' + eol + \
+ 'line 4a' + eol + \
+ 'line 5 ' + eol
+
+ svntest.main.file_write(f1, file_data, mode='wb')
+ svntest.main.file_write(f2, file_data, mode='wb')
+
+ expected_output = [
+ ' %d jrandom line 1 \n' % rev,
+ ' %d jrandom line 2 \n' % rev,
+ ' %d jrandom line 2a\n' % (rev + 1),
+ ' %d jrandom line 3 \n' % rev,
+ ' - - line 3b\n',
+ ' %d jrandom line 4 \n' % rev,
+ ' %d jrandom line 4a\n' % (rev + 1),
+ ' %d jrandom line 5 \n' % rev,
+ ]
+
+ svntest.actions.run_and_verify_svn(f1 + '-modified', expected_output, [],
+ 'blame', f1)
+
+ svntest.actions.run_and_verify_svn(f2 + '-modified', expected_output, [],
+ 'blame', f2)
+
+
########################################################################
# Run the tests
@@ -881,6 +976,7 @@ test_list = [ None,
blame_output_after_merge,
merge_sensitive_blame_and_empty_mergeinfo,
blame_multiple_targets,
+ blame_eol_handling,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/changelist_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/changelist_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/changelist_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/changelist_tests.py Mon Feb 4 20:48:05 2013
@@ -633,9 +633,8 @@ def propmods_with_changelists(sbox):
'A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau', 'A/D/H',
'A/D/H/chi', 'A/D/H/omega', 'A/D/H/psi', 'A/D/gamma',
'A/mu', 'iota', props={ 'name' : 'value' })
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Proplist the 'i' changelist
exit_code, output, errput = svntest.main.run_svn(None, "proplist", "--depth",
@@ -653,9 +652,7 @@ def propmods_with_changelists(sbox):
wc_dir)
expected_disk.tweak('A/D/G/pi', 'A/D/G/rho', 'A/D/H/chi', 'A/D/H/psi',
props={})
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Add 'foo'='bar' property on all files under A/B to depth files and
# in changelist 'a'.
@@ -664,9 +661,7 @@ def propmods_with_changelists(sbox):
os.path.join(wc_dir, 'A', 'B'))
expected_disk.tweak('A/B/lambda', props={ 'name' : 'value',
'foo' : 'bar' })
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Add 'bloo'='blarg' property to all files in changelist 'a'.
svntest.main.run_svn(None, "pset", "--depth", "infinity",
@@ -678,9 +673,7 @@ def propmods_with_changelists(sbox):
expected_disk.tweak('A/B/E/alpha', 'A/B/E/beta', 'A/D/H/omega', 'A/D/gamma',
'iota', props={ 'name' : 'value',
'bloo' : 'blarg' })
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Propget 'name' in files in changelists 'a' and 'i' to depth files.
exit_code, output, errput = svntest.main.run_svn(None, "pget",
@@ -1189,57 +1182,6 @@ def readd_after_revert(sbox):
svntest.actions.run_and_verify_svn(None, None, [],
'add', dummy)
-def empty_pseudo_changelist(sbox):
- "the empty pseudo-changelist"
-
- # Boilerplate.
- sbox.build(read_only = True)
- wc_dir = sbox.wc_dir
-
- # Helper functions.
-
- def found_nodes(*args):
- # Extract the Greek-tree-relative paths.
- return set(map(lambda info: info['Path'][len(wc_dir)+1:],
- svntest.actions.run_and_parse_info(*args)))
-
- def find_nodes(nodeset, *args):
- assert isinstance(nodeset, set)
- foundset = found_nodes(*args)
- nodeset = set(map(lambda path: path.replace('/', os.path.sep), nodeset))
- if nodeset != foundset:
- raise svntest.Failure("Expected nodeset %s but found %s"
- % (nodeset, foundset))
-
- # Convenience variables.
- E_path = sbox.ospath('A/B/E')
- alpha_path = sbox.ospath('A/B/E/alpha')
- beta_path = sbox.ospath('A/B/E/beta')
- iota_path = sbox.ospath('iota')
-
- # Can't add an item to the empty changelist.
- expected_err = 'svn: E125014: .*'
- svntest.actions.run_and_verify_svn(None, [], expected_err,
- 'changelist', '', iota_path)
-
- # Modify alpha and beta
- svntest.main.file_append(alpha_path, "More stuff in alpha\n")
- svntest.main.file_append(beta_path, "More stuff in beta\n")
-
- # Add beta to 'testlist'.
- svntest.actions.run_and_verify_svn(None, None, [],
- 'changelist', 'testlist', beta_path)
-
- # Convenience variables.
- changelist = {
- 'testlist' : set(['A/B/E/beta']),
- '' : set(['A/B/E', 'A/B/E/alpha']),
- }
-
- # Some basic validations.
- find_nodes(changelist['testlist'] | changelist[''], '-R', E_path)
- find_nodes(changelist['testlist'], '--cl', 'testlist', '-R', E_path)
- find_nodes(changelist[''], '--cl', '', '-R', E_path)
########################################################################
# Run the tests
@@ -1263,7 +1205,6 @@ test_list = [ None,
add_remove_non_existent_target,
add_remove_unversioned_target,
readd_after_revert,
- empty_pseudo_changelist,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/commit_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/commit_tests.py Mon Feb 4 20:48:05 2013
@@ -31,6 +31,8 @@ import sys, os, re
import svntest
from svntest import wc
+from prop_tests import binary_mime_type_on_text_file_warning
+
# (abbreviation)
Skip = svntest.testcase.Skip_deco
SkipUnless = svntest.testcase.SkipUnless_deco
@@ -213,7 +215,8 @@ def commit_one_new_binary_file(sbox):
expected_status = make_standard_slew_of_changes(wc_dir)
gloo_path = sbox.ospath('A/D/H/gloo')
- svntest.main.run_svn(None, 'propset', 'svn:mime-type',
+ svntest.main.run_svn(binary_mime_type_on_text_file_warning,
+ 'propset', 'svn:mime-type',
'application/octet-stream', gloo_path)
# Create expected state.
@@ -1589,28 +1592,28 @@ def commit_nonrecursive(sbox):
# These paths are relative to the top of the test's working copy.
file1_path = 'file1'
dir1_path = 'dir1'
- file2_path = os.path.join('dir1', 'file2')
- file3_path = os.path.join('dir1', 'file3')
- dir2_path = os.path.join('dir1', 'dir2')
- file4_path = os.path.join('dir1', 'dir2', 'file4')
+ file2_path = 'dir1/file2'
+ file3_path = 'dir1/file3'
+ dir2_path = 'dir1/dir2'
+ file4_path = 'dir1/dir2/file4'
# Create the new files and directories.
- svntest.main.file_append(os.path.join(wc_dir, file1_path), 'this is file1')
- os.mkdir(os.path.join(wc_dir, dir1_path))
- svntest.main.file_append(os.path.join(wc_dir, file2_path), 'this is file2')
- svntest.main.file_append(os.path.join(wc_dir, file3_path), 'this is file3')
- os.mkdir(os.path.join(wc_dir, dir2_path))
- svntest.main.file_append(os.path.join(wc_dir, file4_path), 'this is file4')
+ svntest.main.file_append(sbox.ospath(file1_path), 'this is file1')
+ os.mkdir(sbox.ospath(dir1_path))
+ svntest.main.file_append(sbox.ospath(file2_path), 'this is file2')
+ svntest.main.file_append(sbox.ospath(file3_path), 'this is file3')
+ os.mkdir(sbox.ospath(dir2_path))
+ svntest.main.file_append(sbox.ospath(file4_path), 'this is file4')
# Add them to version control.
svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
'add', '--depth=empty',
- os.path.join(wc_dir, file1_path),
- os.path.join(wc_dir, dir1_path),
- os.path.join(wc_dir, file2_path),
- os.path.join(wc_dir, file3_path),
- os.path.join(wc_dir, dir2_path),
- os.path.join(wc_dir, file4_path))
+ sbox.ospath(file1_path),
+ sbox.ospath(dir1_path),
+ sbox.ospath(file2_path),
+ sbox.ospath(file3_path),
+ sbox.ospath(dir2_path),
+ sbox.ospath(file4_path))
# Commit. We should see all 6 items (2 dirs, 4 files) get sent.
expected_output = svntest.wc.State(
@@ -1639,12 +1642,12 @@ def commit_nonrecursive(sbox):
expected_status,
None,
'-N',
- os.path.join(wc_dir, file1_path),
- os.path.join(wc_dir, dir1_path),
- os.path.join(wc_dir, file2_path),
- os.path.join(wc_dir, file3_path),
- os.path.join(wc_dir, dir2_path),
- os.path.join(wc_dir, file4_path))
+ sbox.ospath(file1_path),
+ sbox.ospath(dir1_path),
+ sbox.ospath(file2_path),
+ sbox.ospath(file3_path),
+ sbox.ospath(dir2_path),
+ sbox.ospath(file4_path))
#######################################################################
###
@@ -1707,28 +1710,28 @@ def commit_nonrecursive(sbox):
# Now add these directories and files, except the last:
dirA_path = 'dirA'
- fileA_path = os.path.join('dirA', 'fileA')
- fileB_path = os.path.join('dirA', 'fileB')
- dirB_path = os.path.join('dirA', 'dirB')
- nope_1_path = os.path.join(dirB_path, 'nope_1')
- nope_2_path = os.path.join(dirB_path, 'nope_2')
+ fileA_path = 'dirA/fileA'
+ fileB_path = 'dirA/fileB'
+ dirB_path = 'dirA/dirB'
+ nope_1_path = 'dirA/dirB/nope_1'
+ nope_2_path = 'dirA/dirB/nope_2'
# Create the new files and directories.
- os.mkdir(os.path.join(wc_dir, dirA_path))
- svntest.main.file_append(os.path.join(wc_dir, fileA_path), 'fileA')
- svntest.main.file_append(os.path.join(wc_dir, fileB_path), 'fileB')
- os.mkdir(os.path.join(wc_dir, dirB_path))
- svntest.main.file_append(os.path.join(wc_dir, nope_1_path), 'nope_1')
- svntest.main.file_append(os.path.join(wc_dir, nope_2_path), 'nope_2')
+ os.mkdir(sbox.ospath(dirA_path))
+ svntest.main.file_append(sbox.ospath(fileA_path), 'fileA')
+ svntest.main.file_append(sbox.ospath(fileB_path), 'fileB')
+ os.mkdir(sbox.ospath(dirB_path))
+ svntest.main.file_append(sbox.ospath(nope_1_path), 'nope_1')
+ svntest.main.file_append(sbox.ospath(nope_2_path), 'nope_2')
# Add them to version control.
svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
'add', '-N',
- os.path.join(wc_dir, dirA_path),
- os.path.join(wc_dir, fileA_path),
+ sbox.ospath(dirA_path),
+ sbox.ospath(fileA_path),
# don't add fileB
- os.path.join(wc_dir, dirB_path),
- os.path.join(wc_dir, nope_1_path),
+ sbox.ospath(dirB_path),
+ sbox.ospath(nope_1_path),
# don't add nope_2
)
@@ -1765,7 +1768,7 @@ def commit_nonrecursive(sbox):
expected_output,
expected_status,
None,
- '-N', os.path.join(wc_dir, dirA_path))
+ '-N', sbox.ospath(dirA_path))
#----------------------------------------------------------------------
# Regression for #1017: ra_neon was allowing the deletion of out-of-date
@@ -1974,6 +1977,7 @@ def from_wc_top_with_bad_editor(sbox):
exit_code, out, err = svntest.actions.run_and_verify_svn(
"Commit succeeded when should have failed.",
None, svntest.verify.AnyOutput,
+ '--force-interactive',
'ci', '--editor-cmd', 'no_such-editor')
err = " ".join([x.strip() for x in err])
@@ -2920,8 +2924,8 @@ def commit_danglers(sbox):
# dir/subdir should bump LastChangedRev of subdir in originating WC
@XFail()
@Issue(4203)
-def commit_moved_dir_with_nested_mod_in_subdir(sbox):
- "commit of moved dir with nested mod in subdir"
+def last_changed_of_copied_subdir(sbox):
+ "last changed of copied subdir"
sbox.build()
wc_dir = sbox.wc_dir
@@ -3012,7 +3016,7 @@ test_list = [ None,
commit_incomplete,
commit_add_subadd,
commit_danglers,
- commit_moved_dir_with_nested_mod_in_subdir,
+ last_changed_of_copied_subdir,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/copy_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/copy_tests.py Mon Feb 4 20:48:05 2013
@@ -127,8 +127,7 @@ def copy_replace_with_props(sbox, wc_cop
expected_disk.tweak('A/D/G/rho',
props={ 'svn:eol-style': 'LF' })
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Commit props
expected_output = svntest.wc.State(wc_dir, {
@@ -172,8 +171,7 @@ def copy_replace_with_props(sbox, wc_cop
expected_disk.tweak('A/D/G/rho',
contents="This is the file 'pi'.\n",
props=props)
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
# Now commit and verify
expected_status.tweak('A/D/G/rho', status='R ', copied='+', wc_rev='-')
@@ -769,9 +767,11 @@ def mv_and_revert_directory(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'move',
E_path, F_path)
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.tweak('A/B/E', 'A/B/E/alpha', 'A/B/E/beta', status='D ')
+ expected_status.tweak('A/B/E/alpha', 'A/B/E/beta', status='D ')
+ expected_status.tweak('A/B/E', status='D ', moved_to='A/B/F/E')
expected_status.add({
- 'A/B/F/E' : Item(status='A ', wc_rev='-', copied='+'),
+ 'A/B/F/E' : Item(status='A ', wc_rev='-', copied='+',
+ moved_from='A/B/E'),
'A/B/F/E/alpha' : Item(status=' ', wc_rev='-', copied='+'),
'A/B/F/E/beta' : Item(status=' ', wc_rev='-', copied='+'),
})
@@ -781,6 +781,7 @@ def mv_and_revert_directory(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'revert', '--recursive',
new_E_path)
expected_status.remove('A/B/F/E', 'A/B/F/E/alpha', 'A/B/F/E/beta')
+ expected_status.tweak('A/B/E', moved_to=None)
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -906,7 +907,7 @@ def wc_to_repos(sbox):
#----------------------------------------------------------------------
# Issue 1090: various use-cases of 'svn cp URL wc' where the
# repositories might be different, or be the same repository.
-@Issues(1090,1444)
+@Issues(1090, 1444, 3590)
def repos_to_wc(sbox):
"repository to working-copy copy"
@@ -987,17 +988,30 @@ def repos_to_wc(sbox):
E_url = other_repo_url + "/A/B/E"
pi_url = other_repo_url + "/A/D/G/pi"
- # Expect an error in the directory case until we allow this copy to succeed.
- expected_error = "svn: E200007: Source URL '.*foreign repository"
- svntest.actions.run_and_verify_svn(None, None, expected_error,
+ # Finally, for 1.8 we allow this copy to succeed.
+ expected_output = svntest.verify.UnorderedOutput([
+ '--- Copying from foreign repository URL \'%s\':\n' % E_url,
+ 'A %s\n' % sbox.ospath('E'),
+ 'A %s\n' % sbox.ospath('E/beta'),
+ 'A %s\n' % sbox.ospath('E/alpha'),
+ ])
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
'copy', E_url, wc_dir)
- # But file case should work fine.
- svntest.actions.run_and_verify_svn(None, None, [], 'copy', pi_url, wc_dir)
+ expected_output = [
+ '--- Copying from foreign repository URL \'%s\':\n' % pi_url,
+ 'A %s\n' % sbox.ospath('pi'),
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'copy', pi_url, wc_dir)
expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
expected_output.add({
'pi' : Item(status='A ', wc_rev='0', entry_rev='1'),
+ # And from the foreign repository
+ 'E' : Item(status='A ', wc_rev='0'),
+ 'E/beta' : Item(status='A ', wc_rev='0'),
+ 'E/alpha' : Item(status='A ', wc_rev='0'),
})
svntest.actions.run_and_verify_status(wc_dir, expected_output)
@@ -1373,8 +1387,7 @@ def revision_kinds_local_source(sbox):
raise svntest.Failure
# Check that the new files have the right contents
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
#-------------------------------------------------------------
@@ -2110,7 +2123,7 @@ def move_moved_file_and_dir(sbox):
# Create expected status tree
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'A/D/G/E_move_moved/' : Item(status=' ', wc_rev=2),
+ 'A/D/G/E_move_moved' : Item(status=' ', wc_rev=2),
'A/D/G/E_move_moved/alpha' : Item(status=' ', wc_rev=2),
'A/D/G/E_move_moved/beta' : Item(status=' ', wc_rev=2),
'A/B/F/rho_move_moved' : Item(status=' ', wc_rev=2),
@@ -2420,7 +2433,8 @@ def move_file_back_and_forth(sbox):
# Check expected status before commit
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-'),
+ 'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-',
+ moved_from='A/D/G/rho', moved_to='A/D/G/rho'),
})
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -2458,23 +2472,13 @@ def move_dir_back_and_forth(sbox):
# Move the moved dir: D_moved back to its starting
# location at A/D.
- if svntest.main.wc_is_singledb(wc_dir):
- # In single-db target is gone on-disk after it was moved away, so this
- # move works ok
- expected_err = []
- else:
- # In !SINGLE_DB the target of the copy exists on-dir, so svn tries
- # to move the file below the deleted directory
- expected_err = '.*Cannot copy to .*as it is scheduled for deletion'
-
- svntest.actions.run_and_verify_svn(None, None, expected_err,
- 'mv', D_move_path, D_path)
-
- if svntest.main.wc_is_singledb(wc_dir):
- # Verify that the status indicates a replace with history
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/D' : Item(status='R ', copied='+', wc_rev='-'),
+ svntest.actions.run_and_verify_svn(None, None, [], 'mv', D_move_path, D_path)
+
+ # Verify that the status indicates a replace with history
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.add({
+ 'A/D' : Item(status='R ', copied='+', wc_rev='-',
+ moved_from='A/D', moved_to='A/D'),
'A/D/G' : Item(status=' ', copied='+', wc_rev='-'),
'A/D/G/pi' : Item(status=' ', copied='+', wc_rev='-'),
'A/D/G/rho' : Item(status=' ', copied='+', wc_rev='-'),
@@ -2484,8 +2488,8 @@ def move_dir_back_and_forth(sbox):
'A/D/H/chi' : Item(status=' ', copied='+', wc_rev='-'),
'A/D/H/omega' : Item(status=' ', copied='+', wc_rev='-'),
'A/D/H/psi' : Item(status=' ', copied='+', wc_rev='-'),
- })
- svntest.actions.run_and_verify_status(wc_dir, expected_status)
+ })
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
def copy_move_added_paths(sbox):
"copy and move added paths without commits"
@@ -2659,12 +2663,7 @@ def copy_added_paths_with_props(sbox):
'A/D/I' : Item(props={'foo' : 'bar'}),
})
- # Read disk state with props
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
-
- # Compare actual vs. expected disk trees.
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
# Copy added dir I to dir A/C
I_copy_path = sbox.ospath('A/C/I')
@@ -2705,12 +2704,7 @@ def copy_added_paths_with_props(sbox):
expected_status,
None,
wc_dir)
- # Read disk state with props
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
-
- # Compare actual vs. expected disk trees.
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
def copy_added_paths_to_URL(sbox):
"copy added path to URL"
@@ -2871,8 +2865,9 @@ def move_to_relative_paths(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'beta' : Item(status='A ', copied='+', wc_rev='-'),
- 'A/B/E/beta' : Item(status='D ', wc_rev='1')
+ 'beta' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B/E/beta'),
+ 'A/B/E/beta' : Item(status='D ', wc_rev='1', moved_to='beta')
})
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -2893,8 +2888,9 @@ def move_from_relative_paths(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'A/B/F/beta' : Item(status='A ', copied='+', wc_rev='-'),
- 'A/B/E/beta' : Item(status='D ', wc_rev='1')
+ 'A/B/F/beta' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B/E/beta'),
+ 'A/B/E/beta' : Item(status='D ', wc_rev='1', moved_to='A/B/F/beta')
})
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -3327,8 +3323,7 @@ def copy_peg_rev_local_files(sbox):
'sigma' : Item(contents=psi_text, props={}),
})
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 3)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
#----------------------------------------------------------------------
@@ -3410,8 +3405,7 @@ def copy_peg_rev_local_dirs(sbox):
'A/J/beta' : Item(contents="This is the file 'beta'.\n"),
})
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 5)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
#----------------------------------------------------------------------
@@ -4364,9 +4358,9 @@ def copy_added_dir_with_copy(sbox):
sbox.build(read_only=True)
wc_dir = sbox.wc_dir
- new_dir = sbox.ospath('NewDir');
- new_dir2 = sbox.ospath('NewDir2');
- new_dir3 = sbox.ospath('NewDir3');
+ new_dir = sbox.ospath('NewDir')
+ new_dir2 = sbox.ospath('NewDir2')
+ new_dir3 = sbox.ospath('NewDir3')
# Alias for svntest.actions.run_and_verify_svn
rav_svn = svntest.actions.run_and_verify_svn
@@ -4398,7 +4392,6 @@ def copy_added_dir_with_copy(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
-@SkipUnless(svntest.main.is_posix_os)
@Issue(3303)
def copy_broken_symlink(sbox):
"""copy broken symlink"""
@@ -4408,14 +4401,14 @@ def copy_broken_symlink(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- new_symlink = sbox.ospath('new_symlink');
- copied_symlink = sbox.ospath('copied_symlink');
- os.symlink('linktarget', new_symlink)
+ new_symlink = sbox.ospath('new_symlink')
+ copied_symlink = sbox.ospath('copied_symlink')
# Alias for svntest.actions.run_and_verify_svn
rav_svn = svntest.actions.run_and_verify_svn
- rav_svn(None, None, [], 'add', new_symlink)
+ sbox.simple_add_symlink('linktarget', 'new_symlink')
+
rav_svn(None, None, [], 'cp', new_symlink, copied_symlink)
# Check whether both new_symlink and copied_symlink are added to the
@@ -4448,22 +4441,27 @@ def move_dir_containing_move(sbox):
sbox.ospath('A/B_tmp'))
expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
- expected_status.tweak('A/B',
- 'A/B/E',
+ expected_status.tweak('A/B', status='D ', moved_to='A/B_tmp')
+ expected_status.tweak('A/B/E',
'A/B/E/alpha',
'A/B/E/beta',
'A/B/F',
'A/B/lambda',
status='D ')
expected_status.add({
- 'A/B_tmp' : Item(status='A ', copied='+', wc_rev='-'),
+ 'A/B_tmp' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B'),
# alpha has a revision that isn't reported by status.
'A/B_tmp/E' : Item(status=' ', copied='+', wc_rev='-'),
- 'A/B_tmp/E/alpha' : Item(status='D ', copied='+', wc_rev='-'),
- 'A/B_tmp/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
+ 'A/B_tmp/E/alpha' : Item(status='D ', copied='+', wc_rev='-',
+ moved_to='A/B_tmp/E/alpha_moved'),
+ 'A/B_tmp/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B_tmp/E/alpha'),
'A/B_tmp/E/beta' : Item(status=' ', copied='+', wc_rev='-'),
- 'A/B_tmp/F' : Item(status='D ', copied='+', wc_rev='-'),
- 'A/B_tmp/F_moved' : Item(status='A ', copied='+', wc_rev='-'),
+ 'A/B_tmp/F' : Item(status='D ', copied='+', wc_rev='-',
+ moved_to='A/B_tmp/F_moved'),
+ 'A/B_tmp/F_moved' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B_tmp/F'),
'A/B_tmp/lambda' : Item(status=' ', copied='+', wc_rev='-'),
})
@@ -4472,6 +4470,7 @@ def move_dir_containing_move(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
sbox.ospath('A/B_tmp'),
sbox.ospath('A/B_moved'))
+ expected_status.tweak('A/B', moved_to='A/B_moved')
expected_status.remove('A/B_tmp',
'A/B_tmp/E',
'A/B_tmp/E/alpha',
@@ -4481,13 +4480,18 @@ def move_dir_containing_move(sbox):
'A/B_tmp/F_moved',
'A/B_tmp/lambda')
expected_status.add({
- 'A/B_moved' : Item(status='A ', copied='+', wc_rev='-'),
+ 'A/B_moved' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B'),
'A/B_moved/E' : Item(status=' ', copied='+', wc_rev='-'),
- 'A/B_moved/E/alpha' : Item(status='D ', copied='+', wc_rev='-'),
- 'A/B_moved/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
+ 'A/B_moved/E/alpha' : Item(status='D ', copied='+', wc_rev='-',
+ moved_to='A/B_moved/E/alpha_moved'),
+ 'A/B_moved/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B_moved/E/alpha'),
'A/B_moved/E/beta' : Item(status=' ', copied='+', wc_rev='-'),
- 'A/B_moved/F' : Item(status='D ', copied='+', wc_rev='-'),
- 'A/B_moved/F_moved' : Item(status='A ', copied='+', wc_rev='-'),
+ 'A/B_moved/F' : Item(status='D ', copied='+', wc_rev='-',
+ moved_to='A/B_moved/F_moved'),
+ 'A/B_moved/F_moved' : Item(status='A ', copied='+', wc_rev='-',
+ moved_from='A/B_moved/F'),
'A/B_moved/lambda' : Item(status=' ', copied='+', wc_rev='-'),
})
@@ -4517,6 +4521,8 @@ def move_dir_containing_move(sbox):
'A/B/lambda',
'A/B_moved/E/alpha',
'A/B_moved/F')
+ expected_status.tweak('A/B_moved', 'A/B_moved/E/alpha_moved',
+ 'A/B_moved/F_moved', moved_from=None)
svntest.actions.run_and_verify_commit(sbox.wc_dir,
expected_output,
expected_status,
@@ -5160,8 +5166,8 @@ def deleted_file_with_case_clash(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'iota' : Item(status='D ', wc_rev=1),
- 'IOTA' : Item(status='A ', copied='+', wc_rev='-'),
+ 'iota' : Item(status='D ', wc_rev=1, moved_to='IOTA'),
+ 'IOTA' : Item(status='A ', copied='+', wc_rev='-', moved_from='iota'),
})
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -5223,15 +5229,16 @@ def case_only_rename(sbox):
# Create expected status.
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'iota' : Item(status='D ', wc_rev=1),
- 'IoTa' : Item(status='A ', copied='+', wc_rev='-'),
- 'A/B' : Item(status='D ', wc_rev='1'),
+
+ 'iota' : Item(status='D ', wc_rev=1, moved_to='IoTa'),
+ 'IoTa' : Item(status='A ', copied='+', wc_rev='-', moved_from='iota'),
+ 'A/B' : Item(status='D ', wc_rev='1', moved_to='A/b'),
'A/B/lambda' : Item(status='D ', wc_rev='1'),
'A/B/E' : Item(status='D ', wc_rev='1'),
'A/B/E/alpha' : Item(status='D ', wc_rev='1'),
'A/B/E/beta' : Item(status='D ', wc_rev='1'),
'A/B/F' : Item(status='D ', wc_rev='1'),
- 'A/b' : Item(status='A ', copied='+', wc_rev='-'),
+ 'A/b' : Item(status='A ', copied='+', wc_rev='-', moved_from='A/B'),
'A/b/E' : Item(status=' ', copied='+', wc_rev='-'),
'A/b/E/beta' : Item(status=' ', copied='+', wc_rev='-'),
'A/b/E/alpha' : Item(status=' ', copied='+', wc_rev='-'),
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh Mon Feb 4 20:48:05 2013
@@ -219,7 +219,13 @@ fi
[ -r "$MOD_AUTHZ_SVN" ] \
|| fail "authz_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script"
-BUILDDIR_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs"
+for d in "$ABS_BUILDDIR"/subversion/*/.libs; do
+ if [ -z "$BUILDDIR_LIBRARY_PATH" ]; then
+ BUILDDIR_LIBRARY_PATH="$d"
+ else
+ BUILDDIR_LIBRARY_PATH="$BUILDDIR_LIBRARY_PATH:$d"
+ fi
+done
case "`uname`" in
Darwin*)
@@ -435,7 +441,7 @@ MaxRequestsPerChild 0
<IfModule worker.c>
ThreadsPerChild 8
</IfModule>
-MaxClients 16
+MaxClients 32
HostNameLookups Off
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" format
CustomLog "$HTTPD_ROOT/req" format
@@ -517,6 +523,12 @@ if [ $# -eq 1 ] && [ "x$1" = 'x--no-test
exit
fi
+if type time > /dev/null; then
+ TIME_CMD=time
+else
+ TIME_CMD=""
+fi
+
say "starting the tests..."
CLIENT_CMD="$ABS_BUILDDIR/subversion/svn/svn"
@@ -534,13 +546,13 @@ else
fi
if [ $# = 0 ]; then
- time make check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
+ $TIME_CMD make check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
r=$?
else
(cd "$ABS_BUILDDIR/subversion/tests/cmdline/"
TEST="$1"
shift
- time "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@")
+ $TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@")
r=$?
fi
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/depth_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/depth_tests.py Mon Feb 4 20:48:05 2013
@@ -2084,9 +2084,9 @@ def excluded_path_update_operation(sbox)
'A/B/E' : Item(status='D '),
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E');
+ expected_status.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E')
expected_disk = svntest.main.greek_state.copy()
- expected_disk.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E');
+ expected_disk.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E')
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
@@ -2124,8 +2124,8 @@ def excluded_path_update_operation(sbox)
expected_output = svntest.wc.State(wc_dir, {
'A/B' : Item(status='D '),
})
- expected_status.remove('A/B/F', 'A/B/E', 'A/B/lambda', 'A/B');
- expected_disk.remove('A/B/F', 'A/B/E', 'A/B/lambda', 'A/B');
+ expected_status.remove('A/B/F', 'A/B/E', 'A/B/lambda', 'A/B')
+ expected_disk.remove('A/B/F', 'A/B/E', 'A/B/lambda', 'A/B')
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
expected_disk,
@@ -2158,8 +2158,8 @@ def excluded_path_update_operation(sbox)
expected_output = svntest.wc.State(wc_dir, {
'iota' : Item(status='D '),
})
- expected_status.remove('iota');
- expected_disk.remove('iota');
+ expected_status.remove('iota')
+ expected_disk.remove('iota')
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
expected_disk,
@@ -2202,9 +2202,9 @@ def excluded_path_misc_operation(sbox):
'A/B/E' : Item(status='D '),
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E');
+ expected_status.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E')
expected_disk = svntest.main.greek_state.copy()
- expected_disk.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E');
+ expected_disk.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E')
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
@@ -2452,9 +2452,8 @@ def make_depth_tree_conflicts(sbox):
expected_disk = svntest.main.greek_state.copy()
expected_disk.remove('A/mu',
'A/B', 'A/B/lambda', 'A/B/E/alpha', 'A/B/E/beta',
- 'A/D/gamma');
- if svntest.main.wc_is_singledb(sbox.wc_dir):
- expected_disk.remove('A/B/E', 'A/B/F')
+ 'A/D/gamma',
+ 'A/B/E', 'A/B/F')
# This test is set XFail because this (correct) status cannot be
# verified due to an "svn update" bug. The tree-conflict on A/B
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py Mon Feb 4 20:48:05 2013
@@ -34,6 +34,8 @@ logger = logging.getLogger()
import svntest
from svntest import err
+from prop_tests import binary_mime_type_on_text_file_warning
+
# (abbreviation)
Skip = svntest.testcase.Skip_deco
SkipUnless = svntest.testcase.SkipUnless_deco
@@ -1887,7 +1889,7 @@ def diff_force(sbox):
# Append a line to iota and make it binary.
svntest.main.file_append(iota_path, "new line")
- svntest.main.run_svn(None,
+ svntest.main.run_svn(binary_mime_type_on_text_file_warning,
'propset', 'svn:mime-type',
'application/octet-stream', iota_path)
@@ -2304,8 +2306,9 @@ def diff_mime_type_changes(sbox):
'diff', '-r', 'BASE:1')
# Mark iota as a binary file in the working copy.
- svntest.actions.run_and_verify_svn(None, None, [],
- 'propset', 'svn:mime-type',
+ svntest.actions.run_and_verify_svn2(None, None,
+ binary_mime_type_on_text_file_warning, 0,
+ 'propset', 'svn:mime-type',
'application/octet-stream', 'iota')
# Check that the earlier diffs against BASE are unaffected by the
@@ -3336,12 +3339,18 @@ def diff_url_against_local_mods(sbox):
'up')
# In A, add, remove and change a file, and commit.
- make_file_edit_del_add(A);
+ make_file_edit_del_add(A)
svntest.actions.run_and_verify_svn(None, None, [],
'ci', '-m', 'committing A')
# In A2, do the same changes but leave uncommitted.
- make_file_edit_del_add(A2);
+ make_file_edit_del_add(A2)
+
+ # Diff Path of A against working copy of A2.
+ # Output using arbritrary diff handling should be empty.
+ expected_output = []
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'diff', '--old', A, '--new', A2)
# Diff URL of A against working copy of A2. Output should be empty.
expected_output = []
@@ -3352,7 +3361,6 @@ def diff_url_against_local_mods(sbox):
#----------------------------------------------------------------------
# Diff against old revision of the parent directory of a removed and
# locally re-added file.
-@XFail()
@Issue(3797)
def diff_preexisting_rev_against_local_add(sbox):
"diff -r1 of dir with removed-then-readded file"
@@ -3432,6 +3440,52 @@ def diff_git_format_wc_wc(sbox):
svntest.actions.run_and_verify_svn(None, expected, [], 'diff',
'--git', wc_dir)
+@Issue(4294)
+def diff_git_format_wc_wc_dir_mv(sbox):
+ "create a diff in git unidff format for wc dir mv"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ g_path = sbox.ospath('A/D/G')
+ g2_path = sbox.ospath('A/D/G2')
+ pi_path = sbox.ospath('A/D/G/pi')
+ rho_path = sbox.ospath('A/D/G/rho')
+ tau_path = sbox.ospath('A/D/G/tau')
+ new_pi_path = sbox.ospath('A/D/G2/pi')
+ new_rho_path = sbox.ospath('A/D/G2/rho')
+ new_tau_path = sbox.ospath('A/D/G2/tau')
+
+ svntest.main.run_svn(None, 'mv', g_path, g2_path)
+
+ expected_output = make_git_diff_header(pi_path, "A/D/G/pi",
+ "revision 1", "working copy",
+ delete=True) \
+ + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'pi'.\n"
+ ] + make_git_diff_header(rho_path, "A/D/G/rho",
+ "revision 1", "working copy",
+ delete=True) \
+ + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'rho'.\n"
+ ] + make_git_diff_header(tau_path, "A/D/G/tau",
+ "revision 1", "working copy",
+ delete=True) \
+ + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'tau'.\n"
+ ] + make_git_diff_header(new_pi_path, "A/D/G2/pi", None, None, cp=True,
+ copyfrom_path="A/D/G/pi", text_changes=False) \
+ + make_git_diff_header(new_rho_path, "A/D/G2/rho", None, None, cp=True,
+ copyfrom_path="A/D/G/rho", text_changes=False) \
+ + make_git_diff_header(new_tau_path, "A/D/G2/tau", None, None, cp=True,
+ copyfrom_path="A/D/G/tau", text_changes=False)
+
+ expected = svntest.verify.UnorderedOutput(expected_output)
+
+ svntest.actions.run_and_verify_svn(None, expected, [], 'diff',
+ '--git', wc_dir)
+
def diff_git_format_url_wc(sbox):
"create a diff in git unidiff format for url-wc"
sbox.build()
@@ -3711,7 +3765,7 @@ def diff_git_with_props(sbox):
make_diff_prop_header("new") + \
make_diff_prop_added("svn:eol-style", "native") + \
make_git_diff_header(iota_path, "iota",
- "revision 1", "working copy",
+ "revision 2", "working copy",
text_changes=False) + \
make_diff_prop_header("iota") + \
make_diff_prop_added("svn:keywords", "Id")
@@ -3722,7 +3776,6 @@ def diff_git_with_props(sbox):
svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff',
'--git', wc_dir)
-@XFail()
@Issue(4010)
def diff_correct_wc_base_revnum(sbox):
"diff WC-WC shows the correct base rev num"
@@ -3769,24 +3822,31 @@ def diff_git_with_props_on_dir(sbox):
# Now commit the local mod, creating rev 2.
expected_output = svntest.wc.State(wc_dir, {
'.' : Item(verb='Sending'),
+ 'A' : Item(verb='Sending'),
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
'' : Item(status=' ', wc_rev=2),
})
+ expected_status.tweak('A', wc_rev=2)
- svntest.main.run_svn(None, 'ps', 'a','b', wc_dir)
+ sbox.simple_propset('k','v', '', 'A')
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
expected_status, None, wc_dir)
was_cwd = os.getcwd()
os.chdir(wc_dir)
- expected_output = make_git_diff_header(".", "", "revision 1",
+ expected_output = make_git_diff_header("A", "A", "revision 1",
+ "revision 2",
+ add=False, text_changes=False) + \
+ make_diff_prop_header("A") + \
+ make_diff_prop_added("k", "v") + \
+ make_git_diff_header(".", "", "revision 1",
"revision 2",
add=False, text_changes=False) + \
make_diff_prop_header("") + \
- make_diff_prop_added("a", "b")
+ make_diff_prop_added("k", "v")
svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff',
'-c2', '--git')
@@ -3981,7 +4041,7 @@ def diff_arbitrary_files_and_dirs(sbox):
wc_dir = sbox.wc_dir
# diff iota with A/mu
- expected_output = make_diff_header("mu", "working copy", "working copy",
+ expected_output = make_diff_header("iota", "working copy", "working copy",
"iota", "A/mu") + [
"@@ -1 +1 @@\n",
"-This is the file 'iota'.\n",
@@ -4108,7 +4168,7 @@ def diff_properties_no_newline(sbox):
# may not be predictable.)
for pname, old_val, new_val in subtests:
expected_output = \
- make_diff_header("iota", "revision 1", "working copy") + \
+ make_diff_header("iota", "revision 2", "working copy") + \
make_diff_prop_header("iota") + \
make_diff_prop_modified(pname, old_val, new_val)
@@ -4118,6 +4178,28 @@ def diff_properties_no_newline(sbox):
os.chdir(old_cwd)
+def diff_arbitrary_same(sbox):
+ "diff arbitrary files and dirs but same"
+
+ sbox.build(read_only = True)
+
+ sbox.simple_propset('k', 'v', 'A', 'A/mu', 'A/D/G/pi')
+
+ svntest.main.file_write(sbox.ospath('A/mu'), "new mu")
+
+ sbox.simple_copy('A', 'A2')
+
+ svntest.actions.run_and_verify_svn(None, [], [],
+ 'diff',
+ '--old', sbox.ospath('A'),
+ '--new', sbox.ospath('A2'))
+
+ svntest.actions.run_and_verify_svn(None, [], [],
+ 'diff', '--summarize',
+ '--old', sbox.ospath('A'),
+ '--new', sbox.ospath('A2'))
+
+
########################################################################
#Run the tests
@@ -4190,6 +4272,8 @@ test_list = [ None,
diff_arbitrary_files_and_dirs,
diff_properties_only,
diff_properties_no_newline,
+ diff_arbitrary_same,
+ diff_git_format_wc_wc_dir_mv,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/entries-dump.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/entries-dump.c Mon Feb 4 20:48:05 2013
@@ -38,6 +38,7 @@
#include "private/svn_wc_private.h"
#include "../../libsvn_wc/wc.h"
+#include "../../libsvn_wc/lock.h"
static void
str_value(const char *name, const char *value)
@@ -66,21 +67,30 @@ bool_value(const char *name, svn_boolean
}
static svn_error_t *
-entries_dump(const char *dir_path, apr_pool_t *pool)
+entries_dump(const char *dir_path, svn_wc_adm_access_t *related, apr_pool_t *pool)
{
- svn_wc_adm_access_t *adm_access;
+ svn_wc_adm_access_t *adm_access = NULL;
apr_hash_t *entries;
apr_hash_index_t *hi;
svn_boolean_t locked;
svn_error_t *err;
- err = svn_wc_adm_open3(&adm_access, NULL, dir_path, FALSE, 0,
+ err = svn_wc_adm_open3(&adm_access, related, dir_path, FALSE, 0,
NULL, NULL, pool);
if (!err)
{
SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
SVN_ERR(svn_wc_entries_read(&entries, adm_access, TRUE, pool));
}
+ else if (err && err->apr_err == SVN_ERR_WC_LOCKED
+ && related
+ && ! strcmp(dir_path, svn_wc_adm_access_path(related)))
+ {
+ /* Common caller error: Can't open a baton when there is one. */
+ svn_error_clear(err);
+ SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
+ SVN_ERR(svn_wc_entries_read(&entries, related, TRUE, pool));
+ }
else
{
const char *dir_abspath, *lockfile_path;
@@ -102,12 +112,8 @@ entries_dump(const char *dir_path, apr_p
for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
{
- const void *key;
- void *value;
- const svn_wc_entry_t *entry;
-
- apr_hash_this(hi, &key, NULL, &value);
- entry = value;
+ const char *key = svn__apr_hash_index_key(hi);
+ const svn_wc_entry_t *entry = svn__apr_hash_index_val(hi);
SVN_ERR_ASSERT(strcmp(key, entry->name) == 0);
@@ -148,7 +154,7 @@ entries_dump(const char *dir_path, apr_p
/* skip: keep_local */
int_value("depth", entry->depth);
/* skip: tree_conflict_data */
- /* skip: file_external_path */
+ bool_value("file_external", entry->file_external_path != NULL);
/* skip: file_external_peg_rev */
/* skip: file_external_rev */
bool_value("locked", locked && *entry->name == '\0');
@@ -168,6 +174,7 @@ struct directory_walk_baton
svn_wc_context_t *wc_ctx;
const char *root_abspath;
const char *prefix_path;
+ svn_wc_adm_access_t *adm_access;
};
/* svn_wc__node_found_func_t implementation for directory_dump */
@@ -252,6 +259,81 @@ directory_dump(const char *path,
return svn_error_trace(svn_wc_context_destroy(bt.wc_ctx));
}
+static svn_error_t *
+tree_dump_dir(const char *local_abspath,
+ svn_node_kind_t kind,
+ void *walk_baton,
+ apr_pool_t *scratch_pool)
+{
+ struct directory_walk_baton *bt = walk_baton;
+ const char *path;
+
+ if (kind != svn_node_dir)
+ return SVN_NO_ERROR;
+
+ /* If LOCAL_ABSPATH a child of or equal to ROOT_ABSPATH, then display
+ a relative path starting with PREFIX_PATH. */
+ path = svn_dirent_skip_ancestor(bt->root_abspath, local_abspath);
+ if (path)
+ path = svn_dirent_join(bt->prefix_path, path, scratch_pool);
+ else
+ path = local_abspath;
+
+ printf("entries = {}\n");
+ SVN_ERR(entries_dump(path, bt->adm_access, scratch_pool));
+
+ printf("dirs['%s'] = entries\n", path);
+ return SVN_NO_ERROR;
+
+}
+
+static svn_error_t *
+tree_dump_txn(void *baton, svn_sqlite__db_t *db, apr_pool_t *scratch_pool)
+{
+ struct directory_walk_baton *bt = baton;
+
+ SVN_ERR(svn_wc__internal_walk_children(bt->wc_ctx->db, bt->root_abspath, FALSE,
+ NULL, tree_dump_dir, bt,
+ svn_depth_infinity,
+ NULL, NULL, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+tree_dump(const char *path,
+ apr_pool_t *scratch_pool)
+{
+ struct directory_walk_baton bt;
+ svn_sqlite__db_t *sdb;
+ svn_wc__db_t *db;
+
+ bt.prefix_path = path;
+
+ /* Obtain an access baton to allow re-using the same wc_db for all access */
+ SVN_ERR(svn_wc_adm_open3(&bt.adm_access, NULL, path, FALSE, 0, NULL, NULL,
+ scratch_pool));
+
+ db = svn_wc__adm_get_db(bt.adm_access);
+
+ SVN_ERR(svn_wc__context_create_with_db(&bt.wc_ctx, NULL, db, scratch_pool));
+
+ SVN_ERR(svn_dirent_get_absolute(&bt.root_abspath, path, scratch_pool));
+
+ /* And now get us a transaction on the database to avoid obtaining and
+ releasing locks all the time */
+ SVN_ERR(svn_wc__db_temp_borrow_sdb(&sdb, bt.wc_ctx->db, bt.root_abspath,
+ scratch_pool));
+
+ SVN_ERR(svn_sqlite__with_lock(sdb, tree_dump_txn, &bt, scratch_pool));
+
+ /* And close everything we've opened */
+ SVN_ERR(svn_wc_context_destroy(bt.wc_ctx));
+ SVN_ERR(svn_wc_adm_close2(bt.adm_access, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
int
main(int argc, const char *argv[])
{
@@ -263,7 +345,7 @@ main(int argc, const char *argv[])
if (argc < 2 || argc > 4)
{
- fprintf(stderr, "USAGE: entries-dump [--entries|--subdirs] DIR_PATH\n");
+ fprintf(stderr, "USAGE: entries-dump [--entries|--subdirs|--tree-dump] DIR_PATH\n");
exit(1);
}
@@ -285,9 +367,11 @@ main(int argc, const char *argv[])
cmd = NULL;
if (!cmd || !strcmp(cmd, "--entries"))
- err = entries_dump(path, pool);
+ err = entries_dump(path, NULL, pool);
else if (!strcmp(cmd, "--subdirs"))
err = directory_dump(path, pool);
+ else if (!strcmp(cmd, "--tree-dump"))
+ err = tree_dump(path, pool);
else
err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
"Invalid command '%s'",
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/entries_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/entries_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/entries_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/entries_tests.py Mon Feb 4 20:48:05 2013
@@ -185,11 +185,8 @@ def obstructed_entries(sbox):
entries = svntest.main.run_entriesdump(D_path)
check_names(entries, 'H')
- if svntest.main.wc_is_singledb(wc_dir):
- # Data is not missing in single-db
- validate(entries['H'], revision=1)
- else:
- validate(entries['H'], revision=-1)
+ # Data is not missing in single-db
+ validate(entries['H'], revision=1)
### need to get svn_wc__db_read_info() to generate obstructed_add
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/export_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/export_tests.py Mon Feb 4 20:48:05 2013
@@ -370,9 +370,12 @@ def export_working_copy_at_base_revision
gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
E_path = os.path.join(wc_dir, 'A', 'B', 'E')
rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ H_path = os.path.join(wc_dir, 'A', 'D', 'H')
+ phi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'phi')
+ chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
# Make some local modifications: modify mu and C, add kappa and K, delete
- # gamma and E, and replace rho. (Directories can't yet be replaced.)
+ # gamma and E, and replace rho and H.
# These modifications should *not* get exported at the base revision.
svntest.main.file_append(mu_path, 'Appended text')
svntest.main.run_svn(None, 'propset', 'p', 'v', mu_path, C_path)
@@ -383,6 +386,12 @@ def export_working_copy_at_base_revision
svntest.main.run_svn(None, 'rm', rho_path)
svntest.main.file_append(rho_path, "Replacement file 'rho'.")
svntest.main.run_svn(None, 'add', rho_path)
+ svntest.main.run_svn(None, 'rm', H_path)
+ svntest.main.run_svn(None, 'mkdir', H_path)
+ svntest.main.file_append(phi_path, "This is the file 'phi'.")
+ svntest.main.run_svn(None, 'add', phi_path)
+ svntest.main.file_append(chi_path, "Replacement file 'chi'.")
+ svntest.main.run_svn(None, 'add', chi_path)
# Note that we don't tweak the expected disk tree at all,
# since the modifications should not be present.
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/externals_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/externals_tests.py Mon Feb 4 20:48:05 2013
@@ -1055,10 +1055,51 @@ def cannot_move_or_remove_file_externals
'A/B/F', 'A/B/lambda')
expected_status.add({
- 'A/D/exdir_A' : Item(status='X '),
- 'A/D/x' : Item(status='X '),
- 'A/C/exdir_H' : Item(status='X '),
- 'A/C/exdir_G' : Item(status='X '),
+ 'A/D/exdir_A' : Item(status=' ', wc_rev='5', prev_status='X '),
+ 'A/D/exdir_A/D' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/gamma' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/chi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/psi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/omega' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/beta' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/alpha' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/F' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/lambda' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/H' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/psi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/omega' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/C' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/mu' : Item(status=' ', wc_rev='5'),
+
+ 'A/C/exdir_G' : Item(status=' ', prev_status='X ', wc_rev='5'),
+ 'A/C/exdir_G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/rho' : Item(status=' ', wc_rev='5'),
+
+ 'A/D/x' : Item(status='X '),
+ 'A/D/x/y/z/blah' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/lambda' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/beta' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/alpha': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/F' : Item(status=' ', wc_rev='5'),
+
+ 'A/C/exdir_H' : Item(status=' ', prev_status='X ', wc_rev='1'),
+ 'A/C/exdir_H/omega' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/psi' : Item(status=' ', wc_rev='1'),
})
svntest.actions.run_and_verify_commit(wc_dir,
@@ -1433,7 +1474,9 @@ def relegate_external(sbox):
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
expected_status.add({
- 'A/external' : Item(status='X '),
+ 'A/external' : Item(status=' ', prev_status='X ', wc_rev='2'),
+ 'A/external/alpha' : Item(status=' ', wc_rev='2'),
+ 'A/external/beta' : Item(status=' ', wc_rev='2'),
})
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
@@ -1878,10 +1921,52 @@ def exclude_externals(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 6)
expected_status.add({
'A/B/gamma' : Item(status=' ', wc_rev='6', switched='X'),
- 'A/C/exdir_H' : Item(status='X '),
- 'A/C/exdir_G' : Item(status='X '),
- 'A/D/exdir_A' : Item(status='X '),
+
+ 'A/C/exdir_H' : Item(status=' ', prev_status='X ', wc_rev='1'),
+ 'A/C/exdir_H/omega' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/psi' : Item(status=' ', wc_rev='1'),
+
+ 'A/C/exdir_G' : Item(status=' ', prev_status='X ', wc_rev='5'),
+ 'A/C/exdir_G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/tau' : Item(status=' ', wc_rev='5'),
+
+ 'A/D/exdir_A' : Item(status=' ', prev_status='X ', wc_rev='5'),
+ 'A/D/exdir_A/H' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/psi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/omega': Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/D' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/chi': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/omega': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/psi': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/pi': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/rho': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/tau': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/gamma': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/F' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/beta': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/alpha': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/lambda': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/C' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/mu' : Item(status=' ', wc_rev='5'),
+
'A/D/x' : Item(status='X '),
+ 'A/D/x/y/z/blah' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/alpha': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/beta': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/lambda': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/F' : Item(status=' ', wc_rev='5'),
})
svntest.actions.run_and_verify_update(wc_dir,
None, None, expected_status, None,
@@ -2353,13 +2438,28 @@ def commit_include_externals(sbox):
expected_status.tweak(wc_rev='3')
expected_status.add({
- 'A/D/H/xZ' : Item(status='X '),
+ 'A/D/H/xZ' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'A/D/H/xZ/zeta' : Item(status=' ', wc_rev='3'),
+
'Xpegged/xiota' : Item(status=' ', wc_rev='1', switched='X'),
- 'Xpegged/xE' : Item(status='X '),
- 'X/Y/xH' : Item(status='X '),
+ 'Xpegged/xE' : Item(status=' ', prev_status='X ', wc_rev='1'),
+ 'Xpegged/xE/alpha' : Item(status=' ', wc_rev='1'),
+ 'Xpegged/xE/beta' : Item(status=' ', wc_rev='1'),
+
+ 'X/Y/xH' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/Y/xH/psi' : Item(status=' ', wc_rev='3'),
+ 'X/Y/xH/omega' : Item(status=' ', wc_rev='3'),
+ 'X/Y/xH/chi' : Item(status=' ', wc_rev='3'),
+ 'X/Y/xH/xZ' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/Y/xH/xZ/zeta' : Item(status=' ', wc_rev='3'),
+
'X/Y/xlambda' : Item(status=' ', wc_rev='3', switched='X'),
'X/xmu' : Item(status=' ', wc_rev='3', switched='X'),
- 'X/xG' : Item(status='X '),
+
+ 'X/xG' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/xG/rho' : Item(status=' ', wc_rev='3'),
+ 'X/xG/tau' : Item(status=' ', wc_rev='3'),
+ 'X/xG/pi' : Item(status=' ', wc_rev='3'),
})
expected_status.tweak('Xpegged/xiota', wc_rev='1')
@@ -2385,7 +2485,9 @@ def commit_include_externals(sbox):
main.file_append(X_Y_xH_xZ_zeta, 'mod\n')
# svn status
- expected_status.tweak('X/Y/xlambda', 'X/xmu', status='M ')
+ expected_status.tweak('X/Y/xlambda', 'X/xmu', 'X/Y/xH/chi',
+ 'X/Y/xH/xZ/zeta', 'Xpegged/xE/alpha',
+ 'X/xG/pi', status='M ')
actions.run_and_verify_unquiet_status(wc_dir, expected_status)
@@ -2421,9 +2523,10 @@ def commit_include_externals(sbox):
})
expected_status.tweak(status=' ')
- expected_status.tweak('X/Y/xlambda', 'X/xmu', wc_rev='4')
- expected_status.tweak('X/Y/xH', 'X/xG', 'A/D/H/xZ', 'Xpegged/xE',
- status='X ')
+ expected_status.tweak('X/xmu', 'X/Y/xlambda', 'X/Y/xH/xZ/zeta',
+ 'X/Y/xH/chi', 'X/xG/pi', wc_rev='4')
+
+ expected_status.tweak('Xpegged/xE/alpha', status='M ')
actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
None, '--include-externals', wc_dir)
@@ -2451,10 +2554,11 @@ def commit_include_externals(sbox):
expected_disk.tweak('A/B/lambda', 'X/Y/xlambda',
contents="This is the file 'lambda'.\nmod\n")
- expected_status.tweak(wc_rev='4')
- expected_status.tweak('Xpegged/xiota', wc_rev='1')
- expected_status.tweak('A/D/H/xZ', 'Xpegged/xE', 'X/Y/xH', 'X/xG',
- wc_rev=None)
+
+ # Assume everything r4, except what is pegged
+ expected_status.tweak(wc_rev='4')
+ expected_status.tweak('Xpegged/xiota', 'Xpegged/xE', 'Xpegged/xE/alpha',
+ 'Xpegged/xE/beta', wc_rev=1)
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
expected_status, None, None, None, None, None, False, wc_dir)
@@ -2476,7 +2580,8 @@ def commit_include_externals(sbox):
main.file_append(X_Y_xH_xZ_zeta, 'mod\n')
# svn status
- expected_status.tweak('X/Y/xlambda', 'X/xmu', status='M ')
+ expected_status.tweak('X/Y/xlambda', 'X/xmu', 'X/xG/pi',
+ 'X/Y/xH/chi', 'X/Y/xH/xZ/zeta', status='M ')
actions.run_and_verify_unquiet_status(wc_dir, expected_status)
@@ -2495,9 +2600,8 @@ def commit_include_externals(sbox):
expected_status.tweak(status=' ')
expected_status.tweak('X/xmu', wc_rev='5')
- expected_status.tweak('X/Y/xlambda', status='M ')
- expected_status.tweak('X/Y/xH', 'X/xG', 'A/D/H/xZ', 'Xpegged/xE',
- status='X ')
+ expected_status.tweak('X/Y/xlambda', 'X/xG/pi', 'X/Y/xH/chi',
+ 'X/Y/xH/xZ/zeta', 'Xpegged/xE/alpha', status='M ')
actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
None, '--include-externals', '--depth=files', X)
@@ -2523,8 +2627,10 @@ def commit_include_externals(sbox):
expected_status.tweak(wc_rev='5')
expected_status.tweak('Xpegged/xiota', wc_rev='1')
- expected_status.tweak('A/D/H/xZ', 'Xpegged/xE', 'X/Y/xH', 'X/xG',
- wc_rev=None)
+ expected_status.tweak('Xpegged/xiota', 'Xpegged/xE', 'Xpegged/xE/alpha',
+ 'Xpegged/xE/beta', wc_rev=1)
+
+ expected_status.tweak('X/Y/xH/chi', status='M ')
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
expected_status, None, None, None, None, None, False, wc_dir)
@@ -2543,9 +2649,9 @@ def commit_include_externals(sbox):
})
expected_status.tweak(status=' ')
- expected_status.tweak('X/Y/xlambda', wc_rev='6')
- expected_status.tweak('X/Y/xH', 'X/xG', 'A/D/H/xZ', 'Xpegged/xE',
- status='X ')
+ expected_status.tweak('X/Y/xlambda', 'X/xG/pi', wc_rev='6')
+ expected_status.tweak('X/Y/xH/chi', 'X/Y/xH/xZ/zeta', 'Xpegged/xE/alpha',
+ status='M ')
actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
None, X_Y_xlambda, X_xG)
@@ -2555,7 +2661,6 @@ def commit_include_externals(sbox):
@Issue(4252)
-@XFail()
def include_immediate_dir_externals(sbox):
"commit --include-externals --depth=immediates"
# See also comment in append_externals_as_explicit_targets() in
@@ -2646,22 +2751,22 @@ def include_immediate_dir_externals(sbox
expected_status.tweak(wc_rev='3')
expected_status.add({
- 'X/XE' : Item(status='X '),
+ 'X/XE' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/XE/beta' : Item(status=' ', wc_rev='3'),
+ 'X/XE/alpha' : Item(status=' ', wc_rev='3'),
})
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
expected_status, None, None, None, None, None, False, wc_dir)
- # svn ps some change X/XE
- expected_stdout = ["property 'some' set on '" + X_XE + "'\n"]
-
- actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'ps', 'some',
- 'change', X_XE)
+ sbox.simple_propset('some', 'change', 'X/XE')
# echo mod >> X/XE/alpha
main.file_append(X_XE_alpha, 'mod\n')
# svn st X/XE
+ expected_status.tweak('X/XE', status=' M')
+ expected_status.tweak('X/XE/alpha', status='M ')
actions.run_and_verify_unquiet_status(wc_dir, expected_status)
# Expect only the propset on X/XE to be committed.
@@ -2670,6 +2775,7 @@ def include_immediate_dir_externals(sbox
expected_output = svntest.wc.State(wc_dir, {
'X/XE' : Item(verb='Sending'),
})
+ expected_status.tweak('X/XE', status=' ', wc_rev=4)
# Currently this fails because nothing is committed.
#
@@ -2801,7 +2907,9 @@ def dir_external_with_dash_r_only(sbox):
expected_status.tweak(wc_rev='2')
expected_status.tweak('', status=' M')
expected_status.add({
- 'E_ext' : Item(status='X '),
+ 'E_ext' : Item(status=' ', prev_status='X ', wc_rev=1),
+ 'E_ext/beta' : Item(status=' ', wc_rev='1'),
+ 'E_ext/alpha' : Item(status=' ', wc_rev='1'),
})
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
@@ -2992,6 +3100,92 @@ def list_include_externals(sbox):
exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2(
"OUTPUT", expected_stdout, [], 0, 'ls', '--include-externals', C_url)
+@Issue(4293)
+def move_with_file_externals(sbox):
+ "move with file externals"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ sbox.simple_propset('svn:externals', '^/A/mu@1 mu-1\n', 'A/D')
+ sbox.simple_commit()
+
+ sbox.simple_update()
+ sbox.simple_move('A/D', 'A/D_moved')
+ sbox.simple_commit()
+ sbox.simple_update()
+
+@Issue(4185)
+def pinned_externals(sbox):
+ "pinned external"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ # Create X in r2
+ sbox.simple_copy('A', 'X')
+ sbox.simple_mkdir('Z')
+ sbox.simple_commit('')
+
+ repo_X_mu = repo_url + '/X/mu'
+
+ expected_output = verify.RegexOutput([
+ '^ 1 jrandom .* mu$'
+ ])
+
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'list', repo_X_mu, '-v')
+
+ # So, we copied A/mu to X/mu in r2, but its last changed revision is
+ # still r1. It existed as A/mu at r1.
+
+ # In the old format the -r is interpreted like an @1 on checkout.
+
+ sbox.simple_propset('svn:externals',
+ 'old-plain ' + repo_X_mu + '\n' +
+ 'old-rev -r 1 ' + repo_X_mu + '\n' +
+ repo_X_mu + ' new-plain\n' +
+ '-r1 ' + repo_X_mu + ' new-rev\n' +
+ repo_X_mu + '@1 new-peg\n',
+ 'Z')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/D' : Item(status=' U'),
+ 'A/D/exdir_E/beta' : Item(status='A '),
+ 'A/D/exdir_E/alpha' : Item(status='A '),
+ })
+ expected_error = "svn: E205011: Failure.*externals"
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ # The interesting values
+ 'Z/old-plain' : Item(contents="This is the file 'mu'.\n"),
+ 'Z/new-plain' : Item(contents="This is the file 'mu'.\n"),
+
+ # And verifying X
+ 'X/D/H/psi' : Item(contents="This is the file 'psi'.\n"),
+ 'X/D/H/chi' : Item(contents="This is the file 'chi'.\n"),
+ 'X/D/H/omega' : Item(contents="This is the file 'omega'.\n"),
+ 'X/D/G/tau' : Item(contents="This is the file 'tau'.\n"),
+ 'X/D/G/pi' : Item(contents="This is the file 'pi'.\n"),
+ 'X/D/G/rho' : Item(contents="This is the file 'rho'.\n"),
+ 'X/D/gamma' : Item(contents="This is the file 'gamma'.\n"),
+ 'X/B/E/alpha' : Item(contents="This is the file 'alpha'.\n"),
+ 'X/B/E/beta' : Item(contents="This is the file 'beta'.\n"),
+ 'X/B/lambda' : Item(contents="This is the file 'lambda'.\n"),
+ 'X/B/F' : Item(),
+ 'X/C' : Item(),
+ 'X/mu' : Item(contents="This is the file 'mu'.\n"),
+ })
+
+
+ # ### Would be nice if verify update would still verify the result
+ # on exiting with an error. Why would you pass it?
+ svntest.actions.run_and_verify_update(wc_dir, None, None, None,
+ expected_error)
+
+ svntest.actions.verify_disk(wc_dir, expected_disk)
########################################################################
@@ -3043,6 +3237,8 @@ test_list = [ None,
url_to_wc_copy_of_externals,
duplicate_targets,
list_include_externals,
+ move_with_file_externals,
+ pinned_externals,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests.py?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests.py Mon Feb 4 20:48:05 2013
@@ -59,6 +59,9 @@ def load_expected_output(basename):
return exp_stdout, exp_stderr
+# With plaintext password storage enabled, `svn --version' emits a warning:
+warn_line_re = re.compile("WARNING: Plaintext password storage")
+
# This is a list of lines to delete.
del_lines_res = [
# In 'svn --version', the date line is variable, for example:
@@ -100,6 +103,7 @@ rep_lines_res = [
switch_res_line = 'System information:'
# This is a list of lines to delete after having seen switch_res_line.
+switched_warn_line_re = None
switched_del_lines_res = [
# In svn --version --verbose, dependent libs loaded
# shared libs are optional.
@@ -119,20 +123,31 @@ switched_rep_lines_res = [
def process_lines(lines):
"delete lines that should not be compared and search and replace the rest"
output = [ ]
+ warn_re = warn_line_re
del_res = del_lines_res
rep_res = rep_lines_res
+ skip_next_line = 0
for line in lines:
+ if skip_next_line:
+ skip_next_line = 0
+ continue
+
if line.startswith(switch_res_line):
+ warn_re = switched_warn_line_re
del_res = switched_del_lines_res
rep_res = switched_rep_lines_res
# Skip these lines from the output list.
delete_line = 0
- for delete_re in del_res:
- if delete_re.match(line):
- delete_line = 1
- break
+ if warn_re and warn_re.match(line):
+ delete_line = 1
+ skip_next_line = 1 # Ignore the empty line after the warning
+ else:
+ for delete_re in del_res:
+ if delete_re.match(line):
+ delete_line = 1
+ break
if delete_line:
continue
@@ -157,7 +172,7 @@ def run_one_test(sbox, basename, *vararg
exit_code, actual_stdout, actual_stderr = svntest.main.run_svn(1, *varargs)
else:
exit_code, actual_stdout, actual_stderr = svntest.main.run_command(svntest.main.svn_binary,
- 1, 0, *varargs)
+ 1, False, *varargs)
# Delete and perform search and replaces on the lines from the
# actual and expected output that may differ between build