486
486
self.assertTrue(repo._format.supports_external_lookups)
487
487
self.assertFalse(repo.supports_rich_root())
489
def test_clone_on_transport_upgrades_format_if_stacked_on_specified(self):
490
child_branch, new_child_transport = self.prepare_default_stacking(
491
child_format='pack-0.92')
492
new_child = child_branch.bzrdir.clone_on_transport(new_child_transport,
493
stacked_on=child_branch.bzrdir.root_transport.base)
494
self.assertEqual(child_branch.bzrdir.root_transport.base,
495
new_child.open_branch().get_stacked_on_url())
496
repo = new_child.open_repository()
497
self.assertTrue(repo._format.supports_external_lookups)
498
self.assertFalse(repo.supports_rich_root())
489
500
def test_sprout_upgrades_to_rich_root_format_if_needed(self):
490
501
child_branch, new_child_transport = self.prepare_default_stacking(
491
502
child_format='rich-root-pack')
494
return child_branch.bzrdir.sprout(new_child_transport.base,
496
except errors.IncompatibleRepositories:
497
raise AssertionError(
498
'Rich root format should be sprout-compatible')
499
self.expectFailure('Rich root format should be sprout-compatible',
503
new_child = child_branch.bzrdir.sprout(new_child_transport.base,
501
505
repo = new_child.open_repository()
502
506
self.assertTrue(repo._format.supports_external_lookups)
503
507
self.assertTrue(repo.supports_rich_root())