obsstore: add a __len__ method
We can already use "for mark in store:" it make sense to allow
"len(store)" too.
--- a/mercurial/obsolete.py Tue Feb 25 10:21:54 2014 -0800
+++ b/mercurial/obsolete.py Tue Feb 25 10:32:54 2014 -0800
@@ -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)