You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Doug Brown <do...@schmorgal.com> on 2017/07/13 00:34:48 UTC

Root-relative svn:externals result in error exporting a specific revision

Hi,

I recently discovered what I think is a bug in Subversion. As per the
bug reporting instructions, I'm posting on this mailing list first to
confirm. I'm seeing this issue in fully-updated Ubuntu 16.04 with
subversion 1.9.3, as well as the subversion trunk revision 1801307. It
seems to be related to svn:externals with root-relative URLs (^/). If I
attempt to export a specific revision from a checkout, and that revision
contains root-relative externals, svn will error out:

svn: subversion/libsvn_subr/dirent_uri.c:324: canonicalize: Assertion
`*src != '/'' failed.
Aborted (core dumped)

It only seems to be a problem if I'm exporting from a checkout rather
than a repository URL. Here is an example set of steps to reproduce this
problem:

# Set up a repository with root-relative externals
svnadmin create /tmp/testrepo
svn co file:///tmp/testrepo /tmp/testrepo-co
cd /tmp/testrepo-co
touch test1.txt
svn add test1.txt
svn mkdir ext
svn propset svn:externals '^/test1.txt test2.txt' ext
svn commit -m "test commit 1"
svn update

# Exporting without the -r option succeeds
svn export /tmp/testrepo-co /tmp/testexport1

# Exporting from the repository URL with -r succeeds
svn export -r 1 file:///tmp/testrepo /tmp/testexport2

# Exporting from a checkout with -r errors out with the following message:
# svn: subversion/libsvn_subr/dirent_uri.c:324: canonicalize: Assertion
`*src != '/'' failed.
svn export -r 1 /tmp/testrepo-co /tmp/testexport3

I believe that it's a bug and I should still be able to use the -r
option when exporting from a checkout. Anybody have any thoughts? Am I
OK to make a report in the issue tracker?

I am not subscribed to this list, so please CC me with any responses.
Thanks!

Doug



Re: This needs moderators? Re: Root-relative svn:externals result in error exporting a specific revision

Posted by Greg Stein <gs...@gmail.com>.
Thanks for following up on this, Daniel!

On Tue, Jul 18, 2017 at 6:01 AM, Daniel Shahaf <d....@daniel.shahaf.name>
wrote:

> Pavel Lyalyakin wrote on Mon, 17 Jul 2017 13:31 +0300:
> > On Sun, Jul 16, 2017 at 2:04 PM, Daniel Shahaf <d....@daniel.shahaf.name>
> > wrote:
> > > [...] are  you still actively moderating this list?
> > > Do we need more moderators?
> >
> > If there is a need for a mailing list moderator, I'd be happy to take up
> > the duty. :)
>
> Thanks, Pavel.  None of the moderators has responded to my ping, so
> I've added you now.  You'll start getting MODERATE messages; simply
> Reply All to approve a post or delete/ignore to not approve it.
>
> Thanks again, and if you have any questions, just ask.
>
> Daniel
>

Re: This needs moderators? Re: Root-relative svn:externals result in error exporting a specific revision

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Pavel Lyalyakin wrote on Mon, 17 Jul 2017 13:31 +0300:
> On Sun, Jul 16, 2017 at 2:04 PM, Daniel Shahaf <d....@daniel.shahaf.name>
> wrote:
> > [...] are  you still actively moderating this list?
> > Do we need more moderators?
> 
> If there is a need for a mailing list moderator, I'd be happy to take up
> the duty. :)

Thanks, Pavel.  None of the moderators has responded to my ping, so
I've added you now.  You'll start getting MODERATE messages; simply
Reply All to approve a post or delete/ignore to not approve it.

Thanks again, and if you have any questions, just ask.

Daniel

Re: This needs moderators? Re: Root-relative svn:externals result in error exporting a specific revision

Posted by Pavel Lyalyakin <pa...@visualsvn.com>.
Hello,

On Sun, Jul 16, 2017 at 2:04 PM, Daniel Shahaf <d....@daniel.shahaf.name>
wrote:

> [ bcc'd to dev@, users-owner@; please follow up to users@ ]
>
> Doug Brown wrote on Wed, 12 Jul 2017 17:34 -0700:
> > …
>
> Doug reported earlier today that his message was not moderated to users@
> from Wednesday until just now.
>
> What happened?  Greg, Ed, Lorenz, are you still actively moderating this
> list?
> Do we need more moderators?
>
> Cheers,
>
> Daniel
>

If there is a need for a mailing list moderator, I'd be happy to take up
the duty. :)

-- 
With best regards,
Pavel Lyalyakin
VisualSVN Team

This needs moderators? Re: Root-relative svn:externals result in error exporting a specific revision

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
[ bcc'd to dev@, users-owner@; please follow up to users@ ]

Doug Brown wrote on Wed, 12 Jul 2017 17:34 -0700:
> …

Doug reported earlier today that his message was not moderated to users@
from Wednesday until just now.

What happened?  Greg, Ed, Lorenz, are you still actively moderating this list?
Do we need more moderators?

Cheers,

Daniel

Re: Root-relative svn:externals result in error exporting a specific revision

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Doug Brown wrote on Wed, 12 Jul 2017 17:34 -0700:
> svn: subversion/libsvn_subr/dirent_uri.c:324: canonicalize: Assertion
> `*src != '/'' failed.
> Aborted (core dumped)

Thanks for the great bug report.

I think I see the root cause: that the value of export_directory()'s parameter
FROM_PATH_OR_URL is a path, but that parameter is passed directly to the
FROM_URL parameter of svn_client__export_externals().  It then
fails because a local path is not a valid URL.

Relevant portion of backtrace:

[[[
    frame #7: 0x00007ffff7b6fda1 libsvn_client-1.so.0`svn_client__export_externals(externals=0x00007ffff1d6d5d0, from_url="/tmp/tmp.Igmr4a0O6p/wc", to_abspath="/tmp/tmp.Igmr4a0O6p/testexport3", repos_root_url="file:///tmp/tmp.Igmr4a0O6p/testrepo", requested_depth=svn_depth_infinity, native_eol=0x0000000000000000, ignore_keywords=0, ctx=0x00007ffff7dfd570, scratch_pool=0x00007ffff7dfc028) + 817 at externals.c:1241
    frame #8: 0x00007ffff7b6cbf4 libsvn_client-1.so.0`export_directory(from_path_or_url="/tmp/tmp.Igmr4a0O6p/wc", to_path="testexport3", eb=0x00007ffff1d6c438, loc=0x00007ffff1d6d4b8, ra_session=0x00007ffff1cff220, overwrite=0, ignore_externals=0, ignore_keywords=0, depth=svn_depth_infinity, native_eol=0x0000000000000000, ctx=0x00007ffff7dfd570, scratch_pool=0x00007ffff7dfc028) + 948 at export.c:1357
]]]

Cheers,

Daniel