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

Re: Clarification for paths argument to svn_ra_get_log2

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 03 Jun 2008 11:35:51 -0400

C. Michael Pilato wrote:
> Martin von Gagern wrote:
>> Resending, as I forgot to cc the list... sorry.
>> C. Michael Pilato wrote:
>> | I seem to recall that recently I realized that NULL and empty had two
>> | different interpretations in 'svn log'. I think empty resulted in (b),
>> | and (a surprise to me) NULL in (c).
>> If that is indeed the case and intended this way, it would certainly
>> merit documentation.
> Okay, looking in svn_repos_get_logs4(), the code does the following
> pretty early:
> if (! paths)
> paths = apr_array_make(pool, 0, sizeof(const char *));
> So it would seem that NULL and empty have the same meaning.

Ohohoh. But that code isn't in the 1.4.x line. I see what you mean, now.
(And maybe this explains what I *thought* I saw in testing recently.)

So, in 1.4.x, svn_repos_get_logs3() does *not* have the code above. In
fact, it explicitly treats a NULL 'paths' array as the same as "Gimme the
logs for all revisions, regardless of what was changed in them." Somewhere
along the 1.5.x way, that got dropped (probably by me, but maybe by Hyrum,
as the 'log -g' stuff was being added). And that's bad.

So, first of all, there's a bug in the trunk and in 1.5.x regarding the
handling of NULL paths in svn_repos_get_logs4().

Interestingly thouth, in 1.4.x there doesn't *appear* to be any way via the
WebDAV RA layers to pass NULL paths. You can't do it through mod_dav_svn,
because mod_dav_svn's log REPORT parser always instantiates an empty 'paths'
array and puts provided paths (if any) into it. (And it doesn't seem to
care if it never find paths in the REPORT.) svnserve and ra_local do the
same. So, unless I'm overlooking something, in 1.4.x, you cannot make use
of this special behavior regarding NULL paths via the RA interfaces.

Looking at the 1.5.x codebase, I see the same basic behaviors as in 1.4.x.

So I remain confused both about your compatability concern and the behavior
I thought I saw the other day.

By the way, I remember where I saw this discrepency now. It was when I was
writing libsvn_client/merge.c:remove_noop_merge_ranges(). Originally I
passed NULL into the svn_ra_get_logs2() call, but I thought I was seeing
every single revision coming back through the log_entry receiver. So I
instead passed an empty array. I was testing against svn.collab.net, which
was running a 1.5.x RC at the time.

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-06-03 17:36:04 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.