~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_lock/__init__.py

Implement a 'ReadLock.temporary_write_lock()' to upgrade to a write-lock in-process.
Implement it for _fcntl.
This is the api that can be used when we want to update a dirty dirstate
even though we only have a read lock.
On win32, this will actually unlock and re-lock the file. Which is part of
the api description. But we don't have to limit ourselves to the lowest
common denominator on all platforms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    result = tests.TestSuite()
68
68
    test_lock_implementations = [
69
69
        'bzrlib.tests.per_lock.test_lock',
 
70
        'bzrlib.tests.per_lock.test_temporary_write_lock',
70
71
        ]
71
72
    adapter = LockTestProviderAdapter(lock._lock_classes)
72
73
    loader = tests.TestLoader()