~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

MergeĀ inĀ upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
 
228
228
    def do_merge(self):
229
229
        kwargs = {'working_tree':self.this_tree, 'this_tree': self.this_tree, 
230
 
                  'other_tree': self.other_tree}
 
230
                  'other_tree': self.other_tree, 
 
231
                  'interesting_ids': self.interesting_ids}
231
232
        if self.merge_type.requires_base:
232
233
            kwargs['base_tree'] = self.base_tree
233
234
        if self.merge_type.supports_reprocess:
318
319
    history_based = False
319
320
 
320
321
    def __init__(self, working_tree, this_tree, base_tree, other_tree, 
321
 
                 reprocess=False, show_base=False, pb=DummyProgress()):
 
322
                 interesting_ids=None, reprocess=False, show_base=False,
 
323
                 pb=DummyProgress()):
322
324
        """Initialize the merger object and perform the merge."""
323
325
        object.__init__(self)
324
326
        self.this_tree = working_tree
330
332
        self.show_base = show_base
331
333
        self.pb = pb
332
334
 
333
 
        all_ids = set(base_tree)
334
 
        all_ids.update(other_tree)
 
335
        if interesting_ids is not None:
 
336
            all_ids = interesting_ids
 
337
        else:
 
338
            all_ids = set(base_tree)
 
339
            all_ids.update(other_tree)
335
340
        self.tt = TreeTransform(working_tree, self.pb)
336
341
        try:
337
342
            for num, file_id in enumerate(all_ids):
708
713
    supports_show_base = False
709
714
 
710
715
    def __init__(self, working_tree, this_tree, base_tree, other_tree, 
711
 
                 pb=DummyProgress()):
 
716
                 interesting_ids=None, pb=DummyProgress()):
712
717
        self.this_revision_tree = self._get_revision_tree(this_tree)
713
718
        self.other_revision_tree = self._get_revision_tree(other_tree)
714
719
        super(WeaveMerger, self).__init__(working_tree, this_tree, 
715
 
                                          base_tree, other_tree, pb=pb)
 
720
                                          base_tree, other_tree, 
 
721
                                          interesting_ids=interesting_ids, 
 
722
                                          pb=pb)
716
723
 
717
724
    def _get_revision_tree(self, tree):
718
725
        """Return a revision tree releated to this tree.