mercurial/changelog.py
branchstable
changeset 51648 6454c117c6a4
parent 51642 69c5f8d6c710
child 51729 278af66e6595
--- a/mercurial/changelog.py	Thu Jun 13 09:52:39 2024 +0200
+++ b/mercurial/changelog.py	Mon Jun 24 12:05:31 2024 +0200
@@ -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