branchcache: only iterate over branches which needs to be verified
authorPulkit Goyal <pulkit@yandex-team.ru>
Tue, 16 Apr 2019 15:01:33 +0300
changeset 42133 75e8e16ca107
parent 42132 d9dc0896e1d3
child 42134 f0203c3406e7
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
mercurial/branchmap.py
--- 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):