hidden: subtract pinned revs from hidden earlier
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 30 May 2017 10:27:20 -0700
changeset 32618 c37ca35b8450
parent 32617 2af0b9a02bf9
child 32619 e4d0b2efb8b5
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.
mercurial/repoview.py
--- 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)