D6209: branchcache: don't verify closed nodes in iteropen()
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Fri Apr 5 13:31:55 UTC 2019
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
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):
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list