[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 14:05:30 +0100

Kamesh Jayachandran wrote:
>>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?
>
> We need the code change otherwise it will fail at a
> later stage(after signaling marking the tree-conflict). Then the
> obstructed db->path would be disturbed unnecessarily.

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?

>
> With this update_editor.c change following is the status of WC.
> /home/kamesh/tree_conflicts/bin/svn st
> svn-test-work/working_copies/checkout_tests-7.other/
> ! svn-test-work/working_copies/checkout_tests-7.other
> ? svn-test-work/working_copies/checkout_tests-7.other/A
> [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: f9b4c6ac-d04d-0410-913d-ace65a406a16
> Revision: 1
> Node Kind: directory
> Schedule: normal
>
>
> Without update_editor.c change
> /home/kamesh/tree_conflicts/bin/svn st
> svn-test-work/working_copies/checkout_tests-7.other/
> ! svn-test-work/working_copies/checkout_tests-7.other
> S svn-test-work/working_copies/checkout_tests-7.other/A
>
> Why 'svn-test-work/working_copies/checkout_tests-7.other/A' should be
> left in a locked state?
>
> [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.

> 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,22 @@
> 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 = eb->repos;

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.

> + 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)
> @@ -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)
>

- 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 15:05:53 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.