--- 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)