# HG changeset patch # User Pierre-Yves David # Date 1710116412 -3600 # 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 -r 4188a0570ba1 -r d54f0692820d mercurial/repoview.py --- 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)