diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -124,8 +124,7 @@ def findcommonoutgoing(repo, other, only missing.append(node) if excluded: # update missing heads - rset = repo.set('heads(%ln)', missing) - missingheads = [ctx.node() for ctx in rset] + missingheads = phases.newheads(repo, onlyheads, excluded) else: missingheads = onlyheads og.missingheads = missingheads