# HG changeset patch # User Pulkit Goyal # Date 2019-04-16 12:01:33 # Node ID 75e8e16ca1075f402276c2a09586ff7e35e62273 # Parent d9dc0896e1d390a497886ac4b1900d2a99f67f72 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 diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -200,7 +200,8 @@ class branchcache(object): 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):