comparison mercurial/bundle2.py @ 51642:f28c52a9f7b4

exchange: improve computation of relevant markers for large repos Find the candidates for nodes with relevant markers by going over all markers instead of iterating over all nodes. Most nodes will not have markers anyway. Further optimize the code by allowing revsets as well, which reduces the materialization cost.
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 11 Jun 2024 18:47:50 +0200
parents c4aab3661f25
children a0f1378b932e
comparison
equal deleted inserted replaced
51641:69c5f8d6c710 51642:f28c52a9f7b4
1786 1786
1787 if opts.get(b'revbranchcache', True): 1787 if opts.get(b'revbranchcache', True):
1788 addpartrevbranchcache(repo, bundler, outgoing) 1788 addpartrevbranchcache(repo, bundler, outgoing)
1789 1789
1790 if opts.get(b'obsolescence', False): 1790 if opts.get(b'obsolescence', False):
1791 obsmarkers = repo.obsstore.relevantmarkers(outgoing.missing) 1791 obsmarkers = repo.obsstore.relevantmarkers(nodes=outgoing.missing)
1792 buildobsmarkerspart( 1792 buildobsmarkerspart(
1793 bundler, 1793 bundler,
1794 obsmarkers, 1794 obsmarkers,
1795 mandatory=opts.get(b'obsolescence-mandatory', True), 1795 mandatory=opts.get(b'obsolescence-mandatory', True),
1796 ) 1796 )