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

Re: Sorted output from Subversion commands

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-02-22 23:54:50 CET

Branko Čibej wrote:
> Greg Hudson wrote:
>> Branko Čibej wrote:
>>> At the time, I naïvely thought that sorting the entries list and
>>> returning a modified hash table that supports in-order traversal
>>> would do the trick. Then I went digging into the code, and it turns
>>> out that's not enough. Unfortunately, our public APIs return an
>>> apr_hash_t. And, this not being C++, there's no way to override that
>>> tables traversal order.
>> We have svn_sort__hash(). It's used in libsvn_subr/hash.c for hash
>> dumps, for instance.
> Yes, but using this would mean we'd have to re-sort the table every time
> it's modified, which is a) inefficient, and b) doesn't work because we
> don't _know_ that the client modified the table (and that's another
> reason why we shouldn't return a pointer straight into the entries cache
> from the client).

That's interesting. You are talking particularly about svn_wc_entries_read, I
believe. Sorting the result is inefficient, certainly, but not grossly, I
think. But doesn't work? I don't follow that. Who is "we" who don't know
that "the client" has modified the table? What's this pointer? I'm afraid I'm
not familiar enough with the code, and you've lost me.

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 22 23:57:04 2005

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.