hideablerevs: expand docstring to warn about possible traps
authorPierre-Yves David <pierre-yves.david@fb.com>
Sat, 02 Apr 2016 15:56:47 -0700
changeset 28780 faff8c2b5ee3
parent 28779 0970ebec29b4
child 28781 c042b98a6ff8
hideablerevs: expand docstring to warn about possible traps Sean Farley just wasted multiple hours trying to figure out why his code was crashing. We update the docstring to make the constraint clearer.
mercurial/repoview.py
--- a/mercurial/repoview.py	Sun Apr 03 19:47:29 2016 +0900
+++ b/mercurial/repoview.py	Sat Apr 02 15:56:47 2016 -0700
@@ -22,9 +22,14 @@
 )
 
 def hideablerevs(repo):
-    """Revisions candidates to be hidden
+    """Revision candidates to be hidden
+
+    This is a standalone function to allow extensions to wrap it.
 
-    This is a standalone function to help extensions to wrap it."""
+    Because we use the set of immutable changesets as a fallback subset in
+    branchmap (see mercurial.branchmap.subsettable), you cannot set "public"
+    changesets as "hideable". Doing so would break multiple code assertions and
+    lead to crashes."""
     return obsolete.getrevs(repo, 'obsolete')
 
 def _getstatichidden(repo):