RFC: dirstate & locks
robertc at robertcollins.net
Fri Aug 15 06:39:05 BST 2008
On Thu, 2008-08-14 at 15:51 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Robert Collins wrote:
> > On Wed, 2008-08-06 at 08:02 -0500, John Arbash Meinel wrote:
> >> My personal preference (in the short term) is to just get rid of the
> >> OS
> >> lock, and go back to rename-into-place for dirstate. On windows 'bzr
> >> status' with changes will fail to update the file when some other
> >> action
> >> is reading the file (but we already have that, and worse).
> > This has several race conditions such as
> > bzr commit -m foo &
> > bzr st
> > -> overwriting your last commit
> > and commit can be made to error too by rename-into-place being racy on
> > windows (can't delete open files, commit will have the file open, or
> > status will be renaming etc).
> > I think what I proposed has no problems for windows or linux of this
> > nature, only a 'when do we delete things' problem, and thats solvable
> > using one of a number of heuristics if the basic thing sounds ok.
> > -Rob
> I would just have "bzr status" take out a real write lock (since that is
> basically what it is half-doing now) and check that the file isn't
> modified before it writes its data out.
I don't like this because it doesn't map well to what users want to do -
and all commands that need iter_changes to work would have to be
modified to do this - ls, diff, status are only the obvious ones.
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080815/02899e7f/attachment-0001.pgp
More information about the bazaar