~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: John Arbash Meinel
  • Date: 2008-07-22 15:44:17 UTC
  • mto: (3697.7.4 1.7)
  • mto: This revision was merged to the branch mainline in revision 3748.
  • Revision ID: john@arbash-meinel.com-20080722154417-qoc7kmrv0i4orptm
Test that the lca_trees are passed down to the Merger object when appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
425
425
        if self.merge_type.supports_cherrypick:
426
426
            kwargs['cherrypick'] = (not self.base_is_ancestor or
427
427
                                    not self.base_is_other_ancestor)
 
428
        if self._is_criss_cross and getattr(self.merge_type,
 
429
                                            'supports_lca_trees', False):
 
430
            kwargs['lca_trees'] = self._lca_trees
428
431
        return self.merge_type(pb=self._pb,
429
432
                               change_reporter=self.change_reporter,
430
433
                               **kwargs)
479
482
    supports_cherrypick = True
480
483
    supports_reverse_cherrypick = True
481
484
    winner_idx = {"this": 2, "other": 1, "conflict": 1}
 
485
    supports_lca_trees = True
482
486
 
483
487
    def __init__(self, working_tree, this_tree, base_tree, other_tree, 
484
488
                 interesting_ids=None, reprocess=False, show_base=False,
485
489
                 pb=DummyProgress(), pp=None, change_reporter=None,
486
490
                 interesting_files=None, do_merge=True,
487
 
                 cherrypick=False):
 
491
                 cherrypick=False, lca_trees=None):
488
492
        """Initialize the merger object and perform the merge.
489
493
 
490
494
        :param working_tree: The working tree to apply the merge to
506
510
            be combined with interesting_ids.  If neither interesting_files nor
507
511
            interesting_ids is specified, all files may participate in the
508
512
            merge.
 
513
        :param lca_trees: Can be set to a dictionary of {revision_id:rev_tree}
 
514
            if the ancestry was found to include a criss-cross merge.
 
515
            Otherwise should be None.
509
516
        """
510
517
        object.__init__(self)
511
518
        if interesting_files is not None and interesting_ids is not None:
520
527
        self.cooked_conflicts = []
521
528
        self.reprocess = reprocess
522
529
        self.show_base = show_base
 
530
        self._lca_trees = lca_trees
523
531
        self.pb = pb
524
532
        self.pp = pp
525
533
        self.change_reporter = change_reporter