# HG changeset patch
# User Pulkit Goyal <pulkit@yandex-team.ru>
# Date 1554468993 -10800
#      Fri Apr 05 15:56:33 2019 +0300
# Node ID 7c9d4cf23adfe26ac4987ed329fe94a8166e0f70
# Parent  6578654916ae640bd0e28b03e27eb8740c0bcc85
branchcache: don't verify closed nodes in iteropen()

We expect that the nodes passed to iteropen() will be verified. We are only
testing for membership in closed nodes set, so we don't need to verify the whole
closed nodes set.

This will speed up calculating branchheads() when there are lot of closed nodes
related to other branches.

Differential Revision: https://phab.mercurial-scm.org/D6209

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -319,7 +319,6 @@
         return self._branchtip(self[branch])[0]
 
     def iteropen(self, nodes):
-        self._verifyclosed()
         return (n for n in nodes if n not in self._closednodes)
 
     def branchheads(self, branch, closed=False):