changeset 28780:faff8c2b5ee3

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 02 Apr 2016 15:56:47 -0700
parents 0970ebec29b4
children c042b98a6ff8
files mercurial/repoview.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):