sftp & normal locks currently unsafe?
Robert Collins
robertc at robertcollins.net
Fri Dec 23 04:52:28 GMT 2005
On Thu, 2005-12-22 at 20:25 -0600, John A Meinel wrote:
> Robert Collins wrote:
> > If I read the code right, I can lock a branch normally and via sftp at
> > the same time ?
> >
> > Rob
>
> Correct.
> We have to use O_EXCL on sftp, because we don't have access to os native
> locks.
>
> But locally, we didn't want to worry about leaving lock files around.
> Martin had thought about the idea of doing 'lowest common denominator',
> which meant O_EXCL, and possibly having lockfiles left around.
>
> Mostly, I just wanted to get something which prevented the common case
> of 2 people trying to push to a remote branch.
>
> I've known about the problem, and I believe I've even mentioned it a
> couple of times.
Probably, I just forgot for a bit.
Can't we just use the one lock file like:
No file - lock not taken
file exists - lock taken by *something*, either read or write, the
branch does not care.
That is - we dont allow multiple locks of any sort.
This is compatible with our current constraints on windows as I
understand it anyway.
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/20051223/92a2e913/attachment.pgp
More information about the bazaar
mailing list