Merge lp:~richard-wilbur/trac-bzr/fix-2.6.0 into lp:trac-bzr

Proposed by Richard Wilbur
Status: Merged
Approved by: Richard Wilbur
Approved revision: 131
Merged at revision: 131
Proposed branch: lp:~richard-wilbur/trac-bzr/fix-2.6.0
Merge into: lp:trac-bzr
Diff against target: 33 lines (+4/-1)
2 files modified
NEWS (+1/-0)
tracbzr/backend.py (+3/-1)
To merge this branch: bzr merge lp:~richard-wilbur/trac-bzr/fix-2.6.0
Reviewer Review Type Date Requested Status
Richard Wilbur Approve
Review via email: mp+215819@code.launchpad.net

Description of the change

Use fix for deprecated method repo.get_ancestry from James Teh. lp:1165948

To post a comment you must log in.
Revision history for this message
Richard Wilbur (richard-wilbur) wrote :

Cherry-picked fix for repo.get_ancestry from James Teh's branch since everything else on that branch has been merged into trunk.
+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2014-04-05 04:52:28 +0000
+++ NEWS 2014-04-15 07:58:45 +0000
@@ -5,6 +5,7 @@
5unreleased5unreleased
6==========6==========
77
8- Further update for bzr 2.6 (`#1165948`_, thanks to James Teh)
8- Update for bzr 2.6 (as per bug `#739481`_). (`#1165948`_, thanks to treaves)9- Update for bzr 2.6 (as per bug `#739481`_). (`#1165948`_, thanks to treaves)
9- Renders bug URLs as links (`#512733`_, thanks to Oleg Frantsuzov)10- Renders bug URLs as links (`#512733`_, thanks to Oleg Frantsuzov)
10- Improve handling of non-ascii file names (`#675014`_)11- Improve handling of non-ascii file names (`#675014`_)
1112
=== modified file 'tracbzr/backend.py'
--- tracbzr/backend.py 2014-02-13 23:45:40 +0000
+++ tracbzr/backend.py 2014-04-15 07:58:45 +0000
@@ -87,6 +87,7 @@
87 osutils,87 osutils,
88 revision,88 revision,
89 transport,89 transport,
90 tsort,
90 urlutils,91 urlutils,
91)92)
92import bzrlib.api93import bzrlib.api
@@ -1485,7 +1486,8 @@
1485 """Lazily fill cache only when needed."""1486 """Lazily fill cache only when needed."""
1486 if self.revcache is None:1487 if self.revcache is None:
1487 revid = self.revisiontree.get_revision_id()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 ancestry.reverse()1491 ancestry.reverse()
1490 ancestry_idx = dict((r, n) for n, r in enumerate(ancestry))1492 ancestry_idx = dict((r, n) for n, r in enumerate(ancestry))
1491 self.revcache = {}1493 self.revcache = {}