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

Re: SVN is ignoring needs-lock property

From: Andreas Stieger <andreas.stieger_at_gmx.de>
Date: Mon, 28 Jul 2014 23:04:48 +0100

Hi,

> On 28 Jul 2014, at 22:38, Mun Johl <Mun.Johl_at_Emulex.Com> wrote:
>
> I have an XML file checked in with the svn:needs-lock property set. I
> verified that the permissions on the file in the filesystem do not
> include write permission.
>
> As a test, I made a small change to the file and attempted a check-in
> (w/o first locking the file). To my surprise, the file update was
> applied!
>
> Is this a known bug with the version of SVN I'm using?
>
> Are my expectations incorrect?

See http://svnbook.red-bean.com/en/1.7/svn.advanced.locking.html#svn.advanced.locking.lock-communication

The property indicates to clients that the item should, not must, be locked. It is, along with locks, a communication tool to synchronise edits to files which are not textually merge-able. Most clients support this and prompt the use to acquire a lock.

> That is, am I doing something
> incorrectly if I want a user to have to lock the file prior to check-in?

You mean prior to editing?

You may attempt to enforce locking via hooks but that would undermine the concepts of breakable / steal-able locks in svn.

Andreas
Received on 2014-07-29 00:05:37 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.