[MERGE] [BUG 363837] Catch _win32_delete_readonly failure to remove file or directory and try to recover
Alexander Belchenko
bialix at ukr.net
Sun May 10 21:44:56 BST 2009
Maritza Mendez пишет:
...
> I think it's still best to just wrap the osutils.rmtree in diff.py (line
> 734) in a try/except:
>
> def finish(self):
> try:
> osutils.rmtree(self._root)
> except:
> note("The temporary directory [%s] was not cleanly removed."
> % self._root)
>
> The result is output which looks like this:
>
> The temporary directory
> [C:/docume~1/kferrio/locals~1/temp/bzr-diff-yribs_] was not cleanly removed.
Please, use double quotes instead of square brackets -- this is preferred way in bzr.
> instead of this:
>
> bzr: ERROR: [Error 32] The process cannot access the file because it is
> being used by another process:
> 'C:/docume~1/martitza/locals~1/temp/bzr-diff-yribs_'
>
> I would rather make this a debug-level error than an info-level error,
> so that it does not show up on stderr by default. As I read trace.py it
> is not obvious to me what is the preferred way to create debug-level
> logging. So rather than violate that convention, I opted for
> note/info. I may look through the sources for examples of text which
> get printed only to bzr.log to figure out the debug level.
trace.mutter() will emit message to .bzr.log only.
>
> Thanks again. I will test a bit more before submitting a merge request.
>
> -M
More information about the bazaar
mailing list