Rev 4801: Merge the trailing-garbage fixes. in http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-test-suite
John Arbash Meinel
john at arbash-meinel.com
Sun Nov 8 05:09:34 GMT 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-test-suite
------------------------------------------------------------
revno: 4801 [merge]
revision-id: john at arbash-meinel.com-20091108050924-295ppky7tehnp5h2
parent: john at arbash-meinel.com-20091108045217-iz90ih2h760an33s
parent: john at arbash-meinel.com-20091108050024-zpmrgqwa6hszlfsg
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1.0b4-win32-test-suite
timestamp: Sat 2009-11-07 23:09:24 -0600
message:
Merge the trailing-garbage fixes.
modified:
bzrlib/tests/test__dirstate_helpers.py test_dirstate_helper-20070504035751-jsbn00xodv0y1eve-2
-------------- next part --------------
=== modified file 'bzrlib/tests/test__dirstate_helpers.py'
--- a/bzrlib/tests/test__dirstate_helpers.py 2009-06-22 15:39:42 +0000
+++ b/bzrlib/tests/test__dirstate_helpers.py 2009-11-08 05:00:24 +0000
@@ -743,13 +743,17 @@
def test_trailing_garbage(self):
tree, state, expected = self.create_basic_dirstate()
- # We can modify the file as long as it hasn't been read yet.
+ # On Linux, we can write extra data as long as we haven't read yet, but
+ # on Win32, if you've opened the file with FILE_SHARE_READ, trying to
+ # open it in append mode will fail.
+ state.unlock()
f = open('dirstate', 'ab')
try:
# Add bogus trailing garbage
f.write('bogus\n')
finally:
f.close()
+ state.lock_read()
e = self.assertRaises(errors.DirstateCorrupt,
state._read_dirblocks_if_needed)
# Make sure we mention the bogus characters in the error
More information about the bazaar-commits
mailing list