Patchwork D6209: branchcache: don't verify closed nodes in iteropen()

login
register
mail settings
Submitter phabricator
Date April 5, 2019, 1:31 p.m.
Message ID <differential-rev-PHID-DREV-odthztriny4wqcmhruj5-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39506/
State Superseded
Headers show

Comments

phabricator - April 5, 2019, 1:31 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS




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

Patch

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):