299
300
combined_indices.difference([combined_index]),
300
301
combined_index._sibling_indices)
303
def test_pack_with_signatures(self):
304
format = self.get_format()
305
tree = self.make_branch_and_tree('.', format=format)
306
trans = tree.branch.repository.controldir.get_repository_transport(
308
revid1 = tree.commit('start')
309
revid2 = tree.commit('more work')
310
strategy = gpg.LoopbackGPGStrategy(None)
311
repo = tree.branch.repository
312
self.addCleanup(repo.lock_write().unlock)
313
repo.start_write_group()
314
repo.sign_revision(revid1, strategy)
315
repo.commit_write_group()
316
repo.start_write_group()
317
repo.sign_revision(revid2, strategy)
318
repo.commit_write_group()
319
tree.branch.repository.pack()
320
# there should be 1 pack:
321
index = self.index_class(trans, 'pack-names', None)
322
self.assertEqual(1, len(list(index.iter_all_entries())))
323
self.assertEqual(2, len(tree.branch.repository.all_revision_ids()))
302
325
def test_pack_after_two_commits_packs_everything(self):
303
326
format = self.get_format()
304
327
tree = self.make_branch_and_tree('.', format=format)