997
997
bundle.install_revisions(repo)
998
998
inv_text = repo.get_inventory_xml('rev2')
999
999
self.assertNotContainsRe(inv_text, 'format="5"')
1000
self.assertContainsRe(inv_text, 'format="7"')
1002
def test_across_models(self):
1003
tree = self.make_simple_tree('knit')
1004
tree.commit('hello', rev_id='rev1')
1005
tree.commit('hello', rev_id='rev2')
1006
bundle = read_bundle(self.create_bundle_text(None, 'rev2')[0])
1007
repo = self.make_repository('repo', format='dirstate-with-subtree')
1008
bundle.install_revisions(repo)
1009
inv = repo.get_inventory('rev2')
1010
self.assertEqual('rev2', inv.root.revision)
1011
root_vf = repo.weave_store.get_weave(inv.root.file_id,
1012
repo.get_transaction())
1013
self.assertEqual(root_vf.versions(), ['rev1', 'rev2'])
1015
def test_across_models_incompatible(self):
1016
tree = self.make_simple_tree('dirstate-with-subtree')
1017
tree.commit('hello', rev_id='rev1')
1018
tree.commit('hello', rev_id='rev2')
1020
bundle = read_bundle(self.create_bundle_text(None, 'rev1')[0])
1021
except errors.IncompatibleBundleFormat:
1022
raise TestSkipped("Format 0.8 doesn't work with knit3")
1023
repo = self.make_repository('repo', format='knit')
1024
bundle.install_revisions(repo)
1026
bundle = read_bundle(self.create_bundle_text(None, 'rev2')[0])
1027
self.assertRaises(errors.IncompatibleRevision,
1028
bundle.install_revisions, repo)
1002
1031
class V08BundleTester(BundleTester, TestCaseWithTransport):