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

Re: svn_cilent_log usage apr_array_header_t targets

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-04-20 16:55:08 CEST

On Wed, 20 Apr 2005, Alan Knowles wrote:

> I'm trying to understand the log usage for the php bindings
>
> is there any explaination of what would be expected for the input to
> svn_client_log's targets argument..
>
> The code looks something like below, but I'm always getting
> svn_path_basename: Assertion `is_canonical (path, len)' failed.
>
> I'm guessing I need more things in the targets array, but see anywhere
> where it's commented what it should be.
>
>
> targets = apr_array_make (SVN_G(pool), 1, sizeof(char *));
> targets->nelts = 1;
> APR_ARRAY_IDX(targets, 0, const char *) =
> "http://www.akbkhome.com/svn/ext_svn/";
>
The trailing slash on that URL causes the assertion. Paths passed to svn
API functions ought to be canonicalized. See svn_path_canonicalize for
more info. It is a good idea to pass every path ghrough that function
before giving it to svn. Also, note that all strings are expected to be
UTF8, which I don't know if it is obvious.

Another thing: you could have a look at APR_ARRAY_PUSH (in svn_types.h).
It can simplify array creation.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 20 16:51:17 2005

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

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