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

Subversion release ALL locks after commit. Why?

From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Tue, 1 Jul 2008 12:53:44 +0100

From the Subversion Book (both for 1.4.4 and 1.5):

"[svn-commit] searches the working copy (or list of targets, if you
provide such a list) for local modifications and sends all the lock
tokens it encounters during this walk to the server as part of the
commit transaction. After the commit completes successfully, all of the
repository locks that were mentioned are released-even on files that
weren't committed. This is meant to discourage users from being sloppy
about locking or from holding locks for too long."

I don't like this feature (releasing the lock even on files that were
not committed) because it's based on the assumption that all users are
sloppy. What if I have locked few files, changed them, but I don't want
to commit them all in the same commit? After the first commit all my
files will be unlocked and someone else may lock them in the meantime
(unlikely as it may be it defeats the purpose of a lock).

In many other areas, Subversion has taken a more strict approach,
shifting the burden on good instructions and training of the users, so
that they use the system as it's supposed to be used. If someone lock
lots of file "just in case" and they forgot to unlock them later, isn't
this a classic case of training the users not to do so and lock only the
files they need? Or alternatively, remember to unlock them after the

I don't understand much the use of the --no-lock option for the commit.
If I tell everybody to use the --no-lock, so that they are forced to
unlock all files, why not tell everybody to unlock the files left locked
after a commit? It makes more sense to me.

I would like to hear what you all think of this.

Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-01 13:54:29 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.