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

Re: start-commit to enforce needs-lock?

From: Srilakshmanan, Lakshman <lakshman.srilakshmanan_at_police.vic.gov.au>
Date: 2007-08-08 04:47:54 CEST

In addition to what Dave wrote below, you could depending on your
client, set your client configuration to add svn:needs-lock
automatically to the files when the user performs a client side add

We use TortoiseSVN but I can't speak for all svn clients.


-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Dave Lawrence
Sent: Wednesday, 8 August 2007 2:58 AM
To: users@subversion.tigris.org
Subject: Re: start-commit to enforce needs-lock?

Andy Levy wrote:
> On 8/7/07, A. M. Passy <amarcpassy@gmail.com> wrote:
>> I'm looking for a way to enforce the setting of the svn:needs-lock
>> property for new and imported files. I've read the appropriate
>> sections of the svnbook and read a whole lot of the mailing list
>> traffic. I understand that using a pre-commit hook is considered
>> bad, because one is modifying an in-process transaction (though as an

>> aside, no one has explained exactly under what conditions, i.e._why_
>> it is bad - the comments are all in the mode of "there be dragons").
> It's bad because (and this is only one of several reasons, I'm sure)
> if a hook modifies a transaction in-flight, the WC is out of sync with

> the repository immediately after the transaction is committed. If I
> commit a file to the repository, upon completion of the transaction,
> my copy of the file should be identical in all ways to the copy in the

> repository.

My understanding is that the correct thing to do is to use the
pre-commit hook to validate the commit, and reject it if it doesn't
conform. The user receives an error and the ball is now back in their
court - they must add the needs-lock property and try again.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

The information contained in this email and any files attached may
be confidential information to the intended recipient and may be
the subject of legal professional privilege or public interest immunity.

If you are not the intended recipient, any use, disclosure or copying is

If you have received this document in error please telephone 1300 307 082

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 8 04:46:45 2007

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.