On 10/28/05, Philip Martin <email@example.com> wrote:
> Once the library provides an interface with predictable behaviour the
> application can implement all the "smart" behaviour on top. Quite how
> much of the "smart" behaviour should be moved into the library is a
> hard question to answer, one reason for putting it in the library is
> that it might be possible to do things more efficiently (fewer RA
> calls) in the library than in the application.
The problem is that unless the application is ok with implementing
their behavior in terms of the libsvn_ra interface, they currently
can't implement this sort of behavior because of race conditions.
There's no higher level API that allows you to say "replace this
directory with this other directory" because in between you deleting
the first directory and copying the second one in place another commit
could have placed something there, so your new copy ends up as a
subdirectory instead of the location you wanted.
The current libsvn_client APIs just don't posses the flexability to
allow the applications to provide the "smarts" that are needed.
There's no way to say "copy this to location /foo, but if another
directory shows up there in the meantime error out", and even if we
had that, you still couldn't implement the "replace /tags/foo with a
copy of /trunk" all in one commit, it would have to be split into two
commits, and the second could potentially fail due to a race
> > If we're going to add a parameter to control this kind of behavior,
> > I'd also like to add the ability to overwrite the file/directory
> > that's present in the destination. To be really useful this should
> > also apply to copy in addition to move. This is a fairly commonly
> > requested feature (say for example if you want to have a "currently
> > installed version" tag, whenever you recreate it you have to do a
> > delete then a copy).
> Are these requests for an application interface, "svn cp/mv", or a
> library interface, "svn_client_copy/move"?
I've seen people ask for both a command line level interface and a
language bindings level interface, which implies that the change
should be at the libsvn_client library interface and then exposed via
the command line and bindings.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Sat Oct 29 00:34:58 2005