bzr-svn tests on Windows

Alexander Belchenko bialix at ukr.net
Sun Jun 21 06:37:46 BST 2009


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




More information about the bazaar mailing list