distinct values using '-value' notation. Higher index is preferenced.
all elements must be hashable."""
+ matched_removals = set()
new_list = {}
for sub_list in lists:
for token in sub_list:
+ token_key = token
if remember_source_file:
token, source_file = token
else:
try:
new_list.pop(token[1:])
except KeyError:
- if warn_for_unmatched_removal:
+ if warn_for_unmatched_removal and \
+ not (source_file and token_key in matched_removals):
writemsg(_("--- Unmatch removal atom in %s: %s\n") % (source_file, token),
noiselevel=-1)
+ else:
+ # Remember this match, in case this profile is
+ # inherited multiple times in this stack.
+ matched_removals.add(token_key)
else:
new_list[token] = source_file
else: