[win32] Permission denied in fancy_rename
John Arbash Meinel
john at arbash-meinel.com
Mon May 1 22:09:39 BST 2006
Alexander Belchenko wrote:
> John Arbash Meinel пишет:
>> Alexander Belchenko wrote:
>>> 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.
>>
>> 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?
>
> Log attached. But it does not point to filename.
>
>> 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).
>
> This will be good.
>
> --
> Alexander
...
> File "E:\work\Python\bzr\bzr.dev.bialix.encodings\bzrlib\store\versioned\__init__.py", line 224, in copy
> source.copy_to(self.filename(result_id), self._transport)
> File "E:\work\Python\bzr\bzr.dev.bialix.encodings\bzrlib\knit.py", line 364, in copy_to
> transport.put(name + DATA_SUFFIX, self._data._open_file())
> File "E:\work\Python\bzr\bzr.dev.bialix.encodings\bzrlib\transport\local.py", line 111, in put
> fp.commit()
> File "E:\work\Python\bzr\bzr.dev.bialix.encodings\bzrlib\atomicfile.py", line 79, in commit
> rename(self.tmpfilename, self.realfilename)
> File "E:\work\Python\bzr\bzr.dev.bialix.encodings\bzrlib\osutils.py", line 219, in rename
> fancy_rename(old, new, rename_func=os.rename, unlink_func=os.unlink)
> File "E:\work\Python\bzr\bzr.dev.bialix.encodings\bzrlib\osutils.py", line 143, in fancy_rename
> rename_func(new, tmp_name)
> OSError: [Errno 13] Permission denied
>
> return code 3
Looking at this part of the code, you may have uncovered a different
bug. Specifically, I don't see why the code would be downloading all of
the data, and putting it into place if the file already existed.
So while we have some sort of issue with closing the file, we have an
even bigger issue that we are trying to create anew a file which already
exists. (It sounds like we are creating the same file twice).
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/32ab50b9/attachment.pgp
More information about the bazaar
mailing list