The following question came from Eric Miller <Eric.Miller@amd.com>:
Is there a way to get svn_client_lock to do an all-or-nothing lock?
Right now when it encounters an error during lock the function gives
a warning but keeps locking.
For instance:
user1% svn lock a
user2% svn lock a b
svn: warning: Path '/trunk/a' is already locked by user 'user1 in
filesystem '/svn/test/db'
'b' locked by user 'user2.
Is this a bug or intended behavior? I can see this being useful for
collections of binary data.
Answers included this from me:
Nope. Locks aren't protected by atomicity guarantees outside what is
required to maintain the integrity of the backend storage. The
repository APIs only permit locking one path at a time, and no other
layer of interface between client and repository currently attempts to
corral multiple path-lock attempts under the umbrella of all-or-nothingness.
And this from Ben Collins-Sussman:
Yeah, this use-case just didn't cross our minds when we designed the
feature. It's certainly a feature that could be added in the future,
if there were enough demand.
http://svn.collab.net/viewvc/svn/branches/issue-2699-dev