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

Re: [Patch] Issue #2291 - 'svn ls -v' should return locking information - V3

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-07-06 20:26:38 CEST

On Jul 6, 2005, at 6:47 AM, Alexander Thomas wrote:

> Sorry, forgotten to attach patch, resending ...

Alex, thanks for your patience!

I'm glad you've placed an svn_lock_t structure into svn_dirent2_t, it
looks good.

Unfortunately, now we're faced with two choices, neither of which is
optimal:

    * do a network request to get the dirents, then do N more network
requests to fetch the lock on each dirent. This is what you're
currently doing.

    or

    * do a network request to get the dirents, then do one more
network request to fetch *all* locks below the path.

After some discussion in the Chicago office, we all agree that's it's
Less Evil to hold the entire hash of locks in memory than to make N
network requests.

Lundblad is right: we need to make svn_ra_get_locks() take a depth
{0, 1, infinity} argument, just like we've been saying for a number
of other APIs. It's issue #781, and this particular API should be
added to that issue, among the others.

In the meantime, svn_ra_get_locks() was designed to return a whole
hash in memory, and other functions already call it. We shouldn't be
fearful of calling the API, we should simply make it better in some
other, future patch. (Another way we can improve svn_ra_get_locks()
in the future is to make it into a streamy 'callback' interface, to
avoid ever holding all locks in memory.)

So what we'd like to see is

   1. a new iteration of this patch which call svn_ra_get_locks()
instead of svn_ra_get_lock().

   ...then, after we've applied the patch, if you're up for it:

   2. a completey new patch to

     (a) make svn_ra_get_locks() use a streamy 'callback' interface,
much like svn_ra_get_log()

     (b) make svn_ra_get_locks() take a boolean 'recurse' argument
that allows the caller to choose between depth 1 and depth infinity.

Does this all make sense to folks?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 6 20:28:29 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.