[PATCH 7 of 8] hidden: make _revealancestors() reveal ancestors exclusively
Martin von Zweigbergk
martinvonz at google.com
Sun May 28 02:15:35 EDT 2017
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1495951510 25200
# Sat May 27 23:05:10 2017 -0700
# Node ID 55c2e0b946ab4b00c8cb481b92881d4c9ccb0707
# Parent f8b3d943ff21a2b906f2806476a637aac93763c4
hidden: make _revealancestors() reveal ancestors exclusively
I think this seems more expected.
diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -52,11 +52,10 @@
- pfunc(r): a funtion returning parent of 'r',
- revs: iterable of revnum,
- (Ancestors are revealed inclusively, i.e. the elements in 'revs' are
- also revealed)
+ (Ancestors are revealed exclusively, i.e. the elements in 'revs' are
+ *not* revealed)
"""
stack = list(revs)
- hidden -= set(stack)
while stack:
for p in pfunc(stack.pop()):
if p != nullrev and p in hidden:
@@ -78,8 +77,7 @@
visible = set(mutable - hidden)
visible |= (hidden & anchorrevs(repo))
if visible:
- # don't modify possibly cached result of hideablerevs()
- hidden = hidden.copy()
+ hidden = hidden - visible
_revealancestors(hidden, pfunc, visible)
return frozenset(hidden)
More information about the Mercurial-devel
mailing list