changeset 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
files mercurial/repoview.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repoview.py	Sat May 27 23:05:10 2017 -0700
+++ b/mercurial/repoview.py	Tue May 30 10:27:20 2017 -0700
@@ -71,14 +71,13 @@
 
     hidden = hideablerevs(repo)
     if hidden:
+        hidden = set(hidden - pinnedrevs(repo))
         pfunc = repo.changelog.parentrevs
         mutablephases = (phases.draft, phases.secret)
         mutable = repo._phasecache.getrevset(repo, mutablephases)
 
         visible = set(mutable - hidden)
-        visible |= (hidden & pinnedrevs(repo))
         if visible:
-            hidden = hidden - visible
             _revealancestors(pfunc, hidden, visible)
     return frozenset(hidden)