~trac-bzr-team/trac-bzr/trunk

« back to all changes in this revision

Viewing changes to tracbzr/backend.py

  • Committer: Richard Wilbur
  • Date: 2014-04-15 08:12:27 UTC
  • mfrom: (130.1.1 trac-bzr)
  • Revision ID: richard.wilbur@gmail.com-20140415081227-5s38vcgntvhiyzsm
Merge fix from James Teh for deprecated repository method get_ancestry.

Show diffs side-by-side

added added

removed removed

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