You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Roth, Pierre" <pi...@covidien.com> on 2008/02/06 14:22:31 UTC

svn:needs-lock explanations...

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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: svn:needs-lock explanations...

Posted by Troy Curtis Jr <tr...@gmail.com>.
On Feb 6, 2008 8:22 AM, Roth, Pierre <pi...@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@subversion.tigris.org
> For additional commands, e-mail: users-help@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org