[MERGE][0.15] Updates to OS Locks to support win32

Alexander Belchenko bialix at ukr.net
Tue Mar 20 17:08:36 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel пишет:
> The attached patch updates our locking code in 2 ways.
>
> 1) It adds ReadLock.temporary_write_lock() which allows 'bzr status' to
> upgrade to a Write lock if it can, so that it can update the dirstate
> with new stat values/sha1 hashes.
>
> 2) It provides the framework for making fcntl locks truly exclusive.
> (you shouldn't be able to take out a WriteLock if you have a ReadLock,
> nor should you be able to take out a ReadLock if you have a WriteLock).
>
> The specific tests for it (and the ability) are currently disabled.
> Because it makes revert and merge tests fail. (There are 2 revert tests
> which fail if a read lock blocks a write lock, and several more merge
> tests which fail if a write lock blocks a read lock).
>
>
> I would like to merge this for 0.15, because it make 'bzr status' work
> again on win32. Without this, 'bzr status' has to read all files that
> are out-of-date, and is unable to update the dirstate file. Which means
> that unless you do a mutating option (bzr commit?) 'bzr status' is very
> slow.
>
> I really wanted to clean up our code so that we could make locks
> properly exclusive on all platforms, but I just wasn't able to fix all
> the tests. So it is easier to just disable that for now.
>
> Oh, and there are some "InterRepository" tests for old branch formats
> that fail if we cause blocking. I think the best fix there is to make
> read-locks no-ops, as they are in new formats. But that is more
> discussion which needs to take place.
>
> I'm happy to clean this up as people need me to. But it would be nice if
> we could get this merged quickly. The alternative is that I think we
> need to disable dirstate as the default format on win32.

Before read your patch I merge and run selftest. There is some failed
tests related to locks with error message 'Could not acquire lock'.

Before dirstate branch was merged I was at the point 'zero failed blackbox tests'.
Now with your patch I have 4 tests that fails because of locks
problems. Can you look at this tests, please?
Other failed tests is related to problem with WindowsError (your another patch).
(Don't look at SFTP tests failings).

If we could at least fix blackbox tests I'd like to give you +1.
Log of blackbox testing is attached.

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGABUUzYr338mxwCURAgITAJ9D+dwDn2v2uP94pD7QqZR8xPx43gCfXfEe
i1sWCwiG3GQ22pX1ABH/6k8=
=UMsm
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_blackbox.log
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070320/b8c791e2/attachment-0001.diff 


More information about the bazaar mailing list