changeset 42133:75e8e16ca107

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
author Pulkit Goyal <pulkit@yandex-team.ru>
date Tue, 16 Apr 2019 15:01:33 +0300
parents d9dc0896e1d3
children f0203c3406e7
files mercurial/branchmap.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):