[RFC] [Bug 363837] proposed patch
martitzam at gmail.com
Mon Apr 20 06:05:21 BST 2009
I'm just starting to read up on the etiquette for bzr.dev, so please point
me in the right direction.
Today I opened #363837 <https://bugs.launchpad.net/bzr/+bug/363837> and
uploaded my own patch to the issue tracker against 1.15dev. I am seeking
comments and testing with the goal of making a patch acceptable for
inclusion in bzr. The regression is a race condition, so you may have a
hard time reproducing it. Also, the patch is very inelegant. It has to be
dumb, because _win32_delete_readonly() might be invoked in any number of
contexts in the future, even though its only purpose today is to clean up
after os.rmtree. The logic o fthe patch is pretty obvious and explained in
A smarter -- but less general -- approach might be localized to diff --using
(which is the only instance of the regression I've actually seen) by
capturing the pid for the external diff tool and pass this information to a
"smarter" _win32_delete_readonly() which could then poll for the process to
die (for a limited time of course) rather than use a fixed delay as my patch
does. But that would not address the intrinsic race condition in general.
The unpatched race condition causes diff --using with BeyondCompare3 to fail
100 out of 100 times.
Ther patched code succeeds 100 out of 100 times.
Although I have expereinced this regression only with BeyondCompare3 as my
external diff tool, this regression is worth addressing for four reasons:
1. An intrinsic race condition exists. It's not specific to any tool.
Others will feel it sooner or later.
2. The fix can be isolated to the win32 compatibility layer. So it's
3. Promoting bzr on Windows is the Right Thing to do.
4. BeyondCompare is the most powerful diff/merge tool I've seen, it's
inexpensive, and it is now available for Linux as well as Windows.
I hope at least that the first three are not controversial. And I have no
connection to BeyondCompare except as a very satisfied customer for the last
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bazaar