~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

Merge now warns when it encounters a criss-cross

Show diffs side-by-side

added added

removed removed

Lines of Context:
315
315
        if NULL_REVISION in revisions:
316
316
            self.base_rev_id = NULL_REVISION
317
317
        else:
318
 
            self.base_rev_id = graph.find_unique_lca(*revisions)
 
318
            self.base_rev_id, steps = graph.find_unique_lca(revisions[0],
 
319
                revisions[1], count_steps=True)
319
320
            if self.base_rev_id == NULL_REVISION:
320
321
                raise UnrelatedBranches()
 
322
            if steps > 1:
 
323
                warning('Warning: criss-cross merge encountered.')
321
324
        self.base_tree = self.revision_tree(self.base_rev_id)
322
325
        self.base_is_ancestor = True
323
326
        self.base_is_other_ancestor = True