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

Re: status information

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 17 Jun 2010 20:55:02 +0200

On 17.06.2010 17:52, C. Michael Pilato wrote:
> Bert Huijben wrote:
>> Most simple clients can just use svn_client_status5() and trust the results
>> to be complete like they were used to, but more advanced clients can use
>> svn_wc_walk_status() to get higher performance.
>> E.g. If TortoiseSVN or AnkhSVN switched to the wc apis, they can just show
>> the conflicted glyph when it sees the conflict on a 2 GB file, instead of
>> also comparing that file against its base version. And if you run status
>> just to show a glyph for a modification on a subdirectory it is not
>> necessary to perform comparation on the rest of the files, when you found a
>> single change. (But you would want the conflict results)
> I really, really don't like the idea of encouraging the continued use of WC
> APIs by third-party consumers. We should begin *right now* discouraging its
> use and simply improving the svn_client API to better serve our various
> clients. (I thought we had, in general, consensed around this plan already,
> but I guess I was wrong.)

Yes, the discussion is here:
(the apache mailing list archive still doesn't work for me).

May I suggest an approach that doesn't force me to find expensive
workarounds for more and more missing information the svn APIs return:
Use a mask parameter which specifies which members of a returned struct
get filled in by the API and which ones are not. That way, the less one
specifies in the mask the faster the API returns, but if necessary
everything necessary can still be returned in one tree walk without the
need to invoke several other APIs which also do the very same tree walk.

If you need an example, have a look at TVM_GETITEM and the TVITEMEX struct:
The mask member specifies which members of the struct will be filled by
the TVM_GETITEM call.

This also has the advantage that new data can be added later without
changing the API.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2010-06-17 20:55:48 CEST

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