D1954: bundle: add the possibility to bundle a stream v2 part
lothiraldan (Boris Feld)
phabricator at mercurial-scm.org
Fri Feb 2 09:31:01 UTC 2018
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
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)
To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list