You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/03/02 05:00:26 UTC

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

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.

Modified:
    subversion/trunk/subversion/libsvn_client/commit.c

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1296045&r1=1296044&r2=1296045&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ 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;



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

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Mar 2, 2012 at 11:28 AM, Hyrum K Wright
<hy...@wandisco.com> wrote:
> On Fri, Mar 2, 2012 at 11:07 AM, Philip Martin
> <ph...@wandisco.com> wrote:
>> hwright@apache.org writes:
>>
>>> 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.
>>>
>>> Modified:
>>>     subversion/trunk/subversion/libsvn_client/commit.c
>>
>> This causes commit_tests.py 26 to FAIL.
>
> Correct, and as I stated elsethread, I'm having problems reproducing
> (and those fixing) this failure.

That was a bit testy, let me try again:

Greg pointed this out a few hours ago, and I've been trying to
reproduce it on a variety of hardware, but to no avail.  Kinda
frustrating.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

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

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Mar 2, 2012 at 11:07 AM, Philip Martin
<ph...@wandisco.com> wrote:
> hwright@apache.org writes:
>
>> 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.
>>
>> Modified:
>>     subversion/trunk/subversion/libsvn_client/commit.c
>
> This causes commit_tests.py 26 to FAIL.

Correct, and as I stated elsethread, I'm having problems reproducing
(and those fixing) this failure.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

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

Posted by Philip Martin <ph...@wandisco.com>.
hwright@apache.org writes:

> 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.
>
> Modified:
>     subversion/trunk/subversion/libsvn_client/commit.c

This causes commit_tests.py 26 to FAIL.

-- 
Philip

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

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Mar 2, 2012 at 12:52 PM, Philip Martin
<ph...@wandisco.com> wrote:
> Hyrum K Wright <hy...@wandisco.com> writes:
>
>>> rm -rf repo wc1 wc2
>>> svnadmin create repo
>>> svn mkdir -mm file://`pwd`/repo/{A,B}
>>> svn co file://`pwd`/repo wc1
>>> svn co file://`pwd`/repo wc2
>>> svn ps p v wc1/A
>>> svn ps p v wc2/B
>>> svn ci -mm wc1 wc2
>>> ../src/subversion/svn/commit-cmd.c:183: (apr_err=155007)
>>> ../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
>>> ../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
>>> svn: E155007: Commit failed (details follow):
>>> ../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
>>> ../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
>>> ../src/subversion/libsvn_wc/wc_db.c:1560: (apr_err=155007)
>>> ../src/subversion/libsvn_wc/wc_db_wcroot.c:543: (apr_err=155007)
>>> svn: E155007: '/home/pm/sw/subversion/obj' is not a working copy
>>>
>>> svn-1.7 ci -mm wc1 wc2
>>> Sending        wc1/A
>>> Sending        wc2/B
>>>
>>> Committed revision 2.
>>
>> Yes, the bots give similar output, but my OS X and Ubuntu boxes both
>> seem to have no problems.
>
> The commit works if a grandparent of wc1 and wc2 is a working copy:
>
>   wc/               # unrelated working copy
>      foo/           # unversioned
>          wc1/
>          wc2/
>
> It fails if all ancestors are unversioned.

Thanks, that makes the problem easily reproducible.

The core issue here is that we need to provide a way for callbacks to
find their way home to the working copy so they can look up the base
text/props/kind for the Ev2 shims.  The only problem is that in this
case, we have a fractured set of working copies, which by design or
accident all manage to get replayed through the same commit editor.
Since the shims operate on a per-editor basis, we don't have a way of
telling them when two switch working copies.

I can squash the error on trunk, and have done so in r1296419 but
we're going to need a long-term solution for this scenario.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

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

Posted by Philip Martin <ph...@wandisco.com>.
Hyrum K Wright <hy...@wandisco.com> writes:

>> rm -rf repo wc1 wc2
>> svnadmin create repo
>> svn mkdir -mm file://`pwd`/repo/{A,B}
>> svn co file://`pwd`/repo wc1
>> svn co file://`pwd`/repo wc2
>> svn ps p v wc1/A
>> svn ps p v wc2/B
>> svn ci -mm wc1 wc2
>> ../src/subversion/svn/commit-cmd.c:183: (apr_err=155007)
>> ../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
>> ../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
>> svn: E155007: Commit failed (details follow):
>> ../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
>> ../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
>> ../src/subversion/libsvn_wc/wc_db.c:1560: (apr_err=155007)
>> ../src/subversion/libsvn_wc/wc_db_wcroot.c:543: (apr_err=155007)
>> svn: E155007: '/home/pm/sw/subversion/obj' is not a working copy
>>
>> svn-1.7 ci -mm wc1 wc2
>> Sending        wc1/A
>> Sending        wc2/B
>>
>> Committed revision 2.
>
> Yes, the bots give similar output, but my OS X and Ubuntu boxes both
> seem to have no problems.

The commit works if a grandparent of wc1 and wc2 is a working copy:

   wc/               # unrelated working copy
      foo/           # unversioned
          wc1/
          wc2/

It fails if all ancestors are unversioned.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

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

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Mar 2, 2012 at 11:51 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Hyrum K Wright <hy...@wandisco.com> writes:
>
>> 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 my Linux machine:
>
> rm -rf repo wc1 wc2
> svnadmin create repo
> svn mkdir -mm file://`pwd`/repo/{A,B}
> svn co file://`pwd`/repo wc1
> svn co file://`pwd`/repo wc2
> svn ps p v wc1/A
> svn ps p v wc2/B
> svn ci -mm wc1 wc2
> ../src/subversion/svn/commit-cmd.c:183: (apr_err=155007)
> ../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
> ../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
> svn: E155007: Commit failed (details follow):
> ../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
> ../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
> ../src/subversion/libsvn_wc/wc_db.c:1560: (apr_err=155007)
> ../src/subversion/libsvn_wc/wc_db_wcroot.c:543: (apr_err=155007)
> svn: E155007: '/home/pm/sw/subversion/obj' is not a working copy
>
> svn-1.7 ci -mm wc1 wc2
> Sending        wc1/A
> Sending        wc2/B
>
> Committed revision 2.

Yes, the bots give similar output, but my OS X and Ubuntu boxes both
seem to have no problems.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

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

Posted by Philip Martin <ph...@wandisco.com>.
Hyrum K Wright <hy...@wandisco.com> writes:

> 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 my Linux machine:

rm -rf repo wc1 wc2
svnadmin create repo
svn mkdir -mm file://`pwd`/repo/{A,B}
svn co file://`pwd`/repo wc1
svn co file://`pwd`/repo wc2
svn ps p v wc1/A
svn ps p v wc2/B
svn ci -mm wc1 wc2
../src/subversion/svn/commit-cmd.c:183: (apr_err=155007)
../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
../src/subversion/libsvn_client/commit.c:874: (apr_err=155007)
svn: E155007: Commit failed (details follow):
../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
../src/subversion/libsvn_client/commit.c:681: (apr_err=155007)
../src/subversion/libsvn_wc/wc_db.c:1560: (apr_err=155007)
../src/subversion/libsvn_wc/wc_db_wcroot.c:543: (apr_err=155007)
svn: E155007: '/home/pm/sw/subversion/obj' is not a working copy

svn-1.7 ci -mm wc1 wc2
Sending        wc1/A
Sending        wc2/B

Committed revision 2.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

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

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Mar 2, 2012 at 12:37 AM, Greg Stein <gs...@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,  <hw...@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/

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

Posted by Greg Stein <gs...@gmail.com>.
Looks like this broke commit_test 26.

On Thu, Mar 1, 2012 at 23:00,  <hw...@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).

Cheers,
-g