~jteh/trac-bzr/newDeps

« back to all changes in this revision

Viewing changes to tracbzr/backend.py

  • Committer: James Teh
  • Date: 2013-04-08 04:12:45 UTC
  • Revision ID: jamie@jantrid.net-20130408041245-6t0mduxru21o17zy
Ditto for Repository.get_ancestry().

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
    revision,
88
88
    transport,
89
89
    urlutils,
 
90
    tsort,
90
91
)
91
92
import bzrlib.api
92
93
from bzrlib.revision import (
1487
1488
        """Lazily fill cache only when needed."""
1488
1489
        if self.revcache is None:
1489
1490
            revid = self.revisiontree.get_revision_id()
1490
 
            ancestry = self.branch.repository.get_ancestry(revid)
 
1491
            ancestry = tsort.topo_sort(
 
1492
                dict(self.branch.repository.get_graph().iter_ancestry([revid])))
1491
1493
            ancestry.reverse()
1492
1494
            ancestry_idx = dict((r, n) for n, r in enumerate(ancestry))
1493
1495
            self.revcache = {}