On 2016-01-21 21:19:29 -0500, James McCoy wrote:
> Yes, the wrong data is the non-canonical path '.'.  Nearly all SVN
> functions want to work with a canonical path/URL, so you'll probably
> want to reference the svn_path documentation:
> https://subversion.apache.org/docs/api/latest/svn__path_8h.html#details

OK, I suppose that this was actually a bug in the documentation,
fixed in libsvn-perl 1.9.0-1. This is now described in the
SVN::Client(3perl) man page:

       $path
           This is a path to a file or directory on the local file system.
           Paths need to be canonicalized before being passed into the
           Subversion APIs.  Paths on the local file system are called dirents
           and can be canonicalized by calling
           "SVN::Core::dirent_canonicalize".

but with up to libsvn-perl 1.8.9-2, one has only:

       $path
           This is a path to a file or directory on the local file system.

> > Note: I'm not sure that the program is correct (the SVN::Client
> > man page doesn't have many details),
> 
> The language bindings closely follow the C API, so you're best off just
> referencing that: https://subversion.apache.org/docs/api/latest/

IMHO, the main points must be found in the man page.

> > but even if it isn't, one
> > should never get an assertion failure in Perl.
> 
> Why not?  The library is asserting the contract of its API.  The Perl
> script is violating that contract, so it triggers the assertion.

That's C. In Perl, the user should be protected against undefined
behavior like buffer overflows and so on, and errors should be
reported in one of the Perl ways. This is up to the Perl module
to sanitize the arguments.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to