mercurial/discovery.py
changeset 51580 b70628a9aa7e
parent 51402 2e10ddbb9faa
child 51594 e3a5ec2d236a
--- a/mercurial/discovery.py	Mon Apr 08 15:11:49 2024 +0200
+++ b/mercurial/discovery.py	Fri Apr 05 11:33:47 2024 +0200
@@ -190,7 +190,12 @@
         if len(missing) == len(allmissing):
             ancestorsof = onlyheads
         else:  # update missing heads
-            ancestorsof = phases.newheads(repo, onlyheads, excluded)
+            to_rev = repo.changelog.index.rev
+            to_node = repo.changelog.node
+            excluded_revs = [to_rev(r) for r in excluded]
+            onlyheads_revs = [to_rev(r) for r in onlyheads]
+            new_heads = phases.new_heads(repo, onlyheads_revs, excluded_revs)
+            ancestorsof = [to_node(r) for r in new_heads]
         og.ancestorsof = ancestorsof
     if portable:
         # recompute common and ancestorsof as if -r<rev> had been given for