bzr-svn tests on Windows

Alexander Belchenko bialix at ukr.net
Tue Jun 23 05:07:12 BST 2009


Jelmer Vernooij пишет:
> Alexander Belchenko wrote:
>> Jelmer Vernooij пишет:
>>   
>>> Alexander Belchenko wrote:
>>>     
>>>> Jelmer Vernooij пишет:
>>>>   
>>>>       
>>>>> There's a few issues remaining now, all caused by the fact that you
>>>>> can't remove a file that's still in use on Windows. Any help getting
>>>>> this fixed would be much appreciated.
>>>>>     
>>>>>         
>>>> To fix this problem you have to use own class to open files.
>>>> Simple answer is using Win32 API CreateFile() with flag FILE_SHARE_DELETE,
>>>> see
>>>> http://stackoverflow.com/questions/546504/how-do-i-make-windows-file-locking-more-like-unix-file-locking/546597#546597
>>>>
>>>> Such implementation already exists in hg codebase, see class posixfile_nt in util_win32.py module
>>>> http://selenic.com/repo/index.cgi/hg-stable/file/6556d4145122/mercurial/util_win32.py#l259
>>>>   
>>>>       
>>> I can't, these files are all opened from inside of the Subversion
>>> library so I have no control over what flags are used when opening them.
>>>     
>> So, don't delete files currently opened by svn. Why you need delete them?
>>
>>   
> I'm not deleting them, it's the cleanup in the Bazaar testsuite (which
> deletes the working directory created on the filesystem for each test).

Ah, you mean cleanup code...

You don't need to worry about this, because selftest should simply ignore such errors.
If it's not -- then there is bug in bzrlib test suite itself.

If your test failed because of inability to cleanup things then I'd say something seriously broken
in bzrlib/tests/__init__.py.




More information about the bazaar mailing list