[PATCH 24 of 27 clfilter V2] clfilter: remove the last usage of `visibleheads`

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Oct 8 21:38:15 UTC 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1349717819 -7200
# Node ID fe75772948f780687aab08859b6fd63dd84ba9d4
# Parent  78ee9291f0dda84c4cefb4236166d711be99a4df
clfilter: remove the last usage of `visibleheads`

We can just inline the filtering now.

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -114,7 +114,7 @@
         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
@@ -335,7 +335,3 @@
     # 6. Check for unsynced changes on involved branches.
     if unsynced:
         repo.ui.warn(_("note: unsynced remote changes!\n"))
-
-def visibleheads(repo):
-    """return the set of visible head of this repo"""
-    return repo.filtered('unserved').heads()



More information about the Mercurial-devel mailing list