hidden: make _revealancestors() reveal ancestors exclusively
I think this seems more expected. It also prepares for the next
commit.
--- 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)