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

Re: Warning on get lock (Was: Get lock is not visible to other users)

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

Edward Harvey wrote:
> I don't think there's any reason to expect people to only lock files
> that needs-lock.
>
> Users want (on a regular basis) to simply lock a file so nobody else
> will work on it at the same time. Because they don't trust automatic
> merge, and they don't want to merge it manually.
>
> I think people don't want to use needs-lock all over the place, but they
> do occasionally want to lock files.

Locking does not prevent others from working on a file, it only prevents
them from committing their changes. Consider this scenario:

Joe wants to make major changes to Comms.c and has to make a 1-line
tweak to Serial.c. He locks Comms.c but doesn't bother with Serial.c.

Lisa wants to make sweeping changes to Serial.c and needs to change a
couple of lines in Comms.c to fix the linkages. So she locks only Serial.c

Now you have a deadlock. Neither party can commit all their changes, so
one of them has to commit a broken subset first, wait for the other to
commit a second broken subset, then try and fix up the mess. You now
have 2 revisions in the repository which will not build, which rather
defeats the object of atomic commits.

You seem to have a locking model in your head which differs from
Subversion's model, and you are trying to force subversion into your
mould. Bear in mind that Subversion was principally designed for
disconnected usage. You do not require a permanent connection to the
repository. Having any sort of server push to update clients to the
current repository state is not on the cards. If you want that sort of
VCS there are plenty of others that work that way. Subversion's locking
mechanism was designed (very carefully) to fit in with the rest of the
design methodology.

Simon

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

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

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