# HG changeset patch # User Pierre-Yves David # Date 2024-03-11 00:20:12 # Node ID d54f0692820d649eb193d284412efe778e9ad17b # Parent 4188a0570ba17e96257eb84d6b556398f3c5c5a5 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. diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -397,6 +397,9 @@ class repoview: """ 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)