diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -115,7 +115,7 @@ def findcommonoutgoing(repo, other, only og.missingheads = onlyheads or repo.heads() elif onlyheads is None: # use visible heads as it should be cached - og.missingheads = visibleheads(repo) + og.missingheads = repo.filtered("unserved").heads() og.excluded = [ctx.node() for ctx in repo.set('secret() or extinct()')] else: # compute common, missing and exclude secret stuff