diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
index 224a058f7cd10e0f17a7b31f3c2a63f9dfece5bd_bWVyY3VyaWFsL29ic29sZXRlLnB5..f3c8db3d6d66550b050e02b592c84e3705b9f899_bWVyY3VyaWFsL29ic29sZXRlLnB5 100644
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -247,6 +247,9 @@
     def __iter__(self):
         return iter(self._all)
 
+    def __len__(self):
+        return len(self._all)
+
     def __nonzero__(self):
         return bool(self._all)