lock-breaking ui (was Re: transport lock methods)

Robert Collins robertc at robertcollins.net
Tue Feb 21 00:11:56 GMT 2006


On Mon, 2006-02-20 at 11:08 +1100, Martin Pool wrote:
> On Thu, 2006-02-16 at 20:29 -0600, John A Meinel wrote:
> > Robert Collins wrote:
> > > I think we should remove the lock methods from transport because having
> > > transport specific locks leads to bugs : we dont have cross-transport
> > > compatibility.
> > > 
> > > I think we should do this for 0.8. Thoughts?
> > > 
> > > Rob
> 
> They should certainly be deprecated and not used by new formats.
> 
> I think it's fairly common to use only one particular protocol to write
> to a branch, and the transport locks at least give some protection
> against that.  
> 
> There are several options
> 
>  0: leave them as is, using protocol-specific locking
> 
>  1: change them to use LockDirs instead - will give protection between
> new clients using old branches

But will break with old clients. I don't think is a feasible option as
'break' means 'trash user data'.

>  2: use both LockDirs and protocol-specific methods: will give
> transport-specific protection for old clients, and better protection for
> new clients

Yes.

>  3: remove them entirely, so new clients on old branches have no
> protection

As for 1, I don't think is a feasible option.

> Of these I prefer 2, and then 0.
> 
> It's possible we could actually use a single lock dir which satisfies
> both types of client -- ie by existing it blocks out attempts to create
> with O_EXCL.

mmm, not sure this is useful, as it would give us this combined
behaviour forever :p.

> I think we can avoid getting tied up by older clients by always taking
> the downlevel lock first.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060221/c0c6b55a/attachment.pgp 


More information about the bazaar mailing list