changeset 32617:2af0b9a02bf9

hidden: make _revealancestors() reveal ancestors exclusively I think this seems more expected. It also prepares for the next commit.
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 27 May 2017 23:05:10 -0700
parents c777dac2b27c
children c37ca35b8450
files mercurial/repoview.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repoview.py	Sat May 27 22:55:19 2017 -0700
+++ b/mercurial/repoview.py	Sat May 27 23:05:10 2017 -0700
@@ -53,11 +53,10 @@
     - hidden: the (preliminary) hidden revisions, to be updated
     - revs: iterable of revnum,
 
-    (Ancestors are revealed inclusively, i.e. the elements in 'revs' are
-    also revealed)
+    (Ancestors are revealed exclusively, i.e. the elements in 'revs' are
+    *not* revealed)
     """
     stack = list(revs)
-    hidden -= set(stack)
     while stack:
         for p in pfunc(stack.pop()):
             if p != nullrev and p in hidden:
@@ -79,8 +78,7 @@
         visible = set(mutable - hidden)
         visible |= (hidden & pinnedrevs(repo))
         if visible:
-            # don't modify possibly cached result of hideablerevs()
-            hidden = hidden.copy()
+            hidden = hidden - visible
             _revealancestors(pfunc, hidden, visible)
     return frozenset(hidden)