comparison mercurial/repoview.py @ 32618:c37ca35b8450

hidden: subtract pinned revs from hidden earlier The pinned revs are simply revisions that should not be hidden even if hideablerevs() says that should. Let's make that clear by simply setting "hidden = hideablerevs() - pinnedrevs()" early on.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 30 May 2017 10:27:20 -0700
parents 2af0b9a02bf9
children e4d0b2efb8b5
comparison
equal deleted inserted replaced
32617:2af0b9a02bf9 32618:c37ca35b8450
69 During most operation hidden should be filtered.""" 69 During most operation hidden should be filtered."""
70 assert not repo.changelog.filteredrevs 70 assert not repo.changelog.filteredrevs
71 71
72 hidden = hideablerevs(repo) 72 hidden = hideablerevs(repo)
73 if hidden: 73 if hidden:
74 hidden = set(hidden - pinnedrevs(repo))
74 pfunc = repo.changelog.parentrevs 75 pfunc = repo.changelog.parentrevs
75 mutablephases = (phases.draft, phases.secret) 76 mutablephases = (phases.draft, phases.secret)
76 mutable = repo._phasecache.getrevset(repo, mutablephases) 77 mutable = repo._phasecache.getrevset(repo, mutablephases)
77 78
78 visible = set(mutable - hidden) 79 visible = set(mutable - hidden)
79 visible |= (hidden & pinnedrevs(repo))
80 if visible: 80 if visible:
81 hidden = hidden - visible
82 _revealancestors(pfunc, hidden, visible) 81 _revealancestors(pfunc, hidden, visible)
83 return frozenset(hidden) 82 return frozenset(hidden)
84 83
85 def computeunserved(repo): 84 def computeunserved(repo):
86 """compute the set of revision that should be filtered when used a server 85 """compute the set of revision that should be filtered when used a server