# HG changeset patch # User Martin von Zweigbergk # Date 2017-05-28 06:05:10 # Node ID 2af0b9a02bf99a52e8f6ec8fd2dce1268bcce24a # Parent c777dac2b27ccda26134d8efeef7eef37bb80595 hidden: make _revealancestors() reveal ancestors exclusively I think this seems more expected. It also prepares for the next commit. diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -53,11 +53,10 @@ def _revealancestors(pfunc, hidden, revs - 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 @@ def computehidden(repo): 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)