/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2007-12-08 01:00:58 UTC
  • mfrom: (3095 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3133.
  • Revision ID: aaron.bentley@utoronto.ca-20071208010058-1vuj9qn49qfu808e
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import warnings
22
22
 
23
23
from bzrlib import (
 
24
    debug,
24
25
    errors,
25
26
    osutils,
26
27
    patiencediff,
315
316
        if NULL_REVISION in revisions:
316
317
            self.base_rev_id = NULL_REVISION
317
318
        else:
318
 
            self.base_rev_id = graph.find_unique_lca(*revisions)
 
319
            self.base_rev_id, steps = graph.find_unique_lca(revisions[0],
 
320
                revisions[1], count_steps=True)
319
321
            if self.base_rev_id == NULL_REVISION:
320
322
                raise UnrelatedBranches()
 
323
            if steps > 1:
 
324
                warning('Warning: criss-cross merge encountered.  See bzr'
 
325
                        ' help criss-cross.')
321
326
        self.base_tree = self.revision_tree(self.base_rev_id)
322
327
        self.base_is_ancestor = True
323
328
        self.base_is_other_ancestor = True
991
996
        """
992
997
        plan = self.this_tree.plan_file_merge(file_id, self.other_tree,
993
998
                                              base=self.base_tree)
 
999
        if 'merge' in debug.debug_flags:
 
1000
            plan = list(plan)
 
1001
            trans_id = self.tt.trans_id_file_id(file_id)
 
1002
            name = self.tt.final_name(trans_id) + '.plan'
 
1003
            contents = ('%10s|%s' % l for l in plan)
 
1004
            self.tt.new_file(name, self.tt.final_parent(trans_id), contents)
994
1005
        textmerge = PlanWeaveMerge(plan, '<<<<<<< TREE\n',
995
1006
            '>>>>>>> MERGE-SOURCE\n')
996
1007
        return textmerge.merge_lines(self.reprocess)