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

Re: [PATCH] Re: log/blame -g and old servers

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-10-19 19:56:19 CEST

Hyrum K. Wright wrote:

> My initial reaction was not to produce an error, but now I'm not so
> sure. If I run 'log -g' on an unknown server, I'll get different
> results, depending on whether that server is pre-1.5 or not. Producing
> different results dependent upon server version is Bad (at least in this
> case).
>
> I now feel that producing an error here isn't a problem. Clients can
> trap the error and take whatever action they feel appropriate, which may
> include informing the user, and reissuing the request. I suspect the
> command line client would just error out.

May I suggest adding a new API which only detects whether the server
supports a certain feature?
Something like:
enum supportedfeature
{
   mergetracking, // supports merge tracking
   loglimit // supports the --limit switch for logs
}

enum supportstate
{
   notsupported, // feature is not supported
   partlysupported,// feature is not supported by server, but client has
workaround
   fullysupported // server supports the feature completely
}

supportstate svn_client_check_server_capability(supportedfeature feature);

Then clients could ask the server what it is capable of and then decide
whether they want to offer a certain feature to the user or not.

For example, I would have used the 'svn log --limit' feature to fetch
only one log message for certain dialogs in TSVN if I could be *sure*
that the server supports it. Because if the server supports it, the
function call is fast (otherwise the log fetches everything and just
discards the rest of the messages - ok, that's better since 1.4 but
still) and could be used 'behind the scenes' without the user even
knowing - and the information could be used to pre-fill some edit controls.

The same with the svn_client_suggest_merge_sources API: it's fast if the
server has merge tracking, but terribly slow if it doesn't. I would
maybe use that function to show the user suggestions in the merge dialog
- but the three minute wait I had on the TSVN repository makes this
impossible.
A quick check for the capabilities of the server would be enough to
decide whether to use a certain API or not in those cases.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 19 19:56:34 2007

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