Handling unmergeable files -- a call to arms

Russel Winder russel.winder at concertant.com
Sat May 30 08:15:20 BST 2009


David,

On Fri, 2009-05-29 at 10:04 +0200, David Ingamells wrote:
[ . . . ]
> Martin has implied here the most important issue with file locking in a 
> DVCS, and maybe I'm stating here the bleeding obvious (tm)
> but to state this issue explicitly:
> 
> With a DVSC where do you save the file's lock?
> CVS and Subversion both have a central repository but the Bazaar model 
> does not have any central location - and a branch may even be stored on 
> a computer that is only very intermittently connected to the internet. 
> How will the developer working on that computer (e.g. while riding in a 
> bus) check/set a lock if he wants to edit such an unmergeable file?
> 
> I'm curious what other DVCS packages provide in this area.

Two thoughts:

Every branch/clone in DVCS is a separate fork of a project, it is not a
member of a distributed cache. The idea of locking applies only to a
particular instance of a project.  So there is no need to even
contemplate any form of distributed file locking.

The whole idea of a global operation across branches/clones in DVCS is a
complete non-starter.

In terms of the original question, the idea of file locking is only
relevant in a centralized workflow where there is a single repository.
Any branch/clone only has status as a cache not as a peer.

In this workflow, it is not unreasonable to require all users to have a
plugin installed.  The presence of such a plugin would allow extra
metadata about the centralized cache to be promulgated.  This would
allow for each cache to have information about the lock.  Clearly there
is a standard cache coherence problem to be solved and this would have
to include the problem of disconnected caches.

As far as I know no DVCS provides this capability as yet.  For Mercurial
and Git, I am not sure anyone will ever want to even contemplate it.
Bazaar however claims to be able to operate as a drop in replacement for
Subversion in a centralized repository workflow.  For this workflow, and
only this workflow, there is the possibility of supporting file locking.

Word processor and DTP files are seriously not mergeable, there has to
be an exclusive write access token system of some sort.  CVS and
Subversion (sort of) have the ability to handle this because they are
centralized.  DVCS in general has no way of handling this issue at all.
DVCS used as CVCS ought to be able to.  The only alternatives are to
pass the master document by email, or create a token system in a
centralized place with no replication or caching.

-- 
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: russel at russel.org.uk
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:russel.winder at ekiga.net
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
-------------- 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 : https://lists.ubuntu.com/archives/bazaar/attachments/20090530/f721f05f/attachment.pgp 


More information about the bazaar mailing list