>
> 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?
>
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.
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?
>> 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".
Ok. Will use that.
>
>> + 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?
Ok. Will fix the comment. Blind copy paste :).
Find the attached patch with above 2 corrections.
Thanks for the review.
With regards
Kamesh Jayachandran
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;
+ 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)
#----------------------------------------------------------------------
# Ensure that an import followed by a checkout in place works correctly.
Received on 2008-05-22 14:30:11 CEST