repoview: fix changelog.__contains__ method
This have been around for ten years, so we can safely that this method have few
callers. However I am about to add one.
--- a/mercurial/changelog.py Mon Jan 08 15:11:34 2024 +0100
+++ b/mercurial/changelog.py Sun Feb 25 23:05:33 2024 +0100
@@ -327,6 +327,9 @@
self._filteredrevs_hashcache = {}
self._copiesstorage = opener.options.get(b'copies-storage')
+ def __contains__(self, rev):
+ return (0 <= rev < len(self)) and rev not in self._filteredrevs
+
@property
def filteredrevs(self):
return self._filteredrevs