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);
}


Reply via email to