~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2006-03-07 05:59:14 UTC
  • mfrom: (1558.1.20 Aaron's integration)
  • mto: This revision was merged to the branch mainline in revision 1595.
  • Revision ID: aaron.bentley@utoronto.ca-20060307055914-a88728997afceb90
MergeĀ fromĀ mainline

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):
721
726
    supports_show_base = False
722
727
 
723
728
    def __init__(self, working_tree, this_tree, base_tree, other_tree, 
724
 
                 pb=DummyProgress()):
 
729
                 interesting_ids=None, pb=DummyProgress()):
725
730
        self.this_revision_tree = self._get_revision_tree(this_tree)
726
731
        self.other_revision_tree = self._get_revision_tree(other_tree)
727
732
        super(WeaveMerger, self).__init__(working_tree, this_tree, 
728
 
                                          base_tree, other_tree, pb=pb)
 
733
                                          base_tree, other_tree, 
 
734
                                          interesting_ids=interesting_ids, 
 
735
                                          pb=pb)
729
736
 
730
737
    def _get_revision_tree(self, tree):
731
738
        """Return a revision tree releated to this tree.