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

Re: Checkin - with lock

From: Lutz Dornbusch <svn_at_yogasurftech.de>
Date: Thu, 04 Sep 2008 16:18:20 +0200

Modha Khammammettu wrote:
>
>
> Created a new file
> Added File
> Committed file
> Set the lock as shown below...
>
> C:\soa>C:\svn-win32-1.5.1\bin\svn propset svn:need-lock "needs lock"
> lock_test.txt property 'svn:need-lock' set on 'lock_test.txt'
>
> Changed file.
> Committed again ( Thought it will ask me to acquire lock first.., but
> file just got committed)
>
> Can you please tell me where I went wrong in this scenario.
>
> Thanks
>
>
> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c_at_ryandesign.com]
> Sent: Tuesday, September 02, 2008 11:08 PM
> To: Modha Khammammettu
> Cc: users_at_subversion.tigris.org
> Subject: Re: Checkin - with lock
>
>
> On Sep 2, 2008, at 11:41 PM, Modha Khammammettu wrote:
>
>> Is there a facility in subversion where we can allow checkin only if a
>
>> lock is acquired on a file.
>>
>
> The svn:needs-lock property may fit your needs.
>
> http://svnbook.red-bean.com/en/1.4/svn.advanced.locking.html

[..]
However, it is still possible to commit a file without owning the lock.
You just have to remove the writeprotection, change the file and commit
it. Although this is against svn userguidelines, you cannot control this
behaviour on the client in case of an out-of-the-box svn repo.
If you want to change this behaviour, you have to implement an
pre-commit-hook, where you have to check if the commiter is also owner
of the lock.

Regards,
Lutz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-05 19:29:26 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.