diff --using does not give Windows enough time to remove temp files
Bug #363837 reported by
Martitza
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Unassigned |
Bug Description
This is a followup to Question #67932.
The Win32 platform (specifically) may take a long time to release diff --using temp files. This may be true for other operations on Win32, as the problem is an uncaught exception in _win32_
Not all external tools are effected. For example, kdiff does not have this problem on Win32. But the very popular BeyondCompare doe shave this problem -- at least on my system.
I am offering a patch which I place into the public domain. It is primitive but works.
Martitza Mendez
To post a comment you must log in.
Improved patch, with improved error handing. The baseline is bzr.dev r4300.
A sleep of 250 ms (with two chances to remedy the exception, plus the initial attempt) is sufficient to produce correct behavior on the two systems I have tested. Test showed that 10 ms was insufficient and 100 ms was "almost" always sufficient. So 250 ms is a conservative value consistent with the kind of defensive behavior we want, balanced with the responsiveness of bzr. Again, this patch is activated only for Windows and only if the first attempt fails.
-M