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

Re: log-report without path breaks compatibility

From: Martin von Gagern <Martin.vGagern_at_gmx.net>
Date: Tue, 03 Jun 2008 17:29:55 +0200

C. Michael Pilato wrote:
> Given my last past, in which I actually *looked* at the log code and
> determined that, from the repository logic's perspective, NULL paths and
> empty paths are the same thing, does your patch still matter?

My patch does not pass an empty list instead of NULL; that distinction
is not possible in XML anyway. Instead, it passes a list with a single
element, which in turn is the empty string.

Looking at the 1.4.2 sources (the 1.4.x brach is identical here) I see
these lines inlibsvn_repos/log.c in function svn_repos_get_logs3:

   if (! paths ||
       (paths->nelts == 1 &&
        svn_path_is_empty(APR_ARRAY_IDX(paths, 0, const char *))))

So there is special handling code for both NULL and a single element
list. dav_svn__log_report in mod_dav_svn/log.c however creates an empty
list and adds path elements as it encounters them. No path elements
therefore yield an empty list, which doesn't match the condition stated
above. Therefore svn_repos_get_logs3 will iterate over the empty list,
which is the cause of the difference.

My patch ensures that there is never an empty list, even without
modifying 1.4 servers out there. Therefore it does matter.

Received on 2008-06-03 17:30:22 CEST

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

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