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

Re: Find out the version of the repository server

From: Mark Phippard <MarkP_at_softlanding.com>
Date: 2005-04-27 21:25:45 CEST

Ben Reser <ben@reser.org> wrote on 04/27/2005 01:51:22 PM:

> On Wed, Apr 27, 2005 at 06:12:37PM +0200, SteveKing wrote:
> > First a little background why I need to find out the version of the
> > repository server. Maybe you guys know another way to do what I want
> > without knowing the version?
> >
> > Subversion 1.2 introduces svn_client_log2() which takes a 'limit'
> > parameter. That's great. But, if you call that function with a < 1.2
> > server, the server returns *all* revisions and the client just drops
the
> > ones not asked for. That can be *very* slow for many revisions.
> > So, I'd like to somehow check if the 'limit' option works as it does
> > with 1.2 servers and if not, just use svn_client_log2() without the
> > limit param. To limit the revisions fetched, I could then adjust the
> > revision range accordingly.
> >
> > Sure, I could always adjust the revision range to avoid the problems
> > with < 1.2 servers, but then I might not get any log messages back if
in
> > the range I specify no changes to that path/URL happened - that's why
> > I'd like to use the 'limit' param if possible.
>
> I'm pretty sure someone has pointed this out to you before but why don't
> you just use svn_ra_get_latest_revnum?

Isn't that just going to give him the latest revision number? How is that
going to help? The issue is that he wants to support the new feature of
just showing the last N log messsages. This improves performance and
usability of the log viewer, especially since you typically care more
about recent log messages. His UI allows you to go get more messages if
needed.

The way this worked prior to 1.2 is that he would get the latest revision
X and then retrieve the messages between X and X - 100. This was fast,
but it might only give you 1 message and then the only option was to go
get the rest. Where as now he can show you the last 100 revisions, the
next 100 etc...

The problem is that when you use the new 1.2 feature against a 1.1 server
it is very slow because the client is retrieving all of the messages and
then filtering them to just give what you asked for.

What Stefan is asking for is a way to determine that he is talking to a
1.1 server so that he can fall back to his old technique but still offer
the great new feature for 1.2 users.

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 27 21:46:47 2005

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