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

Re: svn:needs-lock explanations...

From: Troy Curtis Jr <troycurtisjr_at_gmail.com>
Date: Wed, 6 Feb 2008 21:39:24 -0600

On Feb 6, 2008 8:22 AM, Roth, Pierre <pierre.roth_at_covidien.com> wrote:
> Hi,
>
> I've got a list of binary files in my working copy and each of them has
> the svn:needs-lock property set.
> If I want to make some changes on a file I have then to get a lock on
> it, normal use case here.
>
> My use case is the following now : My working copy of file1.bin has the
> svn:needs-lock set. I have a file1.bin elsewhere and I overwrite the one
> in my wc with this new one. My OS tells me that I'm going to overwrite a
> read-only file as I have acquired the lock on file1.bin. And then I can
> commit !
>
> So, I've succeeded in commiting something without acquiring the lock
> even if svn:needs-lock was set !
>
> I wonder why the server didn't told me that I could not commit a file
> without having previously acquired the lock....
>
> Thanks for your explanations !
>
> Pierre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>

Because the only thing Subversion does special with the
"svn:needs-lock" property is make the file ro on checkout, a
completely client side operation. Ultimately it's just there as a
little reminder, and in this function your OS even reminded you
(saying you are about to overwrite a read-only file). It was put in
for binary files, but Subversion is fundamentally uses a
copy-edit-merge paradigm, not lock-edit-commit.

Just keep in mind it's a reminder and an aid, but ultimately the
developer has the ultimate power of decision.

Troy

-- 
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-07 04:39:44 CET

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.