From patchwork Fri Feb 2 09:31:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1954: bundle: add the possibility to bundle a stream v2 part From: phabricator X-Patchwork-Id: 27220 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 2 Feb 2018 09:31:01 +0000 lothiraldan updated this revision to Diff 5152. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1954?vs=5026&id=5152 REVISION DETAIL https://phab.mercurial-scm.org/D1954 AFFECTED FILES mercurial/bundle2.py CHANGE DETAILS To: lothiraldan, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -1601,6 +1601,16 @@ phasedata = phases.binaryencode(headsbyphase) bundler.newpart('phase-heads', data=phasedata) + if opts.get('streamv2', False): + # The generation of the stream part is currently in exchange but + # importing exchange create an import cycle. We could extract the + # generation of the stream part in bundle2 or another file. + from . import exchange + # The streamv2 part doesn't uses the source argument, we can refactor + # this once the bundle part generator has been extracted + source = None + exchange._getbundlestream2(bundler, repo, source, stream=True) + def addparttagsfnodescache(repo, bundler, outgoing): # we include the tags fnode cache for the bundle changeset # (as an optional parts)