bzr 0.15 @ Windows 98 unable to work with new formats, because LockFileEx function is failed in command-line mode.
Errors says that: 'This function allowed only in Win32 mode'.
When I switch LockFileEx/UnlockFileEx to plain LockFile/UnlockFile it seems that basic operations works, but LockFile obtain exclusive lock, so it prevents to get second read lock on the same file. And therefore selftest fails (even on Win2k/XP) in such cases:
bzr: D:/Python25/Scripts/bzr
bzrlib: D:\PYTHON25\lib\site-packages\bzrlib
running 11 tests...
1 ...tLock.test_create_if_needed_read(pywin32) OK 930ms
2 ...Lock.test_create_if_needed_write(pywin32) OK 0ms
3 ...estLock.test_multiple_read_locks(pywin32)ERROR 109ms
Could not acquire lock a-file
4 ...est_multiple_write_locks_exclude(pywin32) OK 0ms
5 ...est_lock.TestLock.test_read_lock(pywin32) OK 0ms
6 ....TestLock.test_read_unlock_write(pywin32) OK 0ms
7 ...lock.TestLock.test_readonly_file(pywin32) OK 0ms
8 ...st_lock.TestLock.test_write_lock(pywin32) OK 59ms
9 ...eLock.test_can_upgrade_and_write(pywin32) OK 0ms
10 ...WriteLock.test_fails_when_locked(pywin32)ERROR 49ms
Could not acquire lock a-file
11 ...ryWriteLock.test_is_write_locked(pywin32)ERROR 0ms
Could not acquire lock a-file
======================================================================
ERROR: #3 test_multiple_read_locks (bzrlib.tests.per_lock.test_lock.TestLock)
vvvv[log from bzrlib.tests.per_lock.test_lock.TestLock.test_multiple_read_locks(pywin32)]
^^^^[log from bzrlib.tests.per_lock.test_lock.TestLock.test_multiple_read_locks(pywin32)]
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Python25\Lib\site-packages\bzrlib\tests\per_lock\test_lock.py", line 92, in test_multiple_read_locks
b_lock = self.read_lock('a-file')
File "D:\PYTHON25\lib\site-packages\bzrlib\lock.py", line 295, in __init__
self._lock(filename, 'rb', LOCK_SH + LOCK_NB)
File "D:\PYTHON25\lib\site-packages\bzrlib\lock.py", line 275, in _lock
raise errors.LockContention(filename)
LockContention: Could not acquire lock a-file
======================================================================
ERROR: #10 test_fails_when_locked (bzrlib.tests.per_lock.test_temporary_write_lock.TestTemporaryWriteLock)
vvvv[log from bzrlib.tests.per_lock.test_temporary_write_lock.TestTemporaryWriteLock.test_fails_when_locked(pywin32)]
^^^^[log from bzrlib.tests.per_lock.test_temporary_write_lock.TestTemporaryWriteLock.test_fails_when_locked(pywin32)]
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Python25\Lib\site-packages\bzrlib\tests\per_lock\test_temporary_write_lock.py", line 84, in test_fails_when_locked
b_lock = self.read_lock('a-file')
File "D:\PYTHON25\lib\site-packages\bzrlib\lock.py", line 295, in __init__
self._lock(filename, 'rb', LOCK_SH + LOCK_NB)
File "D:\PYTHON25\lib\site-packages\bzrlib\lock.py", line 275, in _lock
raise errors.LockContention(filename)
LockContention: Could not acquire lock a-file
======================================================================
ERROR: #11 test_is_write_locked (bzrlib.tests.per_lock.test_temporary_write_lock.TestTemporaryWriteLock)
vvvv[log from bzrlib.tests.per_lock.test_temporary_write_lock.TestTemporaryWriteLock.test_is_write_locked(pywin32)]
^^^^[log from bzrlib.tests.per_lock.test_temporary_write_lock.TestTemporaryWriteLock.test_is_write_locked(pywin32)]
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Python25\Lib\site-packages\bzrlib\tests\per_lock\test_temporary_write_lock.py", line 75, in test_is_write_locked
b_lock = self.read_lock('a-file')
File "D:\PYTHON25\lib\site-packages\bzrlib\lock.py", line 295, in __init__
self._lock(filename, 'rb', LOCK_SH + LOCK_NB)
File "D:\PYTHON25\lib\site-packages\bzrlib\lock.py", line 275, in _lock
raise errors.LockContention(filename)
LockContention: Could not acquire lock a-file
----------------------------------------------------------------------
Ran 11 tests in 1.260s
FAILED (errors=3)
win98 is not a high priority, but for other reasons (eg diff during commit) we probably want to avoid using file locks on the dirstate.