643
643
('unchanged', 'F\n')],
646
def test_plan_merge_2_tail_triple_ancestors(self):
647
# The graph looks like this:
648
# A B # 2 tails going back to NULL
650
# D E F # D, is unique to G, F to H
651
# |/|\| # E is the LCA for G & H, and the unique LCA for
653
# |\ /| # Q is just an extra node which is merged into both
656
# I J # criss-cross merge of G, H (and Q)
659
# This is meant to test after hitting a 3-way LCA, and multiple tail
660
# ancestors (only have NULL_REVISION in common)
662
self.add_rev('root', 'A', [], 'abc')
663
self.add_rev('root', 'B', [], 'def')
664
self.add_rev('root', 'D', ['A'], 'Dabc')
665
self.add_rev('root', 'E', ['A', 'B'], 'abcdef')
666
self.add_rev('root', 'F', ['B'], 'defF')
667
self.add_rev('root', 'G', ['D', 'E'], 'Dabcdef')
668
self.add_rev('root', 'H', ['F', 'E'], 'abcdefF')
669
self.add_rev('root', 'Q', ['E'], 'abcdef')
670
self.add_rev('root', 'I', ['G', 'Q', 'H'], 'DabcdefF')
671
# Merge G & H but supersede an old line in B
672
self.add_rev('root', 'J', ['H', 'Q', 'G'], 'DabcdJfF')
673
plan = self.plan_merge_vf.plan_merge('I', 'J')
675
('unchanged', 'D\n'),
676
('unchanged', 'a\n'),
677
('unchanged', 'b\n'),
678
('unchanged', 'c\n'),
679
('unchanged', 'd\n'),
682
('unchanged', 'f\n'),
683
('unchanged', 'F\n')],
646
686
def test_plan_merge_uncommitted_files(self):
647
687
self.setup_plan_merge_uncommitted()
648
688
plan = self.plan_merge_vf.plan_merge('B:', 'C:')