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

Re: Lock and needs-lock together

From: Simon Large <simon_at_skirridsystems.co.uk>
Date: 2006-04-27 15:09:30 CEST

Edward Harvey wrote:
> Can anyone tell me if this is possible?
> I would like to administratively set something, such that... If Joe
> locks a file, the file will automatically get "needs-lock" too. And
> when Joe releases the lock, the "needs-lock" is automatically removed.
> Consequently, as long as Joe has the file locked, that file in Lisa's
> working copy will be read-only and have an icon indicating needs-lock.
> (Assuming Lisa does an update.) And once Joe releases the lock, Lisa's
> file will go back to "normal" with a green checkmark. (again, assuming
> she does an update.)

No it's not possible to do that automatically. svn:needs-lock is a file
property, and to change that in the repository you would need to commit
the file before locking to add the property, and commit again after
unlocking to remove it.

I guess in the way you want to use it, you can use locking without the
svn:needs-lock property. If Joe takes out a lock, Lisa can no longer
commit any changes - she must wait until Joe finishes his big change,
then update (merging all his changes) and then she can commit her one-liner.

For non-mergeable files (mostly binaries) you should have svn:needs-lock
set permanently, because no change is mergeable, however trivial.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Thu Apr 27 15:08:44 2006

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