Mercurial > hg
comparison tests/test-bundle2-multiple-changegroups.t @ 32287:df3cf9422e1b
changegroup: add bundlecaps back
Commit 282b288aa20c333c removed the unused bundlecaps argument from the
changegroup code. While it is unused in core Mercurial, it was an important
feature for the remotefilelog extension because it allowed the exchange layer to
communicate to the changegroup packer that this was a shallow repo and that
filelogs should not be included. Without bundlecaps, there is currently no other
way to pass that information along without a more extensive refactor of
exchange, bundle, and changegroup code.
This patch backs out the original removal, and merges it with some recent
changes to changegroup apis.
author | Durham Goode <durham@fb.com> |
---|---|
date | Mon, 15 May 2017 09:35:27 -0700 |
parents | 282b288aa20c |
children | 5ede882c249c |
comparison
equal
deleted
inserted
replaced
32286:539cbe0f8fa3 | 32287:df3cf9422e1b |
---|---|
11 > # Create two changegroups given the common changesets and heads for the | 11 > # Create two changegroups given the common changesets and heads for the |
12 > # changegroup part we are being requested. Use the parent of each head | 12 > # changegroup part we are being requested. Use the parent of each head |
13 > # in 'heads' as intermediate heads for the first changegroup. | 13 > # in 'heads' as intermediate heads for the first changegroup. |
14 > intermediates = [repo[r].p1().node() for r in heads] | 14 > intermediates = [repo[r].p1().node() for r in heads] |
15 > outgoing = discovery.outgoing(repo, common, intermediates) | 15 > outgoing = discovery.outgoing(repo, common, intermediates) |
16 > cg = changegroup.getchangegroup(repo, source, outgoing) | 16 > cg = changegroup.getchangegroup(repo, source, outgoing, |
17 > bundlecaps=bundlecaps) | |
17 > bundler.newpart('output', data='changegroup1') | 18 > bundler.newpart('output', data='changegroup1') |
18 > bundler.newpart('changegroup', data=cg.getchunks()) | 19 > bundler.newpart('changegroup', data=cg.getchunks()) |
19 > outgoing = discovery.outgoing(repo, common + intermediates, heads) | 20 > outgoing = discovery.outgoing(repo, common + intermediates, heads) |
20 > cg = changegroup.getchangegroup(repo, source, outgoing) | 21 > cg = changegroup.getchangegroup(repo, source, outgoing, |
22 > bundlecaps=bundlecaps) | |
21 > bundler.newpart('output', data='changegroup2') | 23 > bundler.newpart('output', data='changegroup2') |
22 > bundler.newpart('changegroup', data=cg.getchunks()) | 24 > bundler.newpart('changegroup', data=cg.getchunks()) |
23 > | 25 > |
24 > def _pull(repo, *args, **kwargs): | 26 > def _pull(repo, *args, **kwargs): |
25 > pullop = _orig_pull(repo, *args, **kwargs) | 27 > pullop = _orig_pull(repo, *args, **kwargs) |