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

Re: [PATCH] Issue #692: Handle "svn log" with empty repos

From: Michael W Thelen <thelenm_at_cs.utah.edu>
Date: 2004-07-02 21:53:17 CEST

* Greg Hudson <ghudson@MIT.EDU> [2004-07-02 13:27]:
> > The client cannot know the HEAD revision without asking the server.
> > Therefore, if we want to avoid issuing a bogus request, we must ask
> > the server for the HEAD revision first. That causes an extra network
> > turnaround (see r1864), which in most cases is a useless burden,
> > because it's a rare repository where HEAD == 0
>
> Well, I think it's inelegant for any valid, non-erroneous user operation
> to involve producing and ignoring an error; it suggests that something
> is wrong. Perhaps what's really wrong here is that ra_lib->get_log has
> the wrong defaults, but we can't easily fix that.
>
> So, while I think it's more elegant to spend a network turnaround in
> order to avoid the possibility of producing a spurious error (in
> general, a small constant number of network turnarounds is no big deal),
> it's certainly not "insane" to think otherwise. So, my comment can be
> changed from a strong preference to a mild preference.

I agree with that... it just feels wrong to issue a bogus request and
catch an error under normal conditions. But the network overhead of
issuing the request every time may outweigh the inelegance of producing
and catching a bogus error.

But speaking of elegance... both special case (a) and (b) seem to be
made necessary by the fact that we default to HEAD:1 and BASE:1 instead
of HEAD:0 and BASE:0 when the user passes no arguments to "svn log".
While writing the patch, I thought it would have been much nicer if we
could just pass HEAD:0 to ra_lib->get_log and have it "do the right
thing". That is, produce an r0 log message when the start and end
revisions requested are both 0, but don't tack an r0 log message on the
end otherwise.

Is it allowable to make a change like this? I thought probably not,
since it's a change in how the interface behaves, but wasn't sure.

-- Mike

-- 
Michael W. Thelen
It is the duty of every citizen according to his best capacities to give
validity to his convictions in political affairs.
                -- Albert Einstein, "Treasury for the Free World", 1946

Received on Fri Jul 2 21:57:42 2004

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.