Mercurial > hg
comparison tests/test-bundle2-multiple-changegroups.t @ 34101:5ede882c249c
changegroup: replace getchangegroup with makechangegroup
As part of reducing the number of changegroup creation APIs, let's replace
getchangegroup with calls to makechangegroup. This is mostly a drop in
replacement, but it does change the version specifier to be required, so it's
more obvious which callers are creating old version 1 changegroups still.
Differential Revision: https://phab.mercurial-scm.org/D669
author | Durham Goode <durham@fb.com> |
---|---|
date | Sun, 10 Sep 2017 18:50:12 -0700 |
parents | df3cf9422e1b |
children | eb586ed5d8ce |
comparison
equal
deleted
inserted
replaced
34100:1632999d4bed | 34101:5ede882c249c |
---|---|
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.makechangegroup(repo, outgoing, '01', |
17 > bundlecaps=bundlecaps) | 17 > source, bundlecaps=bundlecaps) |
18 > bundler.newpart('output', data='changegroup1') | 18 > bundler.newpart('output', data='changegroup1') |
19 > bundler.newpart('changegroup', data=cg.getchunks()) | 19 > bundler.newpart('changegroup', data=cg.getchunks()) |
20 > outgoing = discovery.outgoing(repo, common + intermediates, heads) | 20 > outgoing = discovery.outgoing(repo, common + intermediates, heads) |
21 > cg = changegroup.getchangegroup(repo, source, outgoing, | 21 > cg = changegroup.makechangegroup(repo, outgoing, '01', |
22 > bundlecaps=bundlecaps) | 22 > source, bundlecaps=bundlecaps) |
23 > bundler.newpart('output', data='changegroup2') | 23 > bundler.newpart('output', data='changegroup2') |
24 > bundler.newpart('changegroup', data=cg.getchunks()) | 24 > bundler.newpart('changegroup', data=cg.getchunks()) |
25 > | 25 > |
26 > def _pull(repo, *args, **kwargs): | 26 > def _pull(repo, *args, **kwargs): |
27 > pullop = _orig_pull(repo, *args, **kwargs) | 27 > pullop = _orig_pull(repo, *args, **kwargs) |