# HG changeset patch # User Simon Whitaker # Date 1506872762 -3600 # Node ID 7d2f71b7bc31acf1290ad3211481c5c77345a1da # Parent b6692ba7d5b04d841071fb35eb28faf801e5bb95 dirstate: implement __len__ on dirstatemap (issue5695) Differential Revision: https://phab.mercurial-scm.org/D884 diff -r b6692ba7d5b0 -r 7d2f71b7bc31 mercurial/dirstate.py --- 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)