67
67
target = self.get_target()
68
68
inter = versionedfile.InterVersionedFile.get(source, target)
69
69
self.assertTrue(isinstance(inter, self.interversionedfile_class))
71
def test_join_versions_joins_ancestors_not_siblings(self):
72
# joining with a version list should bring in ancestors of the
73
# named versions but not siblings thereof.
74
target = self.get_target()
75
target.add_lines('base', [], [])
76
source = self.get_source()
77
source.add_lines('base', [], [])
78
source.add_lines('sibling', ['base'], [])
79
source.add_lines('ancestorleft', ['base'], [])
80
source.add_lines('ancestorright', ['base'], [])
81
source.add_lines('namedleft', ['ancestorleft'], [])
82
source.add_lines('namedright', ['ancestorright'], [])
83
target.join(source, version_ids=['namedleft', 'namedright'])
84
self.assertFalse(target.has_version('sibling'))
85
self.assertTrue(target.has_version('ancestorleft'))
86
self.assertTrue(target.has_version('ancestorright'))
87
self.assertTrue(target.has_version('namedleft'))
88
self.assertTrue(target.has_version('namedright'))
71
90
def test_join_add_parents(self):
72
91
"""Join inserting new parents into existing versions