branchcache: only iterate over branches which needs to be verified
Otherwise we loop over all the branches and call _verifybranch() even if not
required.
Differential Revision: https://phab.mercurial-scm.org/D6240
--- a/mercurial/branchmap.py Tue Apr 16 14:48:48 2019 +0300
+++ b/mercurial/branchmap.py Tue Apr 16 15:01:33 2019 +0300
@@ -200,7 +200,8 @@
def _verifyall(self):
""" verifies nodes of all the branches """
- for b in self._entries:
+ needverification = set(self._entries.keys()) - self._verifiedbranches
+ for b in needverification:
self._verifybranch(b)
def __iter__(self):