[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: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sun, 29 Mar 2015 07:07:10 +0000

Johan Corveleyn wrote on Fri, Mar 27, 2015 at 23:02:33 +0100:
> On Fri, Mar 27, 2015 at 5:04 PM, Andrew Schwartz <aschwartz_at_gmail.com> 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.

Should 'svn unlock' warn if the unlock target has local modifications?
In the case of svn:needs-lock on a binary / hard-to-merge file, having
this warning would be consistent with our general policy of not losing
user data.

e.g.:

[[[
% svn unlock iota
svn: warning W%06d: 'iota' has local modifications
Unlocked 'iota'.
]]]

> > After the 'svn unlock', the local checkout is in a bad state: it has local
> > modifications to an unlocked svn:needs-lock file.
>
> That's not a bad state. It may be unusual, but it's not 'bad'. It's
> the same as if you would edit the file directly with some editor,
> outside of svn's knowledge.
>
> Keep in mind though that you won't be able to commit your changes if
> someone else has locked it.

... unless you break the lock. ('svn lock' locks are advisory.)
Received on 2015-03-29 09:09:49 CEST

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