~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to graph.py

  • Committer: Aaron Bentley
  • Date: 2012-03-20 02:40:57 UTC
  • Revision ID: aaron@aaronbentley.com-20120320024057-mqltf93xxs09r0ry
Compatibility fixes for bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
        self.graph = self.branch.repository.get_graph(other_repo)
203
203
        revision_a = self.branch.last_revision()
204
204
        self.scan_graph(revision_a, revision_b)
205
 
        self.n_history = branch.revision_history()
 
205
        self.n_history = list(self.graph.iter_lefthand_ancestry(revision_a))
 
206
        self.n_history.reverse()
206
207
        self.n_revnos = branch.get_revision_id_to_revno_map()
207
208
        self.distances = node_distances(self.descendants, self.ancestors,
208
209
                                        self.root)
209
210
        if other_branch is not None:
210
211
            self.base = select_farthest(self.distances, self.common)
211
 
            self.m_history = other_branch.revision_history()
 
212
            self.m_history = self.graph.iter_lefthand_ancestry(revision_b)
 
213
            self.m_history = list(self.m_history)
 
214
            self.m_history.reverse()
212
215
            self.m_revnos = other_branch.get_revision_id_to_revno_map()
213
216
            self.new_base = self.graph.find_unique_lca(revision_a,
214
217
                                                       revision_b)