changeset 20941:c79503f7adac

repoview: use _gethiddenblockers in computehidden No functionality has changed, since we've only extracted the code into its own function. Now extensions can wrap _gethiddenblockers to provide their own blocker without polluting bookmarks or local tags.
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 28 Mar 2014 12:51:05 -0500
parents b0822c23e80a
children 3737e653dcbe
files mercurial/repoview.py
diffstat 1 files changed, 1 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repoview.py	Thu Apr 03 20:07:42 2014 -0500
+++ b/mercurial/repoview.py	Fri Mar 28 12:51:05 2014 -0500
@@ -52,20 +52,7 @@
     hideable = hideablerevs(repo)
     if hideable:
         cl = repo.changelog
-        firsthideable = min(hideable)
-        revs = cl.revs(start=firsthideable)
-        tofilter = repo.revs(
-            '(%ld) and children(%ld)', list(revs), list(hideable))
-        blockers = [r for r in tofilter if r not in hideable]
-        for par in repo[None].parents():
-            blockers.append(par.rev())
-        for bm in repo._bookmarks.values():
-            blockers.append(repo[bm].rev())
-        tags = {}
-        tagsmod.readlocaltags(repo.ui, repo, tags, {})
-        if tags:
-            blockers.extend(repo[t[0]].rev() for t in tags.values())
-        blocked = cl.ancestors(blockers, inclusive=True)
+        blocked = cl.ancestors(_gethiddenblockers(repo), inclusive=True)
         return frozenset(r for r in hideable if r not in blocked)
     return frozenset()