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

Re: svn commit: r1296045 - /subversion/trunk/subversion/libsvn_client/commit.c

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Fri, 2 Mar 2012 08:34:39 -0600

On Fri, Mar 2, 2012 at 12:37 AM, Greg Stein <gstein_at_gmail.com> wrote:
> Looks like this broke commit_test 26.

I'm trying to reproduce this, but to no avail. For reference, the
bots give the following error:

[[[
CMD: /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/svn/svn
commit -m log svn-test-work/working_copies/commit_tests-26/wc1
svn-test-work/working_copies/commit_tests-26/wc2 --config-dir
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.066730>
subversion/svn/commit-cmd.c:183: (apr_err=155007)
subversion/libsvn_client/commit.c:874: (apr_err=155007)
subversion/libsvn_client/commit.c:874: (apr_err=155007)
svn: E155007: Commit failed (details follow):
subversion/libsvn_client/commit.c:681: (apr_err=155007)
subversion/libsvn_client/commit.c:681: (apr_err=155007)
subversion/libsvn_wc/wc_db.c:1560: (apr_err=155007)
subversion/libsvn_wc/wc_db_wcroot.c:543: (apr_err=155007)
]]]

My interpretation is that for this particular test, the commit is
anchored at directory which is not itself part of a working copy,
hence the reason for the above failure.

However, I can't reproduce this failure. Not on the same box as the
ubuntu buildslave, nor on a Mac OS box. This is somewhat troubling.

>
> On Thu, Mar 1, 2012 at 23:00,  <hwright_at_apache.org> wrote:
>> Author: hwright
>> Date: Fri Mar  2 04:00:26 2012
>> New Revision: 1296045
>>
>> URL: http://svn.apache.org/viewvc?rev=1296045&view=rev
>> Log:
>> Ev2: Correct the way we calculate the anchor abspath when doing a commit.
>>
>> Current number of test failures over ra_svn: 483
>>
>> * subversion/libsvn_client/commit.c
>>  (get_ra_editor): Calculate the anchor_abspath using the wcroot abspath.
>>...
>> +++ subversion/trunk/subversion/libsvn_client/commit.c Fri Mar  2 04:00:26 2012
>> @@ -675,10 +675,14 @@ get_ra_editor(svn_ra_session_t **ra_sess
>>   if (base_dir_abspath)
>>     {
>>       const char *relpath;
>> +      const char *wcroot_abspath;
>> +
>> +      SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx,
>> +                                  base_dir_abspath, pool, pool));
>>
>>       SVN_ERR(svn_ra_get_path_relative_to_root(*ra_session, &relpath, base_url,
>>                                                pool));
>> -      anchor_abspath = svn_dirent_join(base_dir_abspath, relpath, pool);
>> +      anchor_abspath = svn_dirent_join(wcroot_abspath, relpath, pool);
>>     }
>>   else
>>     anchor_abspath = NULL;
>
> The relpath from the session is likely relative to the *session root*.
> But then you use it in conjunction with the *working copy root*. Those
> two roots could be different.
>
> For example:
>  session_root = http://host/some/repos/root/trunk/subdir
>  wcroot = http://host/some/repos/root/trunk
>
> So you could get a relpath from the session of "a/b", which is
> supposed to be "subdir/a/b" relative to trunk (the wcroot).

I'm not quite following you here. The wcroot is an abspath, no?

-Hyrum

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2012-03-02 15:35:13 CET

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