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

AW: SVN is ignoring needs-lock property

From: Markus Schaber <m.schaber_at_codesys.com>
Date: Tue, 29 Jul 2014 14:59:52 +0000

Hi,

Von: Markus Schaber [mailto:m.schaber_at_codesys.com]
> Von: Niemann, Hartmut [mailto:hartmut.niemann_at_siemens.com]
> > > -----Ursprüngliche Nachricht-----
> > > Von: Mun Johl [mailto:Mun.Johl_at_Emulex.Com]
> > [...]
> > > 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? That is, am I doing something
> > > incorrectly if I want a user to have to lock the file prior to
> > > check- in?
> >
> > I did some experiments recently. It looked like you don't need the
> > lock for a commit, but if some other working copy has a lock, you
> > won't be allowed to commit. (I am not totally sure, though)
>
> The rule is: If the server (=repository) knows about a lock for that file,
> one can only commit with the matching lock token.
>
> Working copies store the lock token when one locks a file there. However,
> this information can get out of sync, for example by:
>
> - "stealing" a lock using "--force", the old working copy still has the stale
> lock token.
>
> - Removing a lock on the server using svnadmin.
>
> - Duplicating the working copy (e. G. using "copy" on the shell or zipping it
> together and unpacking on a different machine) - then the first one to commit
> or unlock has a valid token, while the other one does not have a valid token.
>
> - Restoring an old working copy from a backup - the working copy may still
> have stale lock tokens for locks which were removed in the meantime.
>
> (This list is non-exhaustive.)

I forgot to tell the effects of the svn:needs-lock property: This tells most
clients that this object should be locked before it can be modified. Some
svn clients like the command line client honor it by setting the read-only
flag (or removing the writeable-permission bit) on the file during checkout
or update, and making the file writeable as a side-effect of acquiring a lock
for that file.

Best regards

Markus Schaber

CODESYS® a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.schaber@codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received
this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure
or distribution of the material in this e-mail is strictly forbidden.
Received on 2014-07-29 17:00: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.