Merge lp:~thomir-deactivatedaccount/bzr-bisect/fix-for-quantal into lp:bzr-bisect

Proposed by Thomi Richards on 2012-07-19
Status: Merged
Approved by: Jelmer Vernooij on 2012-07-19
Approved revision: 84
Merged at revision: 84
Proposed branch: lp:~thomir-deactivatedaccount/bzr-bisect/fix-for-quantal
Merge into: lp:bzr-bisect
Diff against target: 31 lines (+5/-2)
1 file modified
cmds.py (+5/-2)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/bzr-bisect/fix-for-quantal
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) 2012-07-19 Approve on 2012-07-19
Review via email: mp+115847@code.launchpad.net

Commit message

Update to use 'graph.iter_lefthand_ancestry' instead of 'repo.iter_reverse_revision_history' making bzr-bisect compatible with bzr 2.6b2

Description of the change

lp:bzr-bisect still uses 'repo.iter_reverse_revision_history', which has been removed from bzrlib. This branch changes that code to use 'graph.iter_lefthand_ancestry' instead.

To post a comment you must log in.
Jelmer Vernooij (jelmer) :
review: Approve
Jelmer Vernooij (jelmer) wrote :

Thanks Thomi!

Jelmer Vernooij (jelmer) wrote :

Can you land this, or should I?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmds.py'
2--- cmds.py 2011-11-24 16:04:11 +0000
3+++ cmds.py 2012-07-19 22:26:19 +0000
4@@ -19,6 +19,7 @@
5 import sys
6 import os
7 import bzrlib.bzrdir
8+from bzrlib import revision as _mod_revision
9 from bzrlib.commands import Command
10 from bzrlib.errors import BzrCommandError
11 from bzrlib.option import Option
12@@ -145,7 +146,9 @@
13 repo = self._bzrbranch.repository
14 repo.lock_read()
15 try:
16- rev_sequence = repo.iter_reverse_revision_history(last_revid)
17+ graph = repo.get_graph()
18+ rev_sequence = graph.iter_lefthand_ancestry(last_revid,
19+ (_mod_revision.NULL_REVISION,))
20 high_revid = None
21 low_revid = None
22 between_revs = []
23@@ -198,7 +201,7 @@
24 def _set_status(self, revid, status):
25 """Set the bisect status for the given revid."""
26 if not self.is_done():
27- if status != "done" and revid in [x[0] for x in self._items
28+ if status != "done" and revid in [x[0] for x in self._items
29 if x[1] in ['yes', 'no']]:
30 raise RuntimeError("attempting to add revid %s twice" % revid)
31 self._items.append((revid, status))

Subscribers

People subscribed via source and target branches

to all changes: