mergestate: implement unresolvedcount() in terms of unresolved()
This simplifies the method slightly. It does create a full list of
paths while doing so, but it's not a lot of data anyway (besides, I
would think references to strings are no larger than (references to?)
True).
--- a/mercurial/merge.py Tue Dec 01 09:26:10 2015 -0800
+++ b/mercurial/merge.py Tue Dec 01 09:26:33 2015 -0800
@@ -567,8 +567,7 @@
def unresolvedcount(self):
"""get unresolved count for this merge (persistent)"""
- return len([True for f, entry in self._state.iteritems()
- if entry[0] == 'u'])
+ return len(list(self.unresolved()))
def actions(self):
"""return lists of actions to perform on the dirstate"""