# HG changeset patch # User Pierre-Yves David # Date 1428096965 25200 # Node ID cde57a8d8fe712942b71db02eb764e3c3f4bb3e3 # Parent f76595f6ed7c5147cbaf8ab823b5636d66476de3 repoview: directly skip public head in _getstatichidden Public heads have nothing to offer regarding hidden stuff, let's skip them. diff -r f76595f6ed7c -r cde57a8d8fe7 mercurial/repoview.py --- a/mercurial/repoview.py Fri Apr 03 14:35:53 2015 -0700 +++ b/mercurial/repoview.py Fri Apr 03 14:36:05 2015 -0700 @@ -38,7 +38,8 @@ if hidden: getphase = repo._phasecache.phase getparentrevs = repo.changelog.parentrevs - heap = [-r for r in repo.changelog.headrevs()] + # Skip heads which are public (guaranteed to not be hidden) + heap = [-r for r in repo.changelog.headrevs() if getphase(repo, r)] heapq.heapify(heap) heappop = heapq.heappop heappush = heapq.heappush