~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

merge fix for bug #177643

Show diffs side-by-side

added added

removed removed

Lines of Context:
291
291
        """
292
292
        raise NotImplementedError(self.annotate_iter)
293
293
 
294
 
    def plan_file_merge(self, file_id, other):
 
294
    def plan_file_merge(self, file_id, other, base=None):
295
295
        """Generate a merge plan based on annotations.
296
296
 
297
297
        If the file contains uncommitted changes in this tree, they will be
303
303
        vf = versionedfile._PlanMergeVersionedFile(file_id)
304
304
        last_revision_a = self._get_file_revision(file_id, vf, 'this:')
305
305
        last_revision_b = other._get_file_revision(file_id, vf, 'other:')
306
 
        return vf.plan_merge(last_revision_a, last_revision_b)
 
306
        if base is None:
 
307
            last_revision_base = None
 
308
        else:
 
309
            last_revision_base = base._get_file_revision(file_id, vf, 'base:')
 
310
        return vf.plan_merge(last_revision_a, last_revision_b,
 
311
                             last_revision_base)
307
312
 
308
313
    def _get_file_revision(self, file_id, vf, tree_revision):
309
314
        def file_revision(revision_tree):