195
195
# regardless of contents
196
196
self.assertFalse(t.has('lock/held/info'))
197
197
repo.lock_write()
198
self.assertTrue(t.has('lock/held/info'))
199
self.assertTrue(t.has('lock/held/info'))
201
# unlock so we don't get a warning about failing to do so
200
204
def test_uses_lockdir(self):
201
205
"""repo format 7 actually locks on lockdir"""
262
266
self.assertTrue(S_ISDIR(t.stat('knits').st_mode))
263
267
self.check_knits(t)
269
def assertHasKnit(self, t, knit_name):
270
"""Assert that knit_name exists on t."""
271
self.assertEqualDiff('# bzr knit index 7\n',
272
t.get(knit_name + '.kndx').read())
274
self.assertTrue(t.has(knit_name + '.knit'))
265
276
def check_knits(self, t):
266
277
"""check knit content for a repository."""
267
self.assertEqualDiff('# bzr knit index 7\n',
268
t.get('inventory.kndx').read())
270
self.assertTrue(t.has('inventory.knit'))
271
self.assertEqualDiff('# bzr knit index 7\n',
272
t.get('revisions.kndx').read())
274
self.assertTrue(t.has('revisions.knit'))
275
self.assertEqualDiff('# bzr knit index 7\n',
276
t.get('signatures.kndx').read())
278
self.assertTrue(t.has('signatures.knit'))
278
self.assertHasKnit(t, 'inventory')
279
self.assertHasKnit(t, 'revisions')
280
self.assertHasKnit(t, 'signatures')
280
282
def test_shared_disk_layout(self):
281
283
control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())