Discussion:
Root-relative svn:externals result in error exporting a specific revision
Doug Brown
2017-07-13 00:34:48 UTC
Permalink
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
Daniel Shahaf
2017-07-16 11:04:11 UTC
Permalink

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
Pavel Lyalyakin
2017-07-17 10:31:11 UTC
Permalink
Hello,
Post by Daniel Shahaf


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
Daniel Shahaf
2017-07-18 11:01:36 UTC
Permalink
Post by Pavel Lyalyakin
[...] 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
Greg Stein
2017-07-18 22:15:55 UTC
Permalink
Thanks for following up on this, Daniel!
Post by Daniel Shahaf
Post by Pavel Lyalyakin
[...] 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
Daniel Shahaf
2017-07-16 14:22:03 UTC
Permalink
Post by Doug Brown
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
Loading...