Show More
@@ -1393,7 +1393,7 b' def obsmarkersversion(caps):' | |||
|
1393 | 1393 | def writenewbundle(ui, repo, source, filename, bundletype, outgoing, opts, |
|
1394 | 1394 | vfs=None, compression=None, compopts=None): |
|
1395 | 1395 | if bundletype.startswith('HG10'): |
|
1396 |
cg = changegroup. |
|
|
1396 | cg = changegroup.makechangegroup(repo, outgoing, '01', source) | |
|
1397 | 1397 | return writebundle(ui, cg, filename, bundletype, vfs=vfs, |
|
1398 | 1398 | compression=compression, compopts=compopts) |
|
1399 | 1399 | elif not bundletype.startswith('HG20'): |
@@ -1421,8 +1421,7 b' def _addpartsfromopts(ui, repo, bundler,' | |||
|
1421 | 1421 | cgversion = opts.get('cg.version') |
|
1422 | 1422 | if cgversion is None: |
|
1423 | 1423 | cgversion = changegroup.safeversion(repo) |
|
1424 |
cg = changegroup. |
|
|
1425 | version=cgversion) | |
|
1424 | cg = changegroup.makechangegroup(repo, outgoing, cgversion, source) | |
|
1426 | 1425 | part = bundler.newpart('changegroup', data=cg.getchunks()) |
|
1427 | 1426 | part.addparam('version', cg.version) |
|
1428 | 1427 | if 'clcount' in cg.extras: |
@@ -939,17 +939,6 b' def getsubsetraw(repo, outgoing, bundler' | |||
|
939 | 939 | _changegroupinfo(repo, csets, source) |
|
940 | 940 | return bundler.generate(commonrevs, csets, fastpathlinkrev, source) |
|
941 | 941 | |
|
942 | def getchangegroup(repo, source, outgoing, bundlecaps=None, | |
|
943 | version='01'): | |
|
944 | """Like getbundle, but taking a discovery.outgoing as an argument. | |
|
945 | ||
|
946 | This is only implemented for local repos and reuses potentially | |
|
947 | precomputed sets in outgoing.""" | |
|
948 | if not outgoing.missing: | |
|
949 | return None | |
|
950 | return makechangegroup(repo, outgoing, version, source, | |
|
951 | bundlecaps=bundlecaps) | |
|
952 | ||
|
953 | 942 | def _addchangegroupfiles(repo, source, revmap, trp, expectedfiles, needfiles): |
|
954 | 943 | revisions = 0 |
|
955 | 944 | files = 0 |
@@ -965,8 +965,8 b' def _pushchangeset(pushop):' | |||
|
965 | 965 | cg = changegroup.makechangegroup(pushop.repo, outgoing, '01', 'push', |
|
966 | 966 | fastpath=True, bundlecaps=bundlecaps) |
|
967 | 967 | else: |
|
968 |
cg = changegroup. |
|
|
969 | bundlecaps=bundlecaps) | |
|
968 | cg = changegroup.makechangegroup(pushop.repo, outgoing, '01', | |
|
969 | 'push', bundlecaps=bundlecaps) | |
|
970 | 970 | |
|
971 | 971 | # apply changegroup to remote |
|
972 | 972 | # local repo finds heads on server, finds out what |
@@ -114,7 +114,8 b' Create an extension to test bundle2 API' | |||
|
114 | 114 | > headmissing = [c.node() for c in repo.set('heads(%ld)', revs)] |
|
115 | 115 | > headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)] |
|
116 | 116 | > outgoing = discovery.outgoing(repo, headcommon, headmissing) |
|
117 |
> cg = changegroup. |
|
|
117 | > cg = changegroup.makechangegroup(repo, outgoing, '01', | |
|
118 | > 'test:bundle2') | |
|
118 | 119 | > bundler.newpart('changegroup', data=cg.getchunks(), |
|
119 | 120 | > mandatory=False) |
|
120 | 121 | > |
@@ -13,13 +13,13 b' Create an extension to test bundle2 with' | |||
|
13 | 13 | > # in 'heads' as intermediate heads for the first changegroup. |
|
14 | 14 | > intermediates = [repo[r].p1().node() for r in heads] |
|
15 | 15 | > outgoing = discovery.outgoing(repo, common, intermediates) |
|
16 |
> cg = changegroup. |
|
|
17 | > bundlecaps=bundlecaps) | |
|
16 | > cg = changegroup.makechangegroup(repo, outgoing, '01', | |
|
17 | > source, bundlecaps=bundlecaps) | |
|
18 | 18 | > bundler.newpart('output', data='changegroup1') |
|
19 | 19 | > bundler.newpart('changegroup', data=cg.getchunks()) |
|
20 | 20 | > outgoing = discovery.outgoing(repo, common + intermediates, heads) |
|
21 |
> cg = changegroup. |
|
|
22 | > bundlecaps=bundlecaps) | |
|
21 | > cg = changegroup.makechangegroup(repo, outgoing, '01', | |
|
22 | > source, bundlecaps=bundlecaps) | |
|
23 | 23 | > bundler.newpart('output', data='changegroup2') |
|
24 | 24 | > bundler.newpart('changegroup', data=cg.getchunks()) |
|
25 | 25 | > |
@@ -64,7 +64,8 b' Create an extension to test bundle2 remo' | |||
|
64 | 64 | > common.extend(repo.lookup(r) for r in repo.revs(_common)) |
|
65 | 65 | > heads = [repo.lookup(r) for r in repo.revs(heads)] |
|
66 | 66 | > outgoing = discovery.outgoing(repo, common, heads) |
|
67 |
> cg = changegroup. |
|
|
67 | > cg = changegroup.makechangegroup(repo, outgoing, '01', | |
|
68 | > 'changegroup') | |
|
68 | 69 | > newpart('changegroup', cg.getchunks()) |
|
69 | 70 | > else: |
|
70 | 71 | > raise Exception('unknown verb') |
General Comments 0
You need to be logged in to leave comments.
Login now