[PATCH 6 of 7 Series-C] clfilter: remove the last usage of `visibleheads`

pierre-yves.david at logilab.fr pierre-yves.david at logilab.fr
Mon Jan 7 12:16:09 CST 2013


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1357444102 -3600
# Node ID 6bae87dc0a2b5b7013700db66b63f8a0067112eb
# Parent  55fea9d375d89782ac3f8949b1275ee11f76d8b5
clfilter: remove the last usage of `visibleheads`

We can just inlines the filtering now that all server user now use changelog
filtering directly.

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -113,11 +113,11 @@ def findcommonoutgoing(repo, other, only
     mayexclude = (repo._phasecache.phaseroots[phases.secret] or repo.obsstore)
     if not mayexclude:
         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
         sets = repo.changelog.findcommonmissing(og.commonheads, onlyheads)
         og._common, allmissing = sets


More information about the Mercurial-devel mailing list