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

Re: perl API: Assertion failed: (svn_dirent_is_canonical(dirent, pool)), function svn_dirent_dirname, file subversion/libsvn_subr/dirent_uri.c, line 1200

From: Ben Reser <ben_at_reser.org>
Date: Fri, 31 Jan 2014 09:07:55 -0800

On 1/31/14, 8:09 AM, Anton Yuzhaninov wrote:
> my $file = './infra/named.conf.templ';
>
> If $file contains absolute file path, than this script works, but I want to use
> relative file path.

Well in the example you can solve the problem by just removing the leading './'.

> If file name should be in some "canonical" form, this canonization IMHO should
> be done inside SVN::Client.

I agree with you. However, none of the SWIG bindings do this for you at
current. Not sure though if we can really change this. We'd need to think
through if there are any compatibility issues since there are a lot of tools
using the bindings already.

In the meantime you can do the following to do the canonicalization:
if (SVN::Core::path_is_url($file)) {
  $file = SVN::Core::uri_canonicalize($file);
} else {
  $file = SVN::Core::dirent_canonicalize($file);
}
Received on 2014-01-31 18:08:27 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.