[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: Alan Knowles <alan_at_akbkhome.com>
Date: 2005-04-20 17:28:49 CEST

On Wed, 2005-04-20 at 16:55 +0200, Peter N. Lundblad wrote:
> >
> > 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/";
> >
changing that to
svn_utf_cstring_to_utf8 (

APR_ARRAY_PUSH(targets, const char *) =
                svn_path_canonicalize(utf8_repos_url, SVN_G(pool));

gives me
svn: 'http://www.akbkhome.com/svn/ext_svn' is not a working copy
which is obviously correct, but not very usefull ;)
The big question is what does that array expect..

The headers indicate that targets is supposed to be a working copy, and
are rather vague about how to use it with URLs.

 * @a targets contains all the working copy paths (as <tt>const char
 * *</tt>'s) for which log messages are desired. The repository info is
 * determined by taking the common prefix of the target entries' URLs.
 * @a receiver is invoked only on messages
 * whose revisions involved a change to some path in @a targets.


> 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 17:28:41 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.