Mercurial > hg
diff mercurial/repoview.py @ 24618:cde57a8d8fe7
repoview: directly skip public head in _getstatichidden
Public heads have nothing to offer regarding hidden stuff, let's skip them.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 03 Apr 2015 14:36:05 -0700 |
parents | f76595f6ed7c |
children | ad6dea5d96f2 |
line wrap: on
line diff
--- 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