[PATCH 8 of 8] hidden: clarfiy set operations a little
Martin von Zweigbergk
martinvonz at google.com
Sun May 28 02:15:36 EDT 2017
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1495951805 25200
# Sat May 27 23:10:05 2017 -0700
# Node ID 53691b5174a6c892d50de7e68479cc94be5eee2c
# Parent 55c2e0b946ab4b00c8cb481b92881d4c9ccb0707
hidden: clarfiy set operations a little
Just a small refactoring that I think makes it a little clearer what
effect the anchor revs have.
diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -74,10 +74,10 @@
mutablephases = (phases.draft, phases.secret)
mutable = repo._phasecache.getrevset(repo, mutablephases)
- visible = set(mutable - hidden)
- visible |= (hidden & anchorrevs(repo))
+ effectiveanchors = (hidden & anchorrevs(repo))
+ visible = set(mutable - hidden) | effectiveanchors
if visible:
- hidden = hidden - visible
+ hidden = hidden - effectiveanchors
_revealancestors(hidden, pfunc, visible)
return frozenset(hidden)
More information about the Mercurial-devel
mailing list