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

Re: Subversion 101: To lock or not to lock..

From: Nico Kadel-Garcia <nkadel_at_comcast.net>
Date: 2006-06-09 03:21:59 CEST

----- Original Message -----
From: "Andy Levy" <andy.levy@gmail.com>
To: "L. Wayne Johnson" <wayne@zk.com>
Cc: "Michael March" <mmarch@gmail.com>; <users@subversion.tigris.org>
Sent: Thursday, June 08, 2006 8:16 PM
Subject: Re: Subversion 101: To lock or not to lock..

> On 6/8/06, L. Wayne Johnson <wayne@zk.com> wrote:
>> >> "When editing an html or jsp file, it is often necessary to modify
>> >> many parts of the file. If someone else is also editing the same
>> >> file, merging the changes can be extremely time consuming, as it is
>> >> hard for subversion to reconcile and display the diffs correctly (this
>> >> is from experience). Locking provides a safeguard from having to
>> >> endure the merge process but does not stop people from getting their
>> >> job done, because you should never have two people working on the same
>> >> html/jsp file at the same time."
>> >>
>> This statement does not make sense to me. On the one hand merging the
>> file
>> is too time consuming so you must lock it.
>
> Locking most definitely can stop people from getting their job(s)
> done. On my last major ASP project (using VSS), we had a directory
> full of utility functions in include files - a couple dozen functions
> sprinkled across about 8 files. At least a couple times a week, I had
> to call over the wall to my partner "hey, are you using that file? If
> not, can you please unlock it? I'm stopped until I can fix this
> function."

This looks like the reason SVN 1.3.x introduced the "force unlock" options,
so that the second person can break the lock of the first person.

There is no graceful solution to two people working on the same file at the
same time. The real Subversion solution is to use branches, and merge
differences when each person is done, not to each lock the same copy.

> What's even worse is when you have to tell the project manager on
> Wednesday "I can't fix those 3 bugs this week because the guy on
> vacation till Monday has those files locked, and if we have the admin
> break the lock we'll have a hell of a time trying to get everything
> merged and synced up again."
>
>> On the other hand locking the file does not cause a problem because
>> nobody else will be working on it.
>
> In other words, why bother locking in the first place?
>
> This sounds more like the developers don't want change, or are trying
> to push the new SCM guy around.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 9 03:22:56 2006

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.