Mercurial > hg
changeset 32593:e4d0b2efb8b5
hidden: remove unnecessary guard condition
The "if visible" guard is now pretty pointless, because the function
call it guards will do almost no work anyway when there are no visible
revisions.
We can also stop wrapping "visible" in a set since it just needs to be
an iterable now.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 30 May 2017 13:16:32 -0700 |
parents | c37ca35b8450 |
children | 517841766994 |
files | mercurial/repoview.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/repoview.py Tue May 30 10:27:20 2017 -0700 +++ b/mercurial/repoview.py Tue May 30 13:16:32 2017 -0700 @@ -76,9 +76,8 @@ mutablephases = (phases.draft, phases.secret) mutable = repo._phasecache.getrevset(repo, mutablephases) - visible = set(mutable - hidden) - if visible: - _revealancestors(pfunc, hidden, visible) + visible = mutable - hidden + _revealancestors(pfunc, hidden, visible) return frozenset(hidden) def computeunserved(repo):