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

Re: unlocking a svn:needs-lock file

From: Branko ─îibej <brane_at_wandisco.com>
Date: Fri, 27 Mar 2015 23:04:07 +0100

On 27.03.2015 17:04, Andrew Schwartz wrote:
> Hi,
>
> I'm using svn on Windows.
>
> If a file with the svn:needs-lock property is currently locked and is
> locally modified, I think that 'svn unlock' should fail. I'm seeing
> it happily succeed.

This is not a bug.

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

http://svnbook.red-bean.com/en/1.7/svn.basic.version-control-basics.html#svn.basic.vsn-models.lock-unlock

> After the 'svn unlock', the local checkout is in a bad state: it has
> local modifications to an unlocked svn:needs-lock file.

There is no 'bad state'. Locking is completely optional. You can commit
an unlocked file regardless of the svn:needs-lock property. The only
thing that property does is to make the file read-only by default in the
working copy, as a hint to the user.

> Is there a legitimate use case here that I'm not thinking of?

As the book says, 'svn:needs-lock' is just a communication mechanism. It
doesn't enforce a particular workflow.

-- Brane
Received on 2015-03-27 23:06:53 CET

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