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

Proposed by Thomi Richards
Status: Merged
Approved by: Jelmer Vernooij
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) Approve
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.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks Thomi!

Revision history for this message
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
=== modified file 'cmds.py'
--- cmds.py 2011-11-24 16:04:11 +0000
+++ cmds.py 2012-07-19 22:26:19 +0000
@@ -19,6 +19,7 @@
19import sys19import sys
20import os20import os
21import bzrlib.bzrdir21import bzrlib.bzrdir
22from bzrlib import revision as _mod_revision
22from bzrlib.commands import Command23from bzrlib.commands import Command
23from bzrlib.errors import BzrCommandError24from bzrlib.errors import BzrCommandError
24from bzrlib.option import Option25from bzrlib.option import Option
@@ -145,7 +146,9 @@
145 repo = self._bzrbranch.repository146 repo = self._bzrbranch.repository
146 repo.lock_read()147 repo.lock_read()
147 try:148 try:
148 rev_sequence = repo.iter_reverse_revision_history(last_revid)149 graph = repo.get_graph()
150 rev_sequence = graph.iter_lefthand_ancestry(last_revid,
151 (_mod_revision.NULL_REVISION,))
149 high_revid = None152 high_revid = None
150 low_revid = None153 low_revid = None
151 between_revs = []154 between_revs = []
@@ -198,7 +201,7 @@
198 def _set_status(self, revid, status):201 def _set_status(self, revid, status):
199 """Set the bisect status for the given revid."""202 """Set the bisect status for the given revid."""
200 if not self.is_done():203 if not self.is_done():
201 if status != "done" and revid in [x[0] for x in self._items 204 if status != "done" and revid in [x[0] for x in self._items
202 if x[1] in ['yes', 'no']]:205 if x[1] in ['yes', 'no']]:
203 raise RuntimeError("attempting to add revid %s twice" % revid)206 raise RuntimeError("attempting to add revid %s twice" % revid)
204 self._items.append((revid, status))207 self._items.append((revid, status))

Subscribers

People subscribed via source and target branches

to all changes: