File Locking
Arne Babenhauserheide
arne_bab at web.de
Thu Oct 16 10:52:09 CDT 2008
Am Donnerstag 16 Oktober 2008 11:51:28 schrieb Alpár Jüttner:
> Therefore locking is inherently impossible in DVC. If you really need it
> (in most cases you don't), you must use a system where the commit and
> the push operation is strictly tied together, like SVN.
That's only true when you judge DVCS while thinking in the centralized
paradigm.
What a commit in SVN does is two things: Store a current state of the repo and
publicize it. A lock therefore prevents publication of a modified file by
preventing the saving of its state.
In Mercurial these two things are seperated, so preventing the publication of
a modified file can be done without having to disallow people to save its
state locally.
So the "disallow publication" aspect of locking is completely possible in a
DVCS: Just don't accept any changesets which modify locked files.
And the "disallow saving the modified state" aspect is an inherently flawed
idea, since it poses unnecessary restrictions on the individual developer even
though his actions don't affect others if he doesn't publicize his changes.
In short: With Mercurial you can do the good aspect of file locking: Keep
people from disturbing the work of others by pushing changes to a locked file
to a reference repository. But you can't do the bad part of locking: Disturb
the private work of people.
Besides: That bad part (discrupting the work of individuals by forbidding them
to save the state of a locked file) also offers no security, since locking a
file in SVN doesn't keep people from spreading a modified version, it just
keeps them from saving its state inside SVN.
Best wishes,
Arne
--
-- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :)
-- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the
history of free software.
-- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln.
-- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20081016/36753e01/attachment.pgp
More information about the Mercurial
mailing list