changeset 49440:a0b57cabc245

bisect: bypass changectx when translating revs to nodes When resolving the revset given by the user into node hashes, use the changelog to perform the translation rather than the repo object. This avoids the overhead of constructing a changectx which is immediately discarded.
author Arun Kulshreshtha <akulshreshtha@janestreet.com>
date Tue, 23 Aug 2022 17:31:13 -0400
parents b07465adbcc8
children 3ef153aa1eed
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Aug 24 16:38:13 2022 +0100
+++ b/mercurial/commands.py	Tue Aug 23 17:31:13 2022 -0400
@@ -1035,7 +1035,7 @@
     state = hbisect.load_state(repo)
 
     if rev:
-        nodes = [repo[i].node() for i in logcmdutil.revrange(repo, rev)]
+        nodes = [repo.changelog.node(i) for i in logcmdutil.revrange(repo, rev)]
     else:
         nodes = [repo.lookup(b'.')]