[MERGE] Change DirStateRevisionTree
Martin Pool
mbp at sourcefrog.net
Fri Jan 23 21:30:54 GMT 2009
2009/1/23 John Arbash Meinel <john at arbash-meinel.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> So, as many have encountered, we've had some problems with OS locks on
> win32. This happens because on Linux, the same process can lock a file
> multiple times, without having problems, but not on win32. (I've
> mentioned this before, but I'm summarizing to remind people what is
> going on.)
>
> I believe I've tracked down the primary cause of this:
>
> WorkingTree.basis_tree()
>
> The issue is that for dirstate formats, it returns a
> DirStateRevisionTree that grabs direct access to the
> '.bzr/checkout/dirstate' file.
BB: approve
That was nicely done: the reasoning makes sense and the patch seems to
correctly implement it. You might want to look up the relevant bug
and put it in NEWS and mark it fixed or ask for confirmation.
> Anyway, with this patch, I would imagine most of the win32 failures
> about LockContention will go away. I don't really like fixing it by
> allowing programmers to be sloppy, but we've had 6months => 1year of
> this problem, and nothing has actually happened.
>
> I also added code to give DeprecationWarnings for callers that do
> naughty things. However, as I don't want to spend the time fixing them
> right now, I just commented out the warning.
Personally I think we should change the wt format so as not to rely on
shared/exclusive locks, as they cause several problems that cannot be
easily fixed in code: on filesystems with no locks (eg AFS), when
running guis and other command simultaneously, and of course that
we're using a facility that's so different on Windows and Unix. I
don't know if we'll get to that soon, but I think working towards it
is better than updating the callers for something we want to get rid
of.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list