[PATCH] win32 ScratchBranch must close lockfile before deleting

John A Meinel john at arbash-meinel.com
Wed Jun 1 03:20:23 BST 2005


John A Meinel wrote:

> On windows, a file cannot be deleted if it is already open. Since
> Branch() holds the lockfile open ScratchBranch() has to close it before
> shutil.rmtree will work.
>
> Attached is a patch that just closes self._lockfile() before deleting.
> This makes all self-tests pass.
>
> All of the tests still don't pass, since .bzrignore is still being
> read/written in the wrong format (binary versus non-binary).
>
> This is a patch against bzr 611.
>
> John
> =:->
>
Attaching the patch, and a small comment.

The other problem here is that Branch() doesn't close the lockfile when
it releases the lock. I don't know if this will ever actually be a
problem, but it is something to be aware of.

John
=:->

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scratch-closes-lockfile-win32.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20050531/e7125871/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050531/e7125871/attachment.pgp 


More information about the bazaar mailing list