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

Re: which version control supports file locking and who has it locked

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Tue, 14 Jun 2016 21:46:49 +0200

On Mon, Jun 13, 2016 at 10:49 PM, Doug Robinson
<doug.robinson_at_wandisco.com> wrote:
>
> Johan:
>
> On Mon, Jun 13, 2016 at 2:30 PM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
>>
>> On Mon, Jun 13, 2016 at 5:29 PM, Doug Robinson
>> <doug.robinson_at_wandisco.com> wrote:
>> >
>> > Johan:
>> >
>> > The "svn lock" enables all people considering working with a file to
>> > be able to see who currently has the file locked. But they cannot see
>> > anyone who is working on the file but does not own the lock.
>> >
>> > Reading the "p4 edit" man page:
>> >
>> > https://www.perforce.com/perforce/r16.1/manuals/cmdref/p4_edit.html
>> >
>> > we see that the expected use is "p4 edit; <edit file>; p4 submit" and that
>> > "p4 edit" updates the Perforce database to mark the file as being edited
>> > by that account in that workspace. That means that any other Perforce
>> > user can see *all* of the other accounts working on that file (this is *not*
>> > the same as a lock) by issuing the "p4 opened -a file" command.
>> >
>> > The ClearCase Dynamic View situation is pretty much the same as what
>> > I have described above for Perforce.
>>
>> Okay, so IIUC with "p4 edit" multiple users can start editing the file
>> (Alice, John and Jim), and they can all indicate concurrently that
>> they're editing the file, and other users can see that Alice, John and
>> Jim all have the file opened for editing. Interesting, but I fail to
>> see how that helps with non-mergeable files, where you want to lock it
>> out for one person to work on it at the same time.
>
>
> Or they can check to see who's editing it before checking it out.

Ah yes, that's true.

>>
>> Remember the question from the OP: "in Tortoise SVN, there is no
>> method of locking a file until it has been changed .
>> or knowing who is actually working on a file. is this feature
>> available on any other version control , GIT , CVS ?"
>
>
> There are 2 parts to that question:
> 1. no method of locking
> 2. no way to see who's actually working on the file
>
> The former is just wrong: SVN has locking and TortoiseSVN definitely
> has that implemented.

Agreed.

>>
>> He seems to be asking for locks, i.e. one developer locks it until he
>> has completed his change.
>
>
> I just didn't assume that the OP only was talking about locking.
> If they were then the 2nd comment is strange, but, well, ok. Done.

Ack.

>> Apart from that: AFAICS the remark "But they cannot see anyone who is
>> working on the file but does not own the lock" applies to all systems
>> under discussion. With Perforce, I'm guessing that I can just as well
>> start editing the file with some text editor, outside of p4's
>> knowledge, right? That's just the same as starting to edit an
>> svn:needs-lock file without taking the svn lock (note that an
>> "svn:needs-lock file" is by default read-only on the filesystem in an
>> svn working copy, so you have to explicitly make it writeable).
>
>
> I'm not sure about Perforce's implementation. However, just for
> comparison: with ClearCase Dynamic Views you can *not* edit the file
> without a checkout. The Dynamic View implementation is via an actual
> OS file system so you can't beat it. And everyone can see that checkout.

Okay, thanks for explaining.

-- 
Johan
Received on 2016-06-14 21:47:15 CEST

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.