~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

Change the inventory serialization to be line delimited.
This causes a format bump for all repos.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
class TestCHKInventory(TestCaseWithTransport):
172
172
    
173
173
    def get_chk_bytes(self):
174
 
        # The eassiest way to get a CHK store is a development3 repository and
 
174
        # The eassiest way to get a CHK store is a development5 repository and
175
175
        # then work with the chk_bytes attribute directly.
176
 
        repo = self.make_repository(".", format="development3")
 
176
        repo = self.make_repository(".", format="development5")
177
177
        repo.lock_write()
178
178
        self.addCleanup(repo.unlock)
179
179
        repo.start_write_group()
221
221
            'chkinventory:\n',
222
222
            'revision_id: foo\n',
223
223
            'root_id: TREE_ROOT\n',
224
 
            'id_to_entry: sha1:c9d15ff2621b8774506f702ff4ffd5f4af885a51\n',
 
224
            'id_to_entry: sha1:debfe920f1f10e7929260f0534ac9a24d7aabbb4\n',
225
225
            ], lines)
226
226
        chk_inv = CHKInventory.deserialise(chk_bytes, ''.join(lines), ('foo',))
227
227
        self.assertEqual('plain', chk_inv._search_key_name)
238
238
            'chkinventory:\n',
239
239
            'revision_id: foo\n',
240
240
            'root_id: TREE_ROOT\n',
241
 
            'parent_id_basename_to_file_id: sha1:46f33678d1c8cfd9b6d00dc658b6c8a9ac7bb0f0\n',
242
 
            'id_to_entry: sha1:c9d15ff2621b8774506f702ff4ffd5f4af885a51\n',
 
241
            'parent_id_basename_to_file_id: sha1:eb23f0ad4b07f48e88c76d4c94292be57fb2785f\n',
 
242
            'id_to_entry: sha1:debfe920f1f10e7929260f0534ac9a24d7aabbb4\n',
243
243
            ], lines)
244
244
        chk_inv = CHKInventory.deserialise(chk_bytes, ''.join(lines), ('foo',))
245
245
        self.assertEqual('plain', chk_inv._search_key_name)
258
258
            'revision_id: foo\n',
259
259
            'root_id: TREE_ROOT\n',
260
260
            'search_key_name: hash-16-way\n',
261
 
            'parent_id_basename_to_file_id: sha1:46f33678d1c8cfd9b6d00dc658b6c8a9ac7bb0f0\n',
262
 
            'id_to_entry: sha1:c9d15ff2621b8774506f702ff4ffd5f4af885a51\n',
 
261
            'parent_id_basename_to_file_id: sha1:eb23f0ad4b07f48e88c76d4c94292be57fb2785f\n',
 
262
            'id_to_entry: sha1:debfe920f1f10e7929260f0534ac9a24d7aabbb4\n',
263
263
            ], lines)
264
264
        chk_inv = CHKInventory.deserialise(chk_bytes, ''.join(lines), ('foo',))
265
265
        self.assertEqual('hash-16-way', chk_inv._search_key_name)