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

perl, Malformed network data with svn:// but not https://

From: Haszlakiewicz, Eric <EHASZLA_at_transunion.com>
Date: Thu, 11 Dec 2008 13:36:31 -0600

I'm writing this message to hopefully save other people some time
investigating the same problem.

I wrote a perl script that uses the SVN::Ra api to retrieve log
information from a repository using the
get_log() function. It was working great when given a file:/// url or a
https:// url, but would die with a "Malformed network data" error any
time I tried to use a svn:// url. I finally traced it down to the way I
was using the callback function.

According to the docs for get_log(), you're not supposed to attempt
additional operations using the same Ra object from within the callback
function. However, in my initial tests using local file repositories,
it appeared to work perfectly fine, as did subsequent tests using http
repositories, so I didn't realize there was anthing wrong. It wasn't
until I pointed it at a svnserve repository that it started failing.

The solution seemed like it would be relatively straighforward: save the
parmeters from each call to the callback function in a list, and iterate
over that list later, after the entire get_log() function returns.
Unfortunately, that resulted in an immediate crash, because apparently
you can't use the first argument, a hash of pathnames to
_p_svn_log_changed_path_t objects, after get_log returns. (or perhaps
after each callback call returns). I ended up creating my own
"log_changed_path_t" object and copied the necessary bits of information
into it, and put _that_ in the list.

eric

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982999

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-11 20:48:09 CET

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.