D6240: branchcache: only iterate over branches which needs to be verified

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Apr 16 12:27:17 UTC 2019


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Otherwise we loop over all the branches and call _verifybranch() even if not
  required.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6240

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -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):



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list