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

Re: libsvn_subr/dirent_uri.c dumps core when url contains a space

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 31 Oct 2011 10:29:23 +0100

On Sun, Oct 30, 2011 at 10:09:52PM -0700, rupert.thurner wrote:
> on solaris the perl bindings dump a core when an url contains a space,
> see https://www.opencsw.org/mantis/view.php?id=4854. an excerpt:
>
> The SVN::Ra bindings core dump with the following error:
>
> $ perl ./test.pl
> svn: E235000: In file 'subversion/libsvn_subr/dirent_uri.c' line 2291:
> assertion failed (svn_uri_is_canonical(url, pool))
> Abort (core dumped)
>
>
> The content of test.pl:
>
> require SVN::Ra;
>
> $s = SVN::Ra->new('file:///home/bwalton/opencsw/git/trunk/work/
> solaris9-sparc/build-isa-sparcv8/git-1.7.7.1/t/trash [^]
> directory.t9134-git-svn-ignore-paths/svnrepo');

Your code is wrong. You have to canonicalize URLs and paths
before passing them into the SVN API.

Something like the following might work better (untested):

require SVN::Core;
require SVN::Ra;

my $url = SVN::Core->svn_uri_canonicalize('file:///home/bwalton/opencsw/git/trunk/work/solaris9-sparc/build-isa-sparcv8/git-1.7.7.1/t/trash [^] directory.t9134-git-svn-ignore-paths/svnrepo')
$s = SVN::Ra->new($url);
Received on 2011-10-31 10:30:11 CET

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