changeset 34408:7d2f71b7bc31

dirstate: implement __len__ on dirstatemap (issue5695) Differential Revision: https://phab.mercurial-scm.org/D884
author Simon Whitaker <swhitaker@fb.com>
date Sun, 01 Oct 2017 16:46:02 +0100
parents b6692ba7d5b0
children 7de145167ae7
files mercurial/dirstate.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Sun Oct 01 12:54:35 2017 +0100
+++ b/mercurial/dirstate.py	Sun Oct 01 16:46:02 2017 +0100
@@ -1300,6 +1300,9 @@
     def iteritems(self):
         return self._map.iteritems()
 
+    def __len__(self):
+        return len(self._map)
+
     def __iter__(self):
         return iter(self._map)