/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: John Arbash Meinel
  • Date: 2009-09-02 13:32:52 UTC
  • mfrom: (4634.6.14 2.0)
  • mto: (4634.6.15 2.0)
  • mto: This revision was merged to the branch mainline in revision 4667.
  • Revision ID: john@arbash-meinel.com-20090902133252-t2t94xtckoliv2th
Merge lp:bzr/2.0 to resolve NEWS issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
        self._is_criss_cross = None
107
107
        self._lca_trees = None
108
108
 
 
109
    def cache_trees_with_revision_ids(self, trees):
 
110
        """Cache any tree in trees if it has a revision_id."""
 
111
        for maybe_tree in trees:
 
112
            if maybe_tree is None:
 
113
                continue
 
114
            try:
 
115
                rev_id = maybe_tree.get_revision_id()
 
116
            except AttributeError:
 
117
                continue
 
118
            self._cached_trees[rev_id] = maybe_tree
 
119
 
109
120
    @property
110
121
    def revision_graph(self):
111
122
        if self._revision_graph is None:
1520
1531
    get_revision_id = getattr(base_tree, 'get_revision_id', None)
1521
1532
    if get_revision_id is None:
1522
1533
        get_revision_id = base_tree.last_revision
 
1534
    merger.cache_trees_with_revision_ids([other_tree, base_tree, this_tree])
1523
1535
    merger.set_base_revision(get_revision_id(), this_branch)
1524
1536
    return merger.do_merge()
1525
1537