> That's interesting. You are fixing a bug that test 7 "tickles" but
> doesn't detect. Would it be possible to make the test detect the bug?
>
Attached patch testcase.patch detects the same.
>> [kamesh_at_kamesh cmdline]$ /home/kamesh/tree_conflicts/bin/svn info
>> svn-test-work/working_copies/checkout_tests-7.other/
>> Path: svn-test-work/working_copies/checkout_tests-7.other
>> URL:
>> file:///home/kamesh/work/svn/tree-conflicts/vpath/subversion/tests/cmdline/svn-test-work/local_tmp/repos
>>
>> Repository Root:
>> file:///home/kamesh/work/svn/tree-conflicts/vpath/subversion/tests/cmdline/svn-test-work/local_tmp/repos
>>
>> Repository UUID: 071016a4-d04d-0410-90f3-f5e9a1163655
>> Revision: 1
>> Node Kind: directory
>> Schedule: normal
>> ../subversion/libsvn_wc/tree_conflicts.c:209: (apr_err=155016)
>> svn: Invalid tree conflict data
>>
>> Why 'svn-test-work/working_copies/checkout_tests-7.other' should have
>> incomplete tree conflict data?
>
> This indicates to me that "svn" exited with an error, but the test suite
> didn't catch it. I wonder why not.
Attached testcase.patch catches the same.
>
> There were actually three instances of "db->edit_baton" which you can
> change to "eb" in those last three lines. Just a minor point, I know.
Thanks Fixed in attached checkout_test-7-fix.patch.v3
With regards
Kamesh Jayachandran
[[[
Address checkout_tests-7 failure.
* subversion/libsvn_wc/update_editor.c
(add_directory): For versioned obstruction
check whether obstruction corresponds to the same corresponding-URL
as the current update drive. If it points to some other URL error out
saying so, else do tree-conflict detection.
]]]
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 31347)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -1482,7 +1482,21 @@
else
{
svn_wc_adm_access_t *parent_adm_access;
+ const char *repos;
+ /* Use the repository root of the anchor, but only if it
+ actually is an ancestor of the URL of this directory. */
+ if (eb->repos && svn_path_is_ancestor(eb->repos, db->new_URL))
+ repos = eb->repos;
+ else
+ repos = NULL;
+ /* Make sure it's the right working copy. */
+ SVN_ERR(svn_wc_ensure_adm3(db->path,
+ NULL /* TODO check uuid too.*/,
+ db->new_URL, repos,
+ *(eb->target_revision),
+ db->ambient_depth, pool));
+
SVN_ERR(svn_wc_adm_retrieve(&parent_adm_access, eb->adm_access,
pb->path, pool));
Index: subversion/tests/cmdline/checkout_tests.py
===================================================================
--- subversion/tests/cmdline/checkout_tests.py (revision 31347)
+++ subversion/tests/cmdline/checkout_tests.py (working copy)
@@ -266,13 +266,14 @@
svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 1)
other_wc_dir = sbox.add_wc_path("other")
+ other_wc_dir_A = os.path.join(other_wc_dir, "A")
os.mkdir(other_wc_dir)
# Checkout "A/" from the other repos.
svntest.actions.run_and_verify_svn("Unexpected error during co",
svntest.verify.AnyOutput, [],
"co", other_repo_url + "/A",
- os.path.join(other_wc_dir, "A"))
+ other_wc_dir_A)
# Checkout the first repos into "other/A". This should fail since the
# obstructing versioned directory points to a different URL.
@@ -280,9 +281,29 @@
"Expected error during co", None, svntest.verify.AnyOutput,
"co", "--force", sbox.repo_url, other_wc_dir)
- test_stderr("svn: Failed to add directory '.*A': a versioned directory " \
- "of the same name already exists", serr)
+ test_stderr("svn: URL '.*A' doesn't match existing URL '.*A' in '.*A'", serr)
+
+ #ensure that other_wc_dir_A is not affected by this forced checkout.
+ svntest.actions.run_and_verify_svn("empty status output", None,
+ [], "st", other_wc_dir_A)
+ exit_code, sout, serr = svntest.actions.run_and_verify_svn(
+ "it should still point to other_repo_url/A", None, [], "info",
+ other_wc_dir_A)
+
+ #TODO rename test_stderr to test_regex or something.
+ test_stderr("URL: " + other_repo_url + '/A$', sout)
+
+ #ensure that other_wc_dir is in a consistent state though it may be
+ #missing few items.
+ exit_code, sout, serr = svntest.actions.run_and_verify_svn(
+ "it should still point to other_repo_url", None, [], "info",
+ other_wc_dir)
+ #TODO rename test_stderr to test_regex or something.
+ test_stderr("URL: " + sbox.repo_url + '$', sout)
+
+
+
#----------------------------------------------------------------------
# Ensure that an import followed by a checkout in place works correctly.
def import_and_checkout(sbox):
Extend 'checkout_test-7'('forced_checkout_with_versioned_obstruction')
to cover few more cases and fix one of the expecations.
For versioned obstruction should be left undisturbed when it corresponds to
some other url.
* subversion/tests/cmdline/checkout_tests.py
(forced_checkout_with_versioned_obstruction): Fix the expected error
when the checkout hits a obstructed foreign repository.
Make sure 'other_wc_dir/A' is undisturbed by the checkout from
different url on other_wc_dir.
Received on 2008-05-22 16:57:11 CEST