diff --using does not give Windows enough time to remove temp files

Bug #363837 reported by Martitza
2
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_delete_readonly().

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

Revision history for this message
Martitza (martitzam) wrote :
Revision history for this message
Martitza (martitzam) wrote :

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

Revision history for this message
Martin Pool (mbp) wrote :

Thanks for the report and patch.

Changed in bzr:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Martitza (martitzam) wrote : Re: [Bug 363837] Re: diff --using does not give Windows enough time to remove temp files

On Tue, Apr 21, 2009 at 8:25 AM, Martin Pool <email address hidden> wrote:

> Thanks for the report and patch.
>
> ** Changed in: bzr
> Importance: Undecided => Medium
>
> ** Changed in: bzr
> Status: New => In Progress
>

Thanks. I realize now that I should have marked it [PATCH] instead of
[MERGE].

I welcome all feedback on how to communicate with the bzr team.

-M

Revision history for this message
Martitza (martitzam) wrote :

I have verified that the fix (merged in r4400) has the intended result on win32.

This issue can be closed I think.

Revision history for this message
Martin Pool (mbp) wrote :

Thanks Maritza.

Feel free to change the bug status yourself.

Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.