diff mercurial/bundle2.py @ 37167:6c7a6b04b274

bundlespec: move computing the bundle contentops in parsebundlespec We will introduce a new bundlespec for stream bundle which will influence the contentops. Differential Revision: https://phab.mercurial-scm.org/D1952
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Mar 2018 12:43:57 +0200
parents f0b6fbea00cf
children 6f467adf9f05
line wrap: on
line diff
--- a/mercurial/bundle2.py	Fri Mar 30 12:43:08 2018 +0200
+++ b/mercurial/bundle2.py	Fri Mar 30 12:43:57 2018 +0200
@@ -1596,8 +1596,11 @@
                                             outgoing.missingheads):
             part.addparam('targetphase', '%d' % phases.secret, mandatory=False)
 
-    addparttagsfnodescache(repo, bundler, outgoing)
-    addpartrevbranchcache(repo, bundler, outgoing)
+    if opts.get('tagsfnodescache', True):
+        addparttagsfnodescache(repo, bundler, outgoing)
+
+    if opts.get('revbranchcache', True):
+        addpartrevbranchcache(repo, bundler, outgoing)
 
     if opts.get('obsolescence', False):
         obsmarkers = repo.obsstore.relevantmarkers(outgoing.missing)