repoview: rename '_getdynamicblockers' to 'revealedrevs' (API)
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 20 May 2017 19:43:58 +0200
changeset 32427 8db2feb04ceb
parent 32426 06aa645e2372
child 32428 28b773aa3ff2
repoview: rename '_getdynamicblockers' to 'revealedrevs' (API) Recent mailing list discussion made me realised we could clarify these. We make the function "public" to encourage extensions to wrap it and we use a more explicit name that mirror "hideablerevs".
hgext/rebase.py
mercurial/repoview.py
--- a/hgext/rebase.py	Sat May 20 19:43:29 2017 +0200
+++ b/hgext/rebase.py	Sat May 20 19:43:58 2017 +0200
@@ -1537,4 +1537,4 @@
     cmdutil.afterresolvedstates.append(
         ['rebasestate', _('hg rebase --continue')])
     # ensure rebased rev are not hidden
-    extensions.wrapfunction(repoview, '_getdynamicblockers', _rebasedvisible)
+    extensions.wrapfunction(repoview, 'revealedrevs', _rebasedvisible)
--- a/mercurial/repoview.py	Sat May 20 19:43:29 2017 +0200
+++ b/mercurial/repoview.py	Sat May 20 19:43:58 2017 +0200
@@ -32,7 +32,7 @@
     lead to crashes."""
     return obsolete.getrevs(repo, 'obsolete')
 
-def _getdynamicblockers(repo):
+def revealedrevs(repo):
     """Non-cacheable revisions blocking hidden changesets from being filtered.
 
     Get revisions that will block hidden changesets and are likely to change,
@@ -185,7 +185,7 @@
 
         # check if we have wd parents, bookmarks or tags pointing to hidden
         # changesets and remove those.
-        dynamic = hidden & _getdynamicblockers(repo)
+        dynamic = hidden & revealedrevs(repo)
         if dynamic:
             blocked = cl.ancestors(dynamic, inclusive=True)
             hidden = frozenset(r for r in hidden if r not in blocked)