~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/interversionedfile_implementations/test_join.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
        self.assertEqual(w1.get_lines('v3'), ['hello\n', 'cruel\n', 'world\n'])
137
137
        self.assertEqual(['v2'], w1.get_parents('v3'))
138
138
 
 
139
    def test_join_source_has_less_parents_preserves_parents(self):
 
140
        # when the target has a text with more parent info, join 
 
141
        # preserves that.
 
142
        s = self.get_source()
 
143
        s.add_lines('base', [], [])
 
144
        s.add_lines('text', [], [])
 
145
        t = self.get_target()
 
146
        t.add_lines('base', [], [])
 
147
        t.add_lines('text', ['base'], [])
 
148
        t.join(s)
 
149
        self.assertEqual(['base'], t.get_parents('text'))
 
150
 
139
151
    def test_join_with_ghosts_merges_parents(self):
140
152
        """Join combined parent lists"""
141
153
        wa = self.build_weave1()