From patchwork Sat Nov 25 04:30:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1497: hbisect: pass repo into hbisect.bisect From: phabricator X-Patchwork-Id: 25744 Message-Id: <18720b943e661cf03fbba182679d19e0@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sat, 25 Nov 2017 04:30:57 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGfd8b6b183073: hbisect: pass repo into hbisect.bisect (authored by dsp, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1497?vs=3803&id=3856 REVISION DETAIL https://phab.mercurial-scm.org/D1497 AFFECTED FILES mercurial/commands.py mercurial/hbisect.py CHANGE DETAILS To: dsp, #hg-reviewers, yuja Cc: mercurial-devel diff --git a/mercurial/hbisect.py b/mercurial/hbisect.py --- a/mercurial/hbisect.py +++ b/mercurial/hbisect.py @@ -21,7 +21,7 @@ error, ) -def bisect(changelog, state): +def bisect(repo, state): """find the next node (if any) for testing during a bisect search. returns a (nodes, number, good) tuple. @@ -32,6 +32,7 @@ if searching for a first bad one. """ + changelog = repo.changelog clparents = changelog.parentrevs skip = set([changelog.rev(n) for n in state['skip']]) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -854,7 +854,7 @@ ui.status(_('changeset %d:%s: %s\n') % (ctx, ctx, transition)) hbisect.checkstate(state) # bisect - nodes, changesets, bgood = hbisect.bisect(repo.changelog, state) + nodes, changesets, bgood = hbisect.bisect(repo, state) # update to next check node = nodes[0] mayupdate(repo, node, show_stats=False) @@ -867,7 +867,7 @@ hbisect.checkstate(state) # actually bisect - nodes, changesets, good = hbisect.bisect(repo.changelog, state) + nodes, changesets, good = hbisect.bisect(repo, state) if extend: if not changesets: extendnode = hbisect.extendrange(repo, state, nodes, good)