[win32] Permission denied in fancy_rename

John Arbash Meinel john at arbash-meinel.com
Mon May 1 21:42:27 BST 2006


Alexander Belchenko wrote:
> Some of selftests fails on windows native due to permissions denied
> error. And almost all of them raise this error in fancy_rename function
> from osutils module.
> 
> I think most of this errors raise because in bzrlib used linux approach
> to do not close explicitly files after read/write operations and rely on
> unlink functionality of linux. Unfortunately unlink does not exist on
> windows and windows itself cannot delete file in use.
> 
> Today I pulling branch of Bugs Everywhere of Aaron Bentley. I try to
> pull this branch into knit format otherwise it fails due to
> incompatibility with some filenames. After pull bzr breaks with the same
> error:
> 
> E:\work\Python\bzr\third.party\be>bzr pull
> http://panoramicfeedback.com/opensource/bzr/be
> Backup Inventory created.
> bzr: ERROR: exceptions.OSError: [Errno 13] Permission denied
>   at E:\work\Python\bzr\bzr.dev\bzrlib\osutils.py line 143
>   in fancy_rename
> 
> When I switch to cygwin I can finish this pull successfully.
> 
> Dear core developers! Don't leave files opened after use! Please, close
> them explicitly! Or bzr always has minor issues on windows platform.
> 
> Thank you.
> 
> -- 
> Alexander

I agree it is bad form to leave files open. Can you provide a traceback
so that we might know what file we are having problems with?

Probably fancy_rename should also be instrumented to throw an exception
which actually includes the file paths being acted upon, rather than
just letting OSError be raised (which doesn't say anything about what
file failed).

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060501/cf0b805e/attachment.pgp 


More information about the bazaar mailing list