repoview: add _gethiddenblockers method
This is a standalone function that will provide the ability for extensions to
wrap.
--- a/mercurial/repoview.py Thu Mar 27 20:14:55 2014 -0500
+++ b/mercurial/repoview.py Thu Apr 03 20:07:42 2014 -0500
@@ -19,6 +19,31 @@
This is a standalone function to help extensions to wrap it."""
return obsolete.getrevs(repo, 'obsolete')
+def _gethiddenblockers(repo):
+ """Get revisions that will block hidden changesets from being filtered
+
+ This is a standalone function to help extensions to wrap it."""
+ assert not repo.changelog.filteredrevs
+ hideable = hideablerevs(repo)
+ blockers = []
+ 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())
+ blockers.extend(repo[t].rev() for t in tags)
+ return blockers
+
def computehidden(repo):
"""compute the set of hidden revision to filter