[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH][tree-conflicts]Patch to address checkout_tests-7 failure.

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 22 May 2008 12:43:25 +0100

Kamesh Jayachandran wrote:
> Attached patch addresses the failing checkout_test-7(checkout to a
> versioned dir from different repo).
>
> Would like to know the comments from people working on tree-conflicts
> branch.

Hi Kamesh. Thanks for this. I am trying to understand it.

All I need to make the test pass is your change to the expected error message.

I don't seem to need the code change in update_editor.c to make the test pass.
So, what is this code for, or am I doing something wrong?

Also, see below...

> [[[
> 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.
>
> * subversion/tests/cmdline/checkout_tests.py
> (forced_checkout_with_versioned_obstruction): Fix the expected error
> when the checkout hits a obstructed foreign repository.
> ]]]
>
>
> ------------------------------------------------------------------------
>
> Index: subversion/libsvn_wc/update_editor.c
> ===================================================================
> --- subversion/libsvn_wc/update_editor.c (revision 31331)
> +++ subversion/libsvn_wc/update_editor.c (working copy)
> @@ -1482,7 +1482,23 @@
> 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 (db->edit_baton->repos
> + && svn_path_is_ancestor(db->edit_baton->repos, db->new_URL))
> + repos = db->edit_baton->repos;

Note: there is a variable called "eb" (which you use below) that is the same as
"db->edit_baton".

> + else
> + repos = NULL;
>
> + /* Make sure it's the right working copy, either by creating it
> + so, or by checking that it is so already. */

This comment is confusing: We don't want to create an administrative directory
here, do we? Aren't we already inside an "else: this dir is versioned" clause?

> + 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 31331)
> +++ subversion/tests/cmdline/checkout_tests.py (working copy)
> @@ -280,8 +280,7 @@
> "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 an import followed by a checkout in place works correctly.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-22 13:43:39 CEST

This is an archived mail posted to the Subversion Dev mailing list.