repoview: prevent `None` to be passed as the filtername
We let such instantiation slip in a previous commit, so we add an explicit check
to prevent it to happen in the future.
--- a/mercurial/repoview.py Thu Mar 07 11:04:34 2024 +0100
+++ b/mercurial/repoview.py Mon Mar 11 01:20:12 2024 +0100
@@ -397,6 +397,9 @@
"""
def __init__(self, repo, filtername, visibilityexceptions=None):
+ if filtername is None:
+ msg = "repoview should have a non-None filtername"
+ raise error.ProgrammingError(msg)
object.__setattr__(self, '_unfilteredrepo', repo)
object.__setattr__(self, 'filtername', filtername)
object.__setattr__(self, '_clcachekey', None)