diff mercurial/commands.py @ 49466: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 b380583ad2f5
children 816236523765
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'.')]