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

Problem with switch and svn:needs-lock

From: Mark Phippard <MarkP_at_softlanding.com>
Date: 2005-05-13 17:35:19 CEST

If your WC has a file with the svn:needs-lock property set and you then
switch your WC to a branch where that file does not have that property.
The property is removed in the WC but the read-only attribute is not
removed from the file.

This causes problems in Subclipse, and somewhat also TortoiseSVN, since we
both decorate files based on the read-only attribute. In the case of
Subclipse, the presence of the read-only attribute causes Eclipse to
present the user with the Subclipse Lock UI -- a good thing. However, we
are then relying on the svn lock command to remove the read-only
attribute, which it doesn't in this case. It would be nice as a fail-safe
if it could do that.

This should be reproduction recipe. I did it on Windows, so this may not
be exactly right.

svn mkdir -m "" url://repos/trunk
svn co url://repos/trunk test_wc
cd testwc
touch foo
svn add foo
svn ci -m ""
svn copy -m "" . url://repos/branch
svn propset svn:needs-lock foo
svn ci -m ""
svn switch url://repos/branch

At this point, foo will not have the property, but it will be read-only.

Again, as an additional requuest it would be nice at this point if:

svn lock foo

Would remove the read-only attribute even though the svn:needs-lock
property does not exist.

Thanks

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 13 18:33:59 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.