Mercurial > hg
diff mercurial/repoview.py @ 50772:1680ef94ad2b stable
repoview: fix the filter created by `extrafilter`
The `name` variable was updated in each interaction of the loop, making all new
filters inheriting from the same base (the last one iterated), leading to
terrible terrible misbehavior.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 12 Jul 2023 12:47:08 +0200 |
parents | d44e3c45f0e4 |
children | d718eddf01d9 |
line wrap: on
line diff
--- a/mercurial/repoview.py Wed Jul 12 12:46:58 2023 +0200 +++ b/mercurial/repoview.py Wed Jul 12 12:47:08 2023 +0200 @@ -209,16 +209,18 @@ subsettable = repoviewutil.subsettable if combine(b'base') not in filtertable: - for name in _basefiltername: + for base_name in _basefiltername: - def extrafilteredrevs(repo, *args, **kwargs): + def extrafilteredrevs(repo, *args, name=base_name, **kwargs): baserevs = filtertable[name](repo, *args, **kwargs) extrarevs = frozenset(repo.revs(frevs)) return baserevs | extrarevs - filtertable[combine(name)] = extrafilteredrevs - if name in subsettable: - subsettable[combine(name)] = combine(subsettable[name]) + filtertable[combine(base_name)] = extrafilteredrevs + if base_name in subsettable: + subsettable[combine(base_name)] = combine( + subsettable[base_name] + ) return fid