You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2015/02/06 21:18:24 UTC
svn commit: r1657947 [3/3] - in /subversion/branches/reuse-ra-session: ./
subversion/bindings/cxxhl/include/svncxxhl/ subversion/libsvn_fs/
subversion/libsvn_fs_fs/ subversion/libsvn_fs_x/ subversion/libsvn_repos/
subversion/libsvn_subr/ subversion/lib...
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnadmin_tests.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnadmin_tests.py Fri Feb 6 20:18:23 2015
@@ -50,6 +50,7 @@ XFail = svntest.testcase.XFail_deco
Issues = svntest.testcase.Issues_deco
Issue = svntest.testcase.Issue_deco
Wimp = svntest.testcase.Wimp_deco
+SkipDumpLoadCrossCheck = svntest.testcase.SkipDumpLoadCrossCheck_deco
Item = svntest.wc.StateItem
def check_hotcopy_bdb(src, dst):
@@ -424,37 +425,6 @@ def set_changed_path_list(sbox, revision
#----------------------------------------------------------------------
-def test_create(sbox, minor_version=None):
- "'svnadmin create'"
-
-
- repo_dir = sbox.repo_dir
- wc_dir = sbox.wc_dir
-
- svntest.main.safe_rmtree(repo_dir, 1)
- svntest.main.safe_rmtree(wc_dir)
-
- svntest.main.create_repos(repo_dir, minor_version)
-
- svntest.actions.run_and_verify_svn("Creating rev 0 checkout",
- ["Checked out revision 0.\n"], [],
- "checkout",
- sbox.repo_url, wc_dir)
-
-
- svntest.actions.run_and_verify_svn(
- "Running status",
- [], [],
- "status", wc_dir)
-
- svntest.actions.run_and_verify_svn(
- "Running verbose status",
- [" 0 0 ? %s\n" % wc_dir], [],
- "status", "--verbose", wc_dir)
-
- # success
-
-
# dump stream tests need a dump file
def clean_dumpfile():
@@ -486,7 +456,7 @@ dumpfile_revisions = \
def extra_headers(sbox):
"loading of dumpstream with extra headers"
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile = clean_dumpfile()
@@ -501,7 +471,7 @@ def extra_headers(sbox):
def extra_blockcontent(sbox):
"load success on oversized Content-length"
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile = clean_dumpfile()
@@ -519,7 +489,7 @@ def extra_blockcontent(sbox):
def inconsistent_headers(sbox):
"load failure on undersized Content-length"
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile = clean_dumpfile()
@@ -535,7 +505,7 @@ def inconsistent_headers(sbox):
def empty_date(sbox):
"preserve date-less revisions in load"
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile = clean_dumpfile()
@@ -1040,7 +1010,7 @@ def load_with_parent_dir(sbox):
"'svnadmin load --parent-dir' reparents mergeinfo"
## See http://subversion.tigris.org/issues/show_bug.cgi?id=2983. ##
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
@@ -1138,7 +1108,7 @@ def reflect_dropped_renumbered_revs(sbox
## See http://subversion.tigris.org/issues/show_bug.cgi?id=3020. ##
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
@@ -1249,14 +1219,8 @@ def fsfs_recover_handle_missing_revs_or_
def create_in_repo_subdir(sbox):
"'svnadmin create /path/to/repo/subdir'"
+ sbox.build(create_wc=False, empty=True)
repo_dir = sbox.repo_dir
- wc_dir = sbox.wc_dir
-
- svntest.main.safe_rmtree(repo_dir, 1)
- svntest.main.safe_rmtree(wc_dir)
-
- # This should succeed
- svntest.main.create_repos(repo_dir)
success = False
try:
@@ -1284,16 +1248,13 @@ def create_in_repo_subdir(sbox):
@SkipUnless(svntest.main.is_fs_type_fsfs)
+@SkipDumpLoadCrossCheck()
def verify_with_invalid_revprops(sbox):
"svnadmin verify detects invalid revprops file"
+ sbox.build(create_wc=False, empty=True)
repo_dir = sbox.repo_dir
- svntest.main.safe_rmtree(repo_dir, 1)
-
- # This should succeed
- svntest.main.create_repos(repo_dir)
-
# Run a test verify
exit_code, output, errput = svntest.main.run_svnadmin("verify",
sbox.repo_dir)
@@ -1343,7 +1304,7 @@ def dont_drop_valid_mergeinfo_during_inc
"don't filter mergeinfo revs from incremental dump"
# Create an empty repos.
- test_create(sbox)
+ sbox.build(empty=True)
# PART 1: Load a full dump to an empty repository.
#
@@ -1432,7 +1393,7 @@ def dont_drop_valid_mergeinfo_during_inc
dump_fp.close()
# Blow away the current repos and create an empty one in its place.
- test_create(sbox)
+ sbox.build(empty=True)
# Load the three incremental dump files in sequence.
load_dumpstream(sbox, open(dump_file_r1_10).read(), '--ignore-uuid')
@@ -1452,7 +1413,7 @@ def dont_drop_valid_mergeinfo_during_inc
# PART 3: Load a full dump to an non-empty repository.
#
# Reset our sandbox.
- test_create(sbox)
+ sbox.build(empty=True)
# Load this skeleton repos into the empty target:
#
@@ -1503,7 +1464,7 @@ def dont_drop_valid_mergeinfo_during_inc
# PART 4: Load a a series of incremental dumps to an non-empty repository.
#
# Reset our sandbox.
- test_create(sbox)
+ sbox.build(empty=True)
# Load this skeleton repos into the empty target:
load_dumpstream(sbox, dumpfile_skeleton, '--ignore-uuid')
@@ -1531,14 +1492,12 @@ def hotcopy_symlink(sbox):
## See http://subversion.tigris.org/issues/show_bug.cgi?id=2591. ##
+ # Create a repository.
+ sbox.build(create_wc=False, empty=True)
original_repo = sbox.repo_dir
hotcopy_repo, hotcopy_url = sbox.add_repo_path('hotcopy')
- # Create a repository.
- svntest.main.safe_rmtree(original_repo, 1)
- svntest.main.create_repos(original_repo)
-
# Create a file, a dir and a missing path outside the repoitory.
svntest.main.safe_rmtree(sbox.wc_dir, 1)
os.mkdir(sbox.wc_dir)
@@ -1634,7 +1593,7 @@ text
"""
- test_create(sbox)
+ sbox.build(empty=True)
# Try to load the dumpstream, expecting a failure (because of mixed EOLs).
load_and_verify_dumpstream(sbox, [], svntest.verify.AnyOutput,
@@ -1659,8 +1618,8 @@ def verify_non_utf8_paths(sbox):
# Corruption only possible in physically addressed revisions created
# with pre-1.6 servers.
- test_create(sbox,
- minor_version = min(svntest.main.options.server_minor_version,8))
+ sbox.build(empty=True,
+ minor_version=min(svntest.main.options.server_minor_version,8))
# Load the dumpstream
load_and_verify_dumpstream(sbox, [], [], dumpfile_revisions, False,
@@ -1802,7 +1761,7 @@ def load_ranges(sbox):
"'svnadmin load --revision X:Y'"
## See http://subversion.tigris.org/issues/show_bug.cgi?id=3734. ##
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
@@ -2078,8 +2037,7 @@ def mergeinfo_race(sbox):
@Skip(svntest.main.is_fs_type_fsx)
def recover_old_empty(sbox):
"recover empty --compatible-version=1.3"
- svntest.main.safe_rmtree(sbox.repo_dir, 1)
- svntest.main.create_repos(sbox.repo_dir, minor_version=3)
+ sbox.build(create_wc=False, empty=True, minor_version=3)
svntest.actions.run_and_verify_svnadmin(None, None, [],
"recover", sbox.repo_dir)
@@ -2304,9 +2262,7 @@ def verify_invalid_path_changes(sbox):
def verify_denormalized_names(sbox):
"detect denormalized names and name collisions"
- sbox.build(create_wc = False)
- svntest.main.safe_rmtree(sbox.repo_dir, True)
- svntest.main.create_repos(sbox.repo_dir)
+ sbox.build(create_wc=False, empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
@@ -2382,10 +2338,8 @@ def load_ignore_dates(sbox):
# All revisions in the loaded repository should come after this time.
start_time = time.localtime()
time.sleep(1)
-
- sbox.build(create_wc=False)
- svntest.main.safe_rmtree(sbox.repo_dir, True)
- svntest.main.create_repos(sbox.repo_dir)
+
+ sbox.build(create_wc=False, empty=True)
dumpfile_skeleton = open(os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
@@ -2695,9 +2649,7 @@ def fsfs_hotcopy_progress(sbox):
raise svntest.Skip
# Create an empty repository, configure three files per shard.
- sbox.build(create_wc=False)
- svntest.main.safe_rmtree(sbox.repo_dir, True)
- svntest.main.create_repos(sbox.repo_dir)
+ sbox.build(create_wc=False, empty=True)
patch_format(sbox.repo_dir, shard_size=3)
inc_backup_dir, inc_backup_url = sbox.add_repo_path('incremental-backup')
@@ -2811,9 +2763,7 @@ def fsfs_hotcopy_progress_with_revprop_c
raise svntest.Skip
# Create an empty repository, commit several revisions and hotcopy it.
- sbox.build(create_wc=False)
- svntest.main.safe_rmtree(sbox.repo_dir, True)
- svntest.main.create_repos(sbox.repo_dir)
+ sbox.build(create_wc=False, empty=True)
for i in range(6):
svntest.actions.run_and_verify_svn(None, None, [], 'mkdir',
@@ -2858,9 +2808,7 @@ def fsfs_hotcopy_progress_with_revprop_c
def fsfs_hotcopy_progress_old(sbox):
"hotcopy --compatible-version=1.3 progress"
- sbox.build(create_wc=False)
- svntest.main.safe_rmtree(sbox.repo_dir, True)
- svntest.main.create_repos(sbox.repo_dir, minor_version=3)
+ sbox.build(create_wc=False, empty=True, minor_version=3)
inc_backup_dir, inc_backup_url = sbox.add_repo_path('incremental-backup')
@@ -2955,7 +2903,7 @@ def upgrade(sbox):
def load_txdelta(sbox):
"exercising svn_txdelta_target on BDB"
- test_create(sbox)
+ sbox.build(empty=True)
# This dumpfile produced a BDB repository that generated cheksum
# mismatches on read caused by the improper handling of
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svndumpfilter_tests.py Fri Feb 6 20:18:23 2015
@@ -34,8 +34,7 @@ import svntest
from svntest.verify import SVNExpectedStdout, SVNExpectedStderr
# Get some helper routines
-from svnadmin_tests import (load_and_verify_dumpstream, load_dumpstream,
- test_create)
+from svnadmin_tests import load_and_verify_dumpstream, load_dumpstream
from svntest.main import run_svn, run_svnadmin
# (abbreviation)
@@ -87,7 +86,7 @@ def reflect_dropped_renumbered_revs(sbox
## See http://subversion.tigris.org/issues/show_bug.cgi?id=2982. ##
# Test svndumpfilter with include option
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
'with_merges.dump')
@@ -113,7 +112,7 @@ def reflect_dropped_renumbered_revs(sbox
# Test svndumpfilter with exclude option
- test_create(sbox)
+ sbox.build(empty=True)
filtered_out, filtered_err = filter_and_return_output(
dumpfile, 0, "exclude", "branch1",
"--skip-missing-merge-sources",
@@ -137,7 +136,7 @@ def svndumpfilter_loses_mergeinfo(sbox):
## See http://subversion.tigris.org/issues/show_bug.cgi?id=3181. ##
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
'with_merges.dump')
@@ -220,7 +219,7 @@ def dumpfilter_with_targets(sbox):
"svndumpfilter --targets blah"
## See http://subversion.tigris.org/issues/show_bug.cgi?id=2697. ##
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
@@ -243,7 +242,7 @@ def dumpfilter_with_targets(sbox):
def dumpfilter_with_patterns(sbox):
"svndumpfilter --pattern PATH_PREFIX"
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
@@ -263,7 +262,7 @@ def dumpfilter_with_patterns(sbox):
def filter_mergeinfo_revs_outside_of_dump_stream(sbox):
"filter mergeinfo revs outside of dump stream"
- test_create(sbox)
+ sbox.build(empty=True)
# Load a partial dump into an existing repository.
#
@@ -366,7 +365,7 @@ def filter_mergeinfo_revs_outside_of_dum
# Project-Z (Added r5)
# docs/ (Added r6)
# README (Added r6).
- test_create(sbox)
+ sbox.build(empty=True)
skeleton_dumpfile = open(os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
'skeleton_repos.dump')).read()
@@ -495,7 +494,7 @@ def filter_mergeinfo_revs_outside_of_dum
def dropped_but_not_renumbered_empty_revs(sbox):
"mergeinfo maps correctly when dropping revs"
- test_create(sbox)
+ sbox.build(empty=True)
# The dump file mergeinfo_included_full.dump represents this repository:
#
@@ -611,7 +610,7 @@ def match_empty_prefix(sbox):
raise verify.UnexpectedStderr(filtered_err)
# Load the filtered dump into a repo and check the result
- test_create(sbox)
+ sbox.build(empty=True)
load_dumpstream(sbox, filtered_output, '--ignore-uuid')
svntest.actions.run_and_verify_update(sbox.wc_dir,
expected_output,
@@ -645,7 +644,7 @@ def accepts_deltas(sbox):
"accepts deltas in the input"
# Accept format v3 (as created by 'svnadmin --deltas' or svnrdump).
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
'simple_v3.dump')
@@ -679,7 +678,7 @@ def dumpfilter_targets_expect_leading_sl
"dumpfilter targets expect leading '/' in prefixes"
## See http://subversion.tigris.org/issues/show_bug.cgi?id=4234. ##
- test_create(sbox)
+ sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnrdump_tests.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnrdump_tests.py Fri Feb 6 20:18:23 2015
@@ -34,7 +34,6 @@ from svntest.verify import SVNUnexpected
from svntest.verify import SVNExpectedStderr
from svntest.main import write_restrictive_svnserve_conf
from svntest.main import server_has_partial_replay
-from svnadmin_tests import test_create
# (abbreviation)
Skip = svntest.testcase.Skip_deco
@@ -61,15 +60,6 @@ mismatched_headers_re = re.compile(
######################################################################
# Helper routines
-def build_repos(sbox):
- """Build an empty sandbox repository"""
-
- # Cleanup after the last run by removing any left-over repository.
- svntest.main.safe_rmtree(sbox.repo_dir)
-
- # Create an empty repository.
- svntest.main.create_repos(sbox.repo_dir)
-
def compare_repos_dumps(sbox, other_dumpfile,
bypass_prop_validation=False):
"""Compare two dumpfiles, one created from SBOX, and other given
@@ -83,8 +73,7 @@ def compare_repos_dumps(sbox, other_dump
# Load and dump the other dumpfile (using svnadmin)
other_sbox = sbox.clone_dependent()
- svntest.main.safe_rmtree(other_sbox.repo_dir)
- svntest.main.create_repos(other_sbox.repo_dir)
+ other_sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_load(other_sbox.repo_dir, other_dumpfile,
bypass_prop_validation)
other_dumpfile = svntest.actions.run_and_verify_dump(other_sbox.repo_dir)
@@ -104,7 +93,7 @@ def run_dump_test(sbox, dumpfile_name, e
array of optional additional options to pass to 'svnrdump dump'."""
# Create an empty sandbox repository
- build_repos(sbox)
+ sbox.build(create_wc=False, empty=True)
# This directory contains all the dump files
svnrdump_tests_dir = os.path.join(os.path.dirname(sys.argv[0]),
@@ -159,7 +148,7 @@ def run_load_test(sbox, dumpfile_name, e
dump' and check that the same dumpfile is produced"""
# Create an empty sandbox repository
- build_repos(sbox)
+ sbox.build(create_wc=False, empty=True)
# Create the revprop-change hook for this test
svntest.actions.enable_revprop_changes(sbox.repo_dir)
@@ -412,7 +401,7 @@ def reflect_dropped_renumbered_revs(sbox
"svnrdump renumbers dropped revs in mergeinfo"
# Create an empty sandbox repository
- build_repos(sbox)
+ sbox.build(create_wc=False, empty=True)
# Create the revprop-change hook for this test
svntest.actions.enable_revprop_changes(sbox.repo_dir)
@@ -476,7 +465,7 @@ def dont_drop_valid_mergeinfo_during_inc
"don't drop mergeinfo revs in incremental svnrdump"
# Create an empty repos.
- test_create(sbox)
+ sbox.build(empty=True)
# Create the revprop-change hook for this test
svntest.actions.enable_revprop_changes(sbox.repo_dir)
@@ -582,7 +571,7 @@ def dont_drop_valid_mergeinfo_during_inc
dump_fp.close()
# Blow away the current repos and create an empty one in its place.
- test_create(sbox)
+ sbox.build(empty=True)
# Create the revprop-change hook for this test
svntest.actions.enable_revprop_changes(sbox.repo_dir)
@@ -617,7 +606,7 @@ def dont_drop_valid_mergeinfo_during_inc
# PART 3: Load a full dump to an non-empty repository.
#
# Reset our sandbox.
- test_create(sbox)
+ sbox.build(empty=True)
# Create the revprop-change hook for this test
svntest.actions.enable_revprop_changes(sbox.repo_dir)
@@ -678,7 +667,7 @@ def dont_drop_valid_mergeinfo_during_inc
# PART 4: Load a a series of incremental dumps to an non-empty repository.
#
# Reset our sandbox.
- test_create(sbox)
+ sbox.build(empty=True)
# Create the revprop-change hook for this test
svntest.actions.enable_revprop_changes(sbox.repo_dir)
@@ -723,7 +712,7 @@ def svnrdump_load_partial_incremental_du
"svnrdump load partial incremental dump"
# Create an empty sandbox repository
- build_repos(sbox)
+ sbox.build(create_wc=False, empty=True)
# Create the revprop-change hook for this test
svntest.actions.enable_revprop_changes(sbox.repo_dir)
@@ -795,7 +784,7 @@ def load_prop_change_in_non_deltas_dump(
dump = svntest.actions.run_and_verify_dump(sbox.repo_dir, deltas=False)
# Try to load that dump.
- build_repos(sbox)
+ sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(sbox.repo_dir)
svntest.actions.run_and_verify_svnrdump(dump,
[], [], 0,
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_authz_tests.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_authz_tests.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_authz_tests.py Fri Feb 6 20:18:23 2015
@@ -41,7 +41,7 @@ from svntest.main import write_authz_fil
from svntest.main import server_has_partial_replay
# Shared helpers
-from svnsync_tests import build_repos, run_init, run_sync, run_test
+from svnsync_tests import run_init, run_sync, run_test
# (abbreviation)
Skip = svntest.testcase.Skip_deco
@@ -62,7 +62,7 @@ def basic_authz(sbox):
write_restrictive_svnserve_conf(sbox.repo_dir)
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
@@ -140,7 +140,7 @@ def copy_from_unreadable_dir(sbox):
write_restrictive_svnserve_conf(sbox.repo_dir)
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
@@ -251,7 +251,7 @@ def copy_with_mod_from_unreadable_dir(sb
write_restrictive_svnserve_conf(sbox.repo_dir)
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
@@ -340,7 +340,7 @@ def copy_with_mod_from_unreadable_dir_an
write_restrictive_svnserve_conf(sbox.repo_dir)
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
@@ -416,7 +416,7 @@ def specific_deny_authz(sbox):
sbox.build()
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
@@ -477,7 +477,7 @@ def copy_delete_unreadable_child(sbox):
# Create the destination.
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
# Lock down the source.
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_tests.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_tests.py Fri Feb 6 20:18:23 2015
@@ -34,6 +34,7 @@ import re, urllib
import svntest
from svntest.verify import SVNUnexpectedStdout, SVNUnexpectedStderr
from svntest.verify import SVNExpectedStderr
+from svntest.verify import AnyOutput
from svntest.main import server_has_partial_replay
# (abbreviation)
@@ -49,117 +50,57 @@ Item = svntest.wc.StateItem
# Helper routines
-def build_repos(sbox):
- """Avoid the use sbox.build() because we're working with a repos
- other than the Greek tree."""
- # Cleanup after the last run by removing any left-over repository.
- svntest.main.safe_rmtree(sbox.repo_dir)
-
- # Create an empty repository.
- svntest.main.create_repos(sbox.repo_dir)
-
-
-def run_sync(url, source_url=None, expected_error=None,
- source_prop_encoding=None):
+def run_sync(url, source_url=None,
+ source_prop_encoding=None,
+ expected_output=AnyOutput, expected_error=[]):
"Synchronize the mirror repository with the master"
if source_url is not None:
- args = ["synchronize", url, source_url,
- "--username", svntest.main.wc_author,
- "--password", svntest.main.wc_passwd]
+ args = ["synchronize", url, source_url]
else: # Allow testing of old source-URL-less syntax
- args = ["synchronize", url,
- "--username", svntest.main.wc_author,
- "--password", svntest.main.wc_passwd]
+ args = ["synchronize", url]
if source_prop_encoding:
args.append("--source-prop-encoding")
args.append(source_prop_encoding)
- exit_code, output, errput = svntest.main.run_svnsync(*args)
- for index, line in enumerate(errput[:]):
- if re.search("warning: W200007", line):
- del errput[index]
- if errput:
- if expected_error is None:
- raise SVNUnexpectedStderr(errput)
- else:
- expected_error = svntest.verify.RegexOutput(expected_error,
- match_all=False)
- svntest.verify.compare_and_display_lines(None, "STDERR",
- expected_error, errput)
- elif expected_error is not None:
- raise SVNExpectedStderr
- if not output and not expected_error:
- # should be: ['Committed revision 1.\n', 'Committed revision 2.\n']
- raise SVNUnexpectedStdout("Missing stdout")
-
-def run_copy_revprops(url, source_url, expected_error=None,
- source_prop_encoding=None):
+ # Normal expected output is of the form:
+ # ['Transmitting file data .......\n', # optional
+ # 'Committed revision 1.\n',
+ # 'Copied properties for revision 1.\n', ...]
+ svntest.actions.run_and_verify_svnsync(expected_output, expected_error,
+ *args)
+
+def run_copy_revprops(url, source_url,
+ source_prop_encoding=None,
+ expected_output=AnyOutput, expected_error=[]):
"Copy revprops to the mirror repository from the master"
- args = ["copy-revprops", url, source_url,
- "--username", svntest.main.wc_author,
- "--password", svntest.main.wc_passwd]
+ args = ["copy-revprops", url, source_url]
if source_prop_encoding:
args.append("--source-prop-encoding")
args.append(source_prop_encoding)
- exit_code, output, errput = svntest.main.run_svnsync(*args)
- for index, line in enumerate(errput[:]):
- if re.search("warning: W200007", line):
- del errput[index]
- if errput:
- if expected_error is None:
- raise SVNUnexpectedStderr(errput)
- else:
- expected_error = svntest.verify.RegexOutput(expected_error,
- match_all=False)
- svntest.verify.compare_and_display_lines(None, "STDERR",
- expected_error, errput)
- elif expected_error is not None:
- raise SVNExpectedStderr
- if not output and not expected_error:
- # should be: ['Copied properties for revision 1.\n',
- # 'Copied properties for revision 2.\n']
- raise SVNUnexpectedStdout("Missing stdout")
+ # Normal expected output is of the form:
+ # ['Copied properties for revision 1.\n', ...]
+ svntest.actions.run_and_verify_svnsync(expected_output, expected_error,
+ *args)
def run_init(dst_url, src_url, source_prop_encoding=None):
"Initialize the mirror repository from the master"
- args = ["initialize", dst_url, src_url,
- "--username", svntest.main.wc_author,
- "--password", svntest.main.wc_passwd]
+ args = ["initialize", dst_url, src_url]
if source_prop_encoding:
args.append("--source-prop-encoding")
args.append(source_prop_encoding)
- exit_code, output, errput = svntest.main.run_svnsync(*args)
- for index, line in enumerate(errput[:]):
- if re.search("warning: W200007", line):
- del errput[index]
- if errput:
- raise SVNUnexpectedStderr(errput)
- if output != ['Copied properties for revision 0.\n']:
- raise SVNUnexpectedStdout(output)
+ expected_output = ['Copied properties for revision 0.\n']
+ svntest.actions.run_and_verify_svnsync(expected_output, [], *args)
-def run_info(url, expected_error=None):
+def run_info(url, expected_output=AnyOutput, expected_error=[]):
"Print synchronization information of the repository"
- exit_code, output, errput = svntest.main.run_svnsync(
- "info", url,
- "--username", svntest.main.wc_author,
- "--password", svntest.main.wc_passwd)
- if errput:
- if expected_error is None:
- raise SVNUnexpectedStderr(errput)
- else:
- expected_error = svntest.verify.RegexOutput(expected_error,
- match_all=False)
- svntest.verify.compare_and_display_lines(None, "STDERR",
- expected_error, errput)
- elif expected_error is not None:
- raise SVNExpectedStderr
- if not output and not expected_error:
- # should be: ['From URL: http://....\n',
- # 'From UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n',
- # 'Last Merged Revision: XXX\n']
- raise SVNUnexpectedStdout("Missing stdout")
+ # Normal expected output is of the form:
+ # ['From URL: http://....\n',
+ # 'From UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n',
+ # 'Last Merged Revision: XXX\n']
+ svntest.actions.run_and_verify_svnsync(expected_output, expected_error,
+ "info", url)
def setup_and_sync(sbox, dump_file_contents, subdir=None,
@@ -168,7 +109,7 @@ def setup_and_sync(sbox, dump_file_conte
"""Create a repository for SBOX, load it with DUMP_FILE_CONTENTS, then create a mirror repository and sync it with SBOX. If is_src_ra_local or is_dest_ra_local is True, then run_init, run_sync, and run_copy_revprops will use the file:// scheme for the source and destination URLs. Return the mirror sandbox."""
# Create the empty master repository.
- build_repos(sbox)
+ sbox.build(create_wc=False, empty=True)
# Load the repository from DUMP_FILE_PATH.
svntest.actions.run_and_verify_load(sbox.repo_dir, dump_file_contents,
@@ -176,7 +117,7 @@ def setup_and_sync(sbox, dump_file_conte
# Create the empty destination repository.
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
# Setup the mirror repository. Feed it the UUID of the source repository.
exit_code, output, errput = svntest.main.run_svnlook("uuid", sbox.repo_dir)
@@ -346,7 +287,7 @@ def detect_meddling(sbox):
sbox.build("svnsync-meddling")
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
# Make our own destination checkout (have to do it ourself because
# it is not greek).
@@ -380,8 +321,9 @@ def detect_meddling(sbox):
'-m', 'msg',
dest_sbox.wc_dir)
+ expected_error = r".*Destination HEAD \(2\) is not the last merged revision \(1\).*"
run_sync(dest_sbox.repo_url, None,
- ".*Destination HEAD \\(2\\) is not the last merged revision \\(1\\).*")
+ expected_output=[], expected_error=expected_error)
def url_encoding(sbox):
"test url encoding issues"
@@ -427,28 +369,18 @@ def info_synchronized(sbox):
src_uuid = output[0].strip()
dest_sbox = sbox.clone_dependent()
- build_repos(dest_sbox)
+ dest_sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
run_init(dest_sbox.repo_url, sbox.repo_url)
run_sync(dest_sbox.repo_url)
- exit_code, output, errput = svntest.main.run_svnsync(
- "info", dest_sbox.repo_url,
- "--username", svntest.main.wc_author,
- "--password", svntest.main.wc_passwd)
- if errput:
- raise SVNUnexpectedStderr(errput)
-
expected_out = ['Source URL: %s\n' % sbox.repo_url,
'Source Repository UUID: %s\n' % src_uuid,
'Last Merged Revision: 1\n',
]
-
- svntest.verify.compare_and_display_lines(None,
- 'INFO',
- expected_out,
- output)
+ svntest.actions.run_and_verify_svnsync(expected_out, [],
+ "info", dest_sbox.repo_url)
def info_not_synchronized(sbox):
"test info cmd on an un-synchronized repo"
@@ -456,7 +388,7 @@ def info_not_synchronized(sbox):
sbox.build("svnsync-info-not-syncd", False)
run_info(sbox.repo_url,
- ".*Repository '%s' is not initialized.*" % sbox.repo_url)
+ [], ".*Repository '%s' is not initialized.*" % sbox.repo_url)
#----------------------------------------------------------------------
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/actions.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/actions.py Fri Feb 6 20:18:23 2015
@@ -129,7 +129,7 @@ def setup_pristine_greek_repository():
######################################################################
-def guarantee_empty_repository(path):
+def guarantee_empty_repository(path, minor_version):
"""Guarantee that a local svn repository exists at PATH, containing
nothing."""
@@ -139,7 +139,7 @@ def guarantee_empty_repository(path):
# create an empty repository at PATH.
main.safe_rmtree(path)
- main.create_repos(path)
+ main.create_repos(path, minor_version)
# Used by every test, so that they can run independently of one
# another. Every time this routine is called, it recursively copies
@@ -338,28 +338,22 @@ def run_and_verify_load(repo_dir, dump_f
if not isinstance(dump_file_content, list):
raise TypeError("dump_file_content argument should have list type")
expected_stderr = []
+ args = ()
if bypass_prop_validation:
- exit_code, output, errput = main.run_command_stdin(
- main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
- 'load', '--force-uuid', '--quiet', '--bypass-prop-validation', repo_dir)
- else:
- exit_code, output, errput = main.run_command_stdin(
- main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
- 'load', '--force-uuid', '--quiet', repo_dir)
-
- verify.verify_outputs("Unexpected stderr output", None, errput,
- None, expected_stderr)
+ args += ('--bypass-prop-validation',)
+ main.run_command_stdin(
+ main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
+ 'load', '--force-uuid', '--quiet', repo_dir, *args)
def run_and_verify_dump(repo_dir, deltas=False):
"Runs 'svnadmin dump' and reports any errors, returning the dump content."
+ args = ()
if deltas:
- exit_code, output, errput = main.run_svnadmin('dump', '--deltas',
- repo_dir)
- else:
- exit_code, output, errput = main.run_svnadmin('dump', repo_dir)
- verify.verify_outputs("Missing expected output(s)", output, errput,
- verify.AnyOutput, verify.AnyOutput)
+ args += ('--deltas',)
+ exit_code, output, errput = run_and_verify_svnadmin(
+ None, verify.AnyOutput, [],
+ 'dump', '--quiet', repo_dir, *args)
return output
@@ -374,6 +368,8 @@ def run_and_verify_svnrdump(dumpfile_con
if sys.platform == 'win32':
err = map(lambda x : x.replace('\r\n', '\n'), err)
+ # Ignore "consider upgrade" warnings to allow regression tests to pass
+ # when run against a 1.6 mod_dav_svn.
for index, line in enumerate(err[:]):
if re.search("warning: W200007", line):
del err[index]
@@ -405,6 +401,34 @@ def run_and_verify_svnmucc2(message, exp
return exit_code, out, err
+def run_and_verify_svnsync(expected_stdout, expected_stderr,
+ *varargs):
+ """Run svnsync command and check its output"""
+
+ expected_exit = 0
+ if expected_stderr is not None and expected_stderr != []:
+ expected_exit = 1
+ return run_and_verify_svnsync2(expected_stdout, expected_stderr,
+ expected_exit, *varargs)
+
+def run_and_verify_svnsync2(expected_stdout, expected_stderr,
+ expected_exit, *varargs):
+ """Run svnmucc command and check its output and exit code."""
+
+ exit_code, out, err = main.run_svnsync(*varargs)
+
+ # Ignore "consider upgrade" warnings to allow regression tests to pass
+ # when run against a 1.6 mod_dav_svn.
+ for index, line in enumerate(err[:]):
+ if re.search("warning: W200007", line):
+ del err[index]
+
+ verify.verify_outputs("Unexpected output", out, err,
+ expected_stdout, expected_stderr)
+ verify.verify_exit_code("Unexpected return code", exit_code, expected_exit)
+ return exit_code, out, err
+
+
def load_repo(sbox, dumpfile_path = None, dump_str = None,
bypass_prop_validation = False):
"Loads the dumpfile into sbox"
@@ -1882,32 +1906,44 @@ def run_and_verify_revert(expected_paths
# This allows a test to *quickly* bootstrap itself.
-def make_repo_and_wc(sbox, create_wc = True, read_only = False,
- minor_version = None):
- """Create a fresh 'Greek Tree' repository and check out a WC from it.
+def make_repo_and_wc(sbox, create_wc=True, read_only=False, empty=False,
+ minor_version=None):
+ """Create a fresh repository and check out a WC from it. If EMPTY is
+ True, the repository and WC will be empty and at revision 0,
+ otherwise they will contain the 'Greek Tree' at revision 1.
If READ_ONLY is False, a dedicated repository will be created, at the path
- SBOX.repo_dir. If READ_ONLY is True, the pristine repository will be used.
+ SBOX.repo_dir. If READ_ONLY is True, a shared pristine repository may be
+ used or a dedicated repository may be created. (Currently we use a shared
+ pristine 'Greek tree' repo but we create a dedicated empty repo.)
In either case, SBOX.repo_url is assumed to point to the repository that
will be used.
- If create_wc is True, a dedicated working copy will be checked out from
+ If CREATE_WC is True, a dedicated working copy will be checked out from
the repository, at the path SBOX.wc_dir.
Returns on success, raises on failure."""
- # Create (or copy afresh) a new repos with a greek tree in it.
- if not read_only:
- guarantee_greek_repository(sbox.repo_dir, minor_version)
+ # Create or copy or reference the appropriate kind of repository:
+ # if we want a non-empty, Greek repo, refer to the shared one; else
+ # if we want an empty repo or a writable Greek repo, create one.
+ # (We could have a shared empty repo for read-only use, but we don't.)
+ if empty:
+ guarantee_empty_repository(sbox.repo_dir, minor_version)
+ expected_state = svntest.wc.State('', {})
+ else:
+ if not read_only:
+ guarantee_greek_repository(sbox.repo_dir, minor_version)
+ expected_state = main.greek_state
if create_wc:
# Generate the expected output tree.
- expected_output = main.greek_state.copy()
+ expected_output = expected_state.copy()
expected_output.wc_dir = sbox.wc_dir
expected_output.tweak(status='A ', contents=None)
# Generate an expected wc tree.
- expected_wc = main.greek_state
+ expected_wc = expected_state
# Do a checkout, and verify the resulting output and disk contents.
run_and_verify_checkout(sbox.repo_url,
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/main.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/main.py Fri Feb 6 20:18:23 2015
@@ -763,7 +763,8 @@ def run_svnrdump(stdin_input, *varargs):
def run_svnsync(*varargs):
"""Run svnsync with VARARGS, returns exit code as int; stdout, stderr as
list of lines (including line terminators)."""
- return run_command(svnsync_binary, 1, False, *(_with_config_dir(varargs)))
+ return run_command(svnsync_binary, 1, False,
+ *(_with_auth(_with_config_dir(varargs))))
def run_svnversion(*varargs):
"""Run svnversion with VARARGS, returns exit code as int; stdout, stderr
@@ -1229,12 +1230,9 @@ an appropriate list of mappings.
"""
fp = open(sbox.authz_file, 'w')
- # When the sandbox repository is read only it's name will be different from
+ # When the sandbox repository is read only its name will be different from
# the repository name.
- repo_name = sbox.repo_dir
- while repo_name[-1] == '/':
- repo_name = repo_name[:-1]
- repo_name = os.path.basename(repo_name)
+ repo_name = os.path.basename(sbox.repo_dir.rstrip('/'))
if sbox.repo_url.startswith("http"):
default_prefix = repo_name + ":"
Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/sandbox.py?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/sandbox.py Fri Feb 6 20:18:23 2015
@@ -33,6 +33,60 @@ import svntest
logger = logging.getLogger()
+def make_mirror(sbox, source_prop_encoding=None):
+ """Make a mirror of the repository in SBOX.
+ """
+ # Set up the mirror repository.
+ dest_sbox = sbox.clone_dependent()
+ dest_sbox.build(create_wc=False, empty=True)
+ exit_code, output, errput = svntest.main.run_svnlook("uuid", sbox.repo_dir)
+ svntest.actions.run_and_verify_svnadmin2("Setting UUID", None, None, 0,
+ 'setuuid', dest_sbox.repo_dir,
+ output[0][:-1])
+ svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
+
+ repo_url = sbox.repo_url
+ dest_repo_url = dest_sbox.repo_url
+
+ # Synchronize it.
+ args = (svntest.main.svnrdump_crosscheck_authentication,)
+ if source_prop_encoding:
+ args = args + ("--source-prop-encoding=" + source_prop_encoding,)
+ svntest.actions.run_and_verify_svnsync(svntest.verify.AnyOutput, [],
+ "initialize",
+ dest_repo_url, repo_url, *args)
+ svntest.actions.run_and_verify_svnsync(None, [],
+ "synchronize",
+ dest_repo_url, repo_url, *args)
+
+ return dest_sbox
+
+def verify_mirror(repo_url, repo_dir, expected_dumpfile):
+ """Compare the repository content at REPO_URL/REPO_DIR with that in
+ EXPECTED_DUMPFILE (which is a non-delta dump).
+ """
+ # Remove some SVNSync-specific housekeeping properties from the
+ # mirror repository in preparation for the comparison dump.
+ for prop_name in ("svn:sync-from-url", "svn:sync-from-uuid",
+ "svn:sync-last-merged-rev"):
+ svntest.actions.run_and_verify_svn(
+ None, None, [], "propdel", "--revprop", "-r", "0",
+ prop_name, repo_url)
+ # Create a dump file from the mirror repository.
+ dumpfile_s_n = svntest.actions.run_and_verify_dump(repo_dir)
+ # Compare the mirror's dumpfile, ignoring any expected differences:
+ # The original dumpfile in some cases lacks 'Text-content-sha1' headers;
+ # the mirror dump always has them -- ### Why?
+ svnsync_headers_always = re.compile("Text-content-sha1: ")
+ dumpfile_a_n_cmp = [l for l in expected_dumpfile
+ if not svnsync_headers_always.match(l)]
+ dumpfile_s_n_cmp = [l for l in dumpfile_s_n
+ if not svnsync_headers_always.match(l)]
+ svntest.verify.compare_dump_files(None, None,
+ dumpfile_a_n_cmp,
+ dumpfile_s_n_cmp)
+
+
class Sandbox:
"""Manages a sandbox (one or more repository/working copy pairs) for
a test to operate within."""
@@ -49,7 +103,7 @@ class Sandbox:
self.was_cwd = os.getcwd()
- def _set_name(self, name, read_only=False):
+ def _set_name(self, name, read_only=False, empty=False):
"""A convenience method for renaming a sandbox, useful when
working with multiple repositories in the same unit test."""
if not name is None:
@@ -57,7 +111,7 @@ class Sandbox:
self.read_only = read_only
self.wc_dir = os.path.join(svntest.main.general_wc_dir, self.name)
self.add_test_path(self.wc_dir)
- if not read_only:
+ if empty or not read_only: # use a local repo
self.repo_dir = os.path.join(svntest.main.general_repo_dir, self.name)
self.repo_url = (svntest.main.options.test_area_url + '/'
+ urllib.pathname2url(self.repo_dir))
@@ -91,14 +145,16 @@ class Sandbox:
shutil.copytree(self.wc_dir, clone.wc_dir, symlinks=True)
return clone
- def build(self, name=None, create_wc=True, read_only=False,
+ def build(self, name=None, create_wc=True, read_only=False, empty=False,
minor_version=None):
"""Make a 'Greek Tree' repo (or refer to the central one if READ_ONLY),
+ or make an empty repo if EMPTY is true,
and check out a WC from it (unless CREATE_WC is false). Change the
sandbox's name to NAME. See actions.make_repo_and_wc() for details."""
- self._set_name(name, read_only)
+ self._set_name(name, read_only, empty)
self._ensure_authz()
- svntest.actions.make_repo_and_wc(self, create_wc, read_only, minor_version)
+ svntest.actions.make_repo_and_wc(self, create_wc, read_only, empty,
+ minor_version)
self._is_built = True
def _ensure_authz(self):
@@ -474,6 +530,13 @@ class Sandbox:
ignore_empty_prop_sections=True,
ignore_number_of_blank_lines=True)
+ # Run the repository through 'svnsync' and check that this does not
+ # change the repository content. (Don't bother if it's already been
+ # created by svnsync.)
+ if "svn:sync-from-url\n" not in dumpfile_a_n:
+ dest_sbox = make_mirror(self)
+ verify_mirror(dest_sbox.repo_url, dest_sbox.repo_dir, dumpfile_a_n)
+
def verify(self, skip_cross_check=False):
"""Do additional testing that should hold for any sandbox, such as
verifying that the repository can be dumped.
Modified: subversion/branches/reuse-ra-session/subversion/tests/libsvn_fs/locks-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_fs/locks-test.c?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/libsvn_fs/locks-test.c Fri Feb 6 20:18:23 2015
@@ -1079,6 +1079,61 @@ lock_cb_error(const svn_test_opts_t *opt
return SVN_NO_ERROR;
}
+static svn_error_t *
+obtain_write_lock_failure(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_fs_t *fs;
+ svn_revnum_t newrev;
+ svn_fs_access_t *access;
+ svn_fs_lock_target_t *target;
+ struct lock_many_baton_t baton;
+ apr_hash_t *lock_paths, *unlock_paths;
+
+ /* The test makes sense only for FSFS. */
+ if (strcmp(opts->fs_type, SVN_FS_TYPE_FSFS) != 0)
+ return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
+ "this will test FSFS repositories only");
+
+ SVN_ERR(create_greek_fs(&fs, &newrev, "test-obtain-write-lock-failure",
+ opts, pool));
+ SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
+ SVN_ERR(svn_fs_set_access(fs, access));
+
+ /* Make a read only 'write-lock' file. This prevents any write operations
+ from being executed. */
+ SVN_ERR(svn_io_set_file_read_only("test-obtain-write-lock-failure/write-lock",
+ FALSE, pool));
+
+ baton.results = apr_hash_make(pool);
+ baton.pool = pool;
+ baton.count = 0;
+
+ /* Trying to lock some paths. We don't really care about error; the test
+ shouldn't crash. */
+ target = svn_fs_lock_target_create(NULL, newrev, pool);
+ lock_paths = apr_hash_make(pool);
+ svn_hash_sets(lock_paths, "/iota", target);
+ svn_hash_sets(lock_paths, "/A/mu", target);
+
+ apr_hash_clear(baton.results);
+ SVN_TEST_ASSERT_ANY_ERROR(svn_fs_lock_many(fs, lock_paths, "comment", 0, 0, 0,
+ lock_many_cb, &baton, pool, pool));
+
+ /* Trying to unlock some paths. We don't really care about error; the test
+ shouldn't crash. */
+ unlock_paths = apr_hash_make(pool);
+ svn_hash_sets(unlock_paths, "/iota", "");
+ svn_hash_sets(unlock_paths, "/A/mu", "");
+
+ apr_hash_clear(baton.results);
+ SVN_TEST_ASSERT_ANY_ERROR(svn_fs_unlock_many(fs, unlock_paths, TRUE,
+ lock_many_cb, &baton, pool,
+ pool));
+
+ return SVN_NO_ERROR;
+}
+
/* ------------------------------------------------------------------------ */
/* The test table. */
@@ -1114,6 +1169,8 @@ static struct svn_test_descriptor_t test
"lock multiple paths"),
SVN_TEST_OPTS_PASS(lock_cb_error,
"lock callback error"),
+ SVN_TEST_OPTS_PASS(obtain_write_lock_failure,
+ "lock/unlock when 'write-lock' couldn't be obtained"),
SVN_TEST_NULL
};
Modified: subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c Fri Feb 6 20:18:23 2015
@@ -3562,6 +3562,56 @@ test_repos_fs_type(const svn_test_opts_t
return SVN_NO_ERROR;
}
+static svn_error_t *
+deprecated_access_context_api(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_repos_t *repos;
+ svn_fs_access_t *access;
+ svn_fs_txn_t *txn;
+ svn_fs_root_t *root;
+ const char *conflict;
+ svn_revnum_t new_rev;
+ const char *hook;
+
+ /* Create test repository. */
+ SVN_ERR(svn_test__create_repos(&repos,
+ "test-repo-deprecated-access-context-api",
+ opts, pool));
+
+ /* Set an empty pre-commit hook. */
+#ifdef WIN32
+ hook = apr_pstrcat(pool, svn_repos_pre_commit_hook(repos, pool), ".bat",
+ SVN_VA_NULL);
+ SVN_ERR(svn_io_file_create(hook,
+ "exit 0" APR_EOL_STR,
+ pool));
+#else
+ hook = svn_repos_pre_commit_hook(repos, pool);
+ SVN_ERR(svn_io_file_create(hook,
+ "#!/bin/sh" APR_EOL_STR "exit 0" APR_EOL_STR,
+ pool));
+ SVN_ERR(svn_io_set_file_executable(hook, TRUE, FALSE, pool));
+#endif
+
+ /* Set some access context using svn_fs_access_add_lock_token(). */
+ SVN_ERR(svn_fs_create_access(&access, "jrandom", pool));
+ SVN_ERR(svn_fs_access_add_lock_token(access, "opaquelocktoken:abc"));
+ SVN_ERR(svn_fs_set_access(svn_repos_fs(repos), access));
+
+ /* Commit a new revision. */
+ SVN_ERR(svn_repos_fs_begin_txn_for_commit2(&txn, repos, 0,
+ apr_hash_make(pool), pool));
+ SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+ SVN_ERR(svn_fs_make_dir(root, "/whatever", pool));
+ SVN_ERR(svn_repos_fs_commit_txn(&conflict, repos, &new_rev, txn, pool));
+
+ SVN_TEST_STRING_ASSERT(conflict, NULL);
+ SVN_TEST_ASSERT(new_rev == 1);
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
static int max_threads = 4;
@@ -3615,6 +3665,8 @@ static struct svn_test_descriptor_t test
"test svn_repos__config_pool_*"),
SVN_TEST_OPTS_PASS(test_repos_fs_type,
"test test_repos_fs_type"),
+ SVN_TEST_OPTS_PASS(deprecated_access_context_api,
+ "test deprecated access context api"),
SVN_TEST_NULL
};
Modified: subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/op-depth-test.c?rev=1657947&r1=1657946&r2=1657947&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/op-depth-test.c Fri Feb 6 20:18:23 2015
@@ -5175,8 +5175,10 @@ mixed_rev_move(const svn_test_opts_t *op
SVN_ERR(sbox_wc_mkdir(&b, "A"));
SVN_ERR(sbox_wc_commit(&b, ""));
SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/D"));
SVN_ERR(sbox_wc_commit(&b, ""));
SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/D/E"));
SVN_ERR(sbox_wc_commit(&b, ""));
{
@@ -5185,6 +5187,8 @@ mixed_rev_move(const svn_test_opts_t *op
{0, "A", "normal", 1, "A"},
{0, "A/B", "normal", 2, "A/B"},
{0, "A/B/C", "normal", 3, "A/B/C"},
+ {0, "A/D", "normal", 2, "A/D"},
+ {0, "A/D/E", "normal", 3, "A/D/E"},
{0}
};
SVN_ERR(check_db_rows(&b, "", nodes));
@@ -5204,20 +5208,30 @@ mixed_rev_move(const svn_test_opts_t *op
{0, "A", "normal", 1, "A"},
{0, "A/B", "normal", 2, "A/B"},
{0, "A/B/C", "normal", 3, "A/B/C"},
+ {0, "A/D", "normal", 2, "A/D"},
+ {0, "A/D/E", "normal", 3, "A/D/E"},
{1, "A", "base-deleted", NO_COPY_FROM, "X"},
{1, "A/B", "base-deleted", NO_COPY_FROM},
{1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/D/E", "base-deleted", NO_COPY_FROM},
{1, "X", "normal", 1, "A", MOVED_HERE},
{1, "X/B", "not-present", 2, "A/B"},
+ {1, "X/D", "not-present", 2, "A/D"},
{2, "X/B", "normal", 2, "A/B"},
{2, "X/B/C", "not-present", 3, "A/B/C"},
+ {2, "X/D", "normal", 2, "A/D"},
+ {2, "X/D/E", "not-present", 3, "A/D/E"},
{3, "X/B/C", "normal", 3, "A/B/C"},
+ {3, "X/D/E", "normal", 3, "A/D/E"},
+
{0}
};
SVN_ERR(check_db_rows(&b, "", nodes));
}
/* ### These values PASS but I'm not sure they are correct. */
+ /* A/B/C doesn't exist as X/B/C at op depth 1, but is reported */
SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
sbox_wc_path(&b, "A/B/C"), pool, pool));
SVN_ERR(check_moved_to(moved_tos, 0, 1, "X/B/C"));
@@ -5243,32 +5257,109 @@ mixed_rev_move(const svn_test_opts_t *op
{0, "A", "normal", 1, "A"},
{0, "A/B", "normal", 2, "A/B"},
{0, "A/B/C", "normal", 3, "A/B/C"},
+ {0, "A/D", "normal", 2, "A/D"},
+ {0, "A/D/E", "normal", 3, "A/D/E"},
{1, "A", "base-deleted", NO_COPY_FROM, "X"},
{1, "A/B", "base-deleted", NO_COPY_FROM},
{1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/D/E", "base-deleted", NO_COPY_FROM},
{1, "X", "normal", 1, "A", MOVED_HERE},
{1, "X/B", "not-present", 2, "A/B"},
+ {1, "X/D", "not-present", 2, "A/D"},
+ {2, "X/D", "normal", 2, "A/D"},
+ {2, "X/D/E", "not-present", 3, "A/D/E"},
{2, "X/Y", "normal", 2, "A/B"},
{2, "X/Y/C", "not-present", NO_COPY_FROM},
{3, "X/Y/C", "normal", 3, "A/B/C"},
+ {3, "X/D/E", "normal", 3, "A/D/E"},
+
{0}
};
SVN_ERR(check_db_rows(&b, "", nodes));
}
+ /* A/B/C still doesn't exist as X/B/C at op depth 1 */
SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
sbox_wc_path(&b, "A/B/C"), pool, pool));
- SVN_TEST_ASSERT(moved_tos->nelts == 0);
+ SVN_ERR(check_moved_to(moved_tos, 0, 1, "X/B/C"));
+ SVN_TEST_ASSERT(moved_tos->nelts == 1);
+ /* A/B doesn't exist exist as X/B and the move to Y can't be tracked in
+ the current scheme */
SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
sbox_wc_path(&b, "A/B"), pool, pool));
- SVN_TEST_ASSERT(moved_tos->nelts == 0);
+ SVN_ERR(check_moved_to(moved_tos, 0, 1, "X/B"));
+ SVN_TEST_ASSERT(moved_tos->nelts == 1);
SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
sbox_wc_path(&b, "A"), pool, pool));
SVN_ERR(check_moved_to(moved_tos, 0, 1, "X"));
SVN_TEST_ASSERT(moved_tos->nelts == 1);
+
+ SVN_ERR(sbox_wc_mkdir(&b, "Z"));
+ SVN_ERR(sbox_wc_commit(&b, "Z")); /* r4 */
+
+ SVN_ERR(sbox_wc_update(&b, "", 4));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 4, ""},
+ {0, "A", "normal", 4, "A"},
+ {0, "A/B", "normal", 4, "A/B"},
+ {0, "A/B/C", "normal", 4, "A/B/C"},
+ {0, "A/D", "normal", 4, "A/D"},
+ {0, "A/D/E", "normal", 4, "A/D/E"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/D/E", "base-deleted", NO_COPY_FROM},
+ /* X is expanded on update. The not-present nodes are now here */
+ {1, "X", "normal", 4, "A", MOVED_HERE},
+ {1, "X/B", "normal", 4, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 4, "A/B/C", MOVED_HERE},
+ {1, "X/D", "normal", 4, "A/D", MOVED_HERE},
+ {1, "X/D/E", "normal", 4, "A/D/E", MOVED_HERE},
+ {2, "X/D", "normal", 2, "A/D"},
+ {2, "X/D/E", "not-present", 3, "A/D/E"},
+ {2, "X/Y", "normal", 2, "A/B"},
+ {2, "X/Y/C", "not-present", NO_COPY_FROM},
+ {3, "X/D/E", "normal", 3, "A/D/E"},
+ {3, "X/Y/C", "normal", 3, "A/B/C"},
+
+ {0, "Z", "normal", 4, "Z"},
+ {0}
+ };
+
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
+ sbox_wc_path(&b, "A/B/C"), pool, pool));
+ SVN_ERR(check_moved_to(moved_tos, 0, 1, "X/B/C"));
+ SVN_TEST_ASSERT(moved_tos->nelts == 1);
+
+ SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
+ sbox_wc_path(&b, "A/B"), pool, pool));
+ SVN_ERR(check_moved_to(moved_tos, 0, 1, "X/B"));
+ SVN_TEST_ASSERT(moved_tos->nelts == 1);
+
+ SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
+ sbox_wc_path(&b, "A"), pool, pool));
+ SVN_ERR(check_moved_to(moved_tos, 0, 1, "X"));
+ SVN_TEST_ASSERT(moved_tos->nelts == 1);
+
+ {
+ conflict_info_t conflicts[] = {
+ { "X/D", FALSE, FALSE, TRUE },
+ {0}
+ };
+
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
+ }
+
return SVN_NO_ERROR;
}
@@ -5457,6 +5548,30 @@ nested_move_update(const svn_test_opts_t
SVN_ERR(sbox_wc_update(&b, "", 2));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "A/B/C/f", "normal", 2, "A/B/C/f"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "A2"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/f", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {1, "A2/B/C/f", "normal", 1, "A/B/C/f", MOVED_HERE},
+ {3, "A2/B/C", "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+ {3, "A2/B/C/f", "base-deleted", NO_COPY_FROM},
+ {3, "A2/B/C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A2/B/C2/f", "normal", 1, "A/B/C/f", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
/* Following the A->A2 move should raise a tree-conflict on A2/B/C,
resolving that may require an explicit resolve. */
SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
@@ -7933,6 +8048,42 @@ move_depth_expand(const svn_test_opts_t
SVN_ERR(sbox_wc_update_depth(&b, "", 1, svn_depth_infinity, TRUE));
+ /* And now verify that there are no not-present nodes left and a
+ consistent working copy */
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, "" },
+
+ {0, "A", "normal", 1, "A" },
+ {0, "A/A", "normal", 1, "A/A" },
+ {0, "A/A/A", "normal", 1, "A/A/A" },
+ {0, "A/A/A/A", "normal", 1, "A/A/A/A" },
+ {0, "A/B", "normal", 1, "A/B" },
+ {0, "A/B/A", "normal", 1, "A/B/A" },
+ {0, "A/B/A/A", "normal", 1, "A/B/A/A" },
+
+ {1, "A", "base-deleted", NO_COPY_FROM, "C" },
+ {1, "A/A", "base-deleted", NO_COPY_FROM },
+ {1, "A/A/A", "base-deleted", NO_COPY_FROM },
+ {1, "A/B", "base-deleted", NO_COPY_FROM },
+ {1, "A/B/A", "base-deleted", NO_COPY_FROM },
+ {1, "A/B/A/A", "base-deleted", NO_COPY_FROM },
+ {1, "A/A/A/A", "base-deleted", NO_COPY_FROM },
+
+ {1, "C", "normal", 1, "A", MOVED_HERE },
+ {1, "C/A", "normal", 1, "A/A", MOVED_HERE },
+ {1, "C/B", "not-present", 0, "A/B", MOVED_HERE},
+
+ {2, "C/B", "normal", 1, "A/A" },
+
+ {3, "C/A/A", "normal", NO_COPY_FROM },
+ {3, "C/B/A", "normal", NO_COPY_FROM },
+
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
/* This used to cause a segfault. Then it asserted in a different place */
SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
svn_wc_conflict_choose_mine_conflict));
@@ -7964,10 +8115,6 @@ move_depth_expand(const svn_test_opts_t
{1, "C/A", "normal", 1, "A/A", MOVED_HERE },
{1, "C/A/A", "normal", 1, "A/A/A", MOVED_HERE },
{1, "C/A/A/A", "normal", 1, "A/A/A/A", MOVED_HERE },
-
- {3, "C/A/A", "normal", NO_COPY_FROM },
- {3, "C/A/A/A", "base-deleted", NO_COPY_FROM },
-
{1, "C/B", "normal", 1, "A/B", MOVED_HERE },
{1, "C/B/A", "normal", 1, "A/B/A", MOVED_HERE },
{1, "C/B/A/A", "normal", 1, "A/B/A/A", MOVED_HERE },
@@ -7976,6 +8123,8 @@ move_depth_expand(const svn_test_opts_t
{2, "C/B/A", "base-deleted", NO_COPY_FROM },
{2, "C/B/A/A", "base-deleted", NO_COPY_FROM },
+ {3, "C/A/A", "normal", NO_COPY_FROM },
+ {3, "C/A/A/A", "base-deleted", NO_COPY_FROM },
{3, "C/B/A", "normal", NO_COPY_FROM },
{0}
@@ -9183,6 +9332,19 @@ del4_update_delself_AAA(const svn_test_o
/* Update and resolve via mine strategy */
SVN_ERR(sbox_wc_update(&b, "", 2));
+ {
+ conflict_info_t conflicts[] = {
+ {"A", FALSE, FALSE, TRUE},
+ {"B", FALSE, FALSE, TRUE},
+ {"C/A", FALSE, FALSE, TRUE},
+ {"D/A/A", FALSE, FALSE, TRUE},
+ {0}
+ };
+
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
+ }
+
+
/* Resolve a few conflicts manually */
SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
svn_wc_conflict_choose_mine_conflict));
@@ -9191,6 +9353,52 @@ del4_update_delself_AAA(const svn_test_o
SVN_ERR(sbox_wc_resolve(&b, "C/A", svn_depth_empty,
svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/A", "normal", 2, "A/A"},
+ {0, "B", "normal", 2, "B"},
+ {0, "B/A", "normal", 2, "B/A"},
+ {0, "C", "normal", 2, "C"},
+ {0, "C/A", "normal", 2, "C/A"},
+ {0, "D", "normal", 2, "D"},
+ {0, "D/A", "normal", 2, "D/A"},
+ {1, "A", "normal", 2, "B", MOVED_HERE},
+ {1, "A/A", "normal", 2, "B/A", MOVED_HERE},
+ {1, "AAA_1", "normal", 1, "A/A/A"},
+ {1, "AAA_1/A", "normal", 1, "A/A/A/A"},
+ {1, "AAA_2", "normal", 1, "B/A/A"},
+ {1, "AAA_2/A", "normal", 1, "B/A/A/A"},
+ {1, "AAA_3", "normal", 1, "C/A/A"},
+ {1, "AAA_3/A", "normal", 1, "C/A/A/A"},
+ {1, "B", "base-deleted", NO_COPY_FROM, "A"},
+ {1, "B/A", "base-deleted", NO_COPY_FROM},
+ {2, "A/A", "normal", 2, "C/A", MOVED_HERE},
+ {2, "C/A", "base-deleted", NO_COPY_FROM, "A/A"},
+ {3, "A/A/A", "normal", 1, "D/A/A"},
+ {3, "A/A/A/A", "normal", 1, "D/A/A/A"},
+
+ { 0 },
+ };
+
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ {
+ conflict_info_t conflicts[] = {
+ /* Not resolved yet */
+ {"D/A/A", FALSE, FALSE, TRUE},
+
+ /* New */
+ {"A/A", FALSE, FALSE, TRUE},
+ {"A/A/A", FALSE, FALSE, TRUE},
+
+ {0}
+ };
+
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
+ }
+
/* ### These can currently only be resolved to merged ???? */
SVN_ERR(sbox_wc_resolve(&b, "D/A/A", svn_depth_empty,
svn_wc_conflict_choose_merged));
@@ -9356,13 +9564,44 @@ move4_update_delself_AAA(const svn_test_
{
nodes_row_t nodes[] = {
-
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/A", "normal", 2, "A/A"},
+ {0, "B", "normal", 2, "B"},
+ {0, "B/A", "normal", 2, "B/A"},
+ {0, "C", "normal", 2, "C"},
+ {0, "C/A", "normal", 2, "C/A"},
+ {0, "D", "normal", 2, "D"},
+ {0, "D/A", "normal", 2, "D/A"},
+ {1, "A", "normal", 1, "B", FALSE, "A_moved", TRUE},
+ {1, "A/A", "normal", 1, "B/A", MOVED_HERE},
+ {1, "A/A/A", "normal", 1, "B/A/A", MOVED_HERE},
+ {1, "A/A/A/A", "normal", 1, "B/A/A/A", MOVED_HERE},
+ {1, "AAA_1", "normal", 1, "A/A/A"},
+ {1, "AAA_1/A", "normal", 1, "A/A/A/A"},
+ {1, "AAA_2", "normal", 1, "B/A/A", MOVED_HERE},
+ {1, "AAA_2/A", "normal", 1, "B/A/A/A", MOVED_HERE},
+ {1, "AAA_3", "normal", 1, "C/A/A", MOVED_HERE},
+ {1, "AAA_3/A", "normal", 1, "C/A/A/A", MOVED_HERE},
{1, "A_moved", "normal", 2, "A", MOVED_HERE},
{1, "A_moved/A", "normal", 2, "A/A", MOVED_HERE},
+ {1, "B", "base-deleted", NO_COPY_FROM, "A"},
+ {1, "B/A", "base-deleted", NO_COPY_FROM},
+ {1, "BA_moved", "normal", 1, "B/A", MOVED_HERE},
+ {1, "BA_moved/A", "normal", 1, "B/A/A", MOVED_HERE},
+ {1, "BA_moved/A/A", "normal", 1, "B/A/A/A", MOVED_HERE},
+ {2, "A/A", "normal", 1, "C/A", FALSE, "BA_moved", TRUE},
+ {2, "A/A/A", "normal", 1, "C/A/A", MOVED_HERE},
+ {2, "A/A/A/A", "normal", 1, "C/A/A/A", MOVED_HERE},
+ {2, "BA_moved/A", "base-deleted", NO_COPY_FROM, "AAA_2"},
+ {2, "BA_moved/A/A", "base-deleted", NO_COPY_FROM},
+ {2, "C/A", "base-deleted", NO_COPY_FROM, "A/A"},
+ {3, "A/A/A", "normal", 1, "D/A/A", FALSE, "AAA_3"},
+ {3, "A/A/A/A", "normal", 1, "D/A/A/A"},
{ 0 },
};
- SVN_ERR(check_db_rows(&b, "A_moved", nodes));
+ SVN_ERR(check_db_rows(&b, "", nodes));
}
SVN_ERR(sbox_wc_resolve(&b, "B", svn_depth_empty,
@@ -9378,58 +9617,55 @@ move4_update_delself_AAA(const svn_test_
svn_wc_conflict_choose_merged));
SVN_ERR(sbox_wc_resolve(&b, "A_moved/A/A", svn_depth_empty,
svn_wc_conflict_choose_merged));
- /*SVN_ERR(check_db_conflicts(&b, "", NULL));*/
SVN_ERR(sbox_wc_resolve(&b, "A/A", svn_depth_empty,
svn_wc_conflict_choose_mine_conflict));
SVN_ERR(sbox_wc_resolve(&b, "BA_moved/A", svn_depth_empty,
svn_wc_conflict_choose_merged));
- SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity, svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(check_db_conflicts(&b, "", NULL));
/* Go back to start position */
SVN_ERR(sbox_wc_update(&b, "", 1));
{
nodes_row_t nodes[] = {
{0, "", "normal", 1, ""},
{0, "A", "normal", 1, "A"},
- {1, "A", "normal", 2, "B", FALSE, "A_moved", TRUE},
{0, "A/A", "normal", 1, "A/A"},
+ {0, "A/A/A", "normal", 1, "A/A/A"},
+ {0, "A/A/A/A", "normal", 1, "A/A/A/A"},
+ {0, "B", "normal", 1, "B"},
+ {0, "B/A", "normal", 1, "B/A"},
+ {0, "B/A/A", "normal", 1, "B/A/A"},
+ {0, "B/A/A/A", "normal", 1, "B/A/A/A"},
+ {0, "C", "normal", 1, "C"},
+ {0, "C/A", "normal", 1, "C/A"},
+ {0, "C/A/A", "normal", 1, "C/A/A"},
+ {0, "C/A/A/A", "normal", 1, "C/A/A/A"},
+ {0, "D", "normal", 1, "D"},
+ {0, "D/A", "normal", 1, "D/A"},
+ {0, "D/A/A", "normal", 1, "D/A/A"},
+ {0, "D/A/A/A", "normal", 1, "D/A/A/A"},
+ {1, "A", "normal", 2, "B", FALSE, "A_moved", TRUE},
{1, "A/A", "normal", 2, "B/A", MOVED_HERE},
- {2, "A/A", "normal", 2, "C/A", FALSE, "BA_moved", TRUE},
{1, "A/A/A", "base-deleted", NO_COPY_FROM},
- {0, "A/A/A", "normal", 1, "A/A/A"},
- {3, "A/A/A", "normal", 1, "D/A/A"},
{1, "A/A/A/A", "base-deleted", NO_COPY_FROM},
- {0, "A/A/A/A", "normal", 1, "A/A/A/A"},
- {3, "A/A/A/A", "normal", 1, "D/A/A/A"},
+ {1, "A_moved", "normal", 2, "A", MOVED_HERE},
+ {1, "A_moved/A", "normal", 2, "A/A", MOVED_HERE},
{1, "AAA_1", "normal", 1, "A/A/A"},
{1, "AAA_1/A", "normal", 1, "A/A/A/A"},
{1, "AAA_2", "normal", 1, "B/A/A"},
{1, "AAA_2/A", "normal", 1, "B/A/A/A"},
{1, "AAA_3", "normal", 1, "C/A/A"},
{1, "AAA_3/A", "normal", 1, "C/A/A/A"},
- {1, "A_moved", "normal", 2, "A", MOVED_HERE},
- {1, "A_moved/A", "normal", 2, "A/A", MOVED_HERE},
{1, "B", "base-deleted", NO_COPY_FROM, "A"},
- {0, "B", "normal", 1, "B"},
{1, "B/A", "base-deleted", NO_COPY_FROM},
- {0, "B/A", "normal", 1, "B/A"},
{1, "B/A/A", "base-deleted", NO_COPY_FROM},
- {0, "B/A/A", "normal", 1, "B/A/A"},
{1, "B/A/A/A", "base-deleted", NO_COPY_FROM},
- {0, "B/A/A/A", "normal", 1, "B/A/A/A"},
- {1, "BA_moved", "normal", 1, "A/A", MOVED_HERE},
- {1, "BA_moved/A", "normal", 1, "A/A/A", MOVED_HERE},
- {1, "BA_moved/A/A", "normal", 1, "A/A/A/A", MOVED_HERE},
- {0, "C", "normal", 1, "C"},
+ {1, "BA_moved", "normal", 2, "B/A", MOVED_HERE},
+ {2, "A/A", "normal", 2, "C/A", FALSE, "BA_moved", TRUE},
{2, "C/A", "base-deleted", NO_COPY_FROM, "A/A"},
- {0, "C/A", "normal", 1, "C/A"},
{2, "C/A/A", "base-deleted", NO_COPY_FROM},
- {0, "C/A/A", "normal", 1, "C/A/A"},
{2, "C/A/A/A", "base-deleted", NO_COPY_FROM},
- {0, "C/A/A/A", "normal", 1, "C/A/A/A"},
- {0, "D", "normal", 1, "D"},
- {0, "D/A", "normal", 1, "D/A"},
- {0, "D/A/A", "normal", 1, "D/A/A"},
- {0, "D/A/A/A", "normal", 1, "D/A/A/A"},
+ {3, "A/A/A", "normal", 1, "D/A/A"},
+ {3, "A/A/A/A", "normal", 1, "D/A/A/A"},
{ 0 },
};