Show More
@@ -940,17 +940,6 b' def getsubsetraw(repo, outgoing, bundler' | |||||
940 | _changegroupinfo(repo, csets, source) |
|
940 | _changegroupinfo(repo, csets, source) | |
941 | return bundler.generate(commonrevs, csets, fastpathlinkrev, source) |
|
941 | return bundler.generate(commonrevs, csets, fastpathlinkrev, source) | |
942 |
|
942 | |||
943 | def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None, |
|
|||
944 | version='01'): |
|
|||
945 | """Like getbundle, but taking a discovery.outgoing as an argument. |
|
|||
946 |
|
||||
947 | This is only implemented for local repos and reuses potentially |
|
|||
948 | precomputed sets in outgoing. Returns a raw changegroup generator.""" |
|
|||
949 | if not outgoing.missing: |
|
|||
950 | return None |
|
|||
951 | bundler = getbundler(version, repo, bundlecaps) |
|
|||
952 | return getsubsetraw(repo, outgoing, bundler, source) |
|
|||
953 |
|
||||
954 | def getchangegroup(repo, source, outgoing, bundlecaps=None, |
|
943 | def getchangegroup(repo, source, outgoing, bundlecaps=None, | |
955 | version='01'): |
|
944 | version='01'): | |
956 | """Like getbundle, but taking a discovery.outgoing as an argument. |
|
945 | """Like getbundle, but taking a discovery.outgoing as an argument. |
@@ -755,10 +755,9 b' def _pushb2ctx(pushop, bundler):' | |||||
755 | if not cgversions: |
|
755 | if not cgversions: | |
756 | raise ValueError(_('no common changegroup version')) |
|
756 | raise ValueError(_('no common changegroup version')) | |
757 | version = max(cgversions) |
|
757 | version = max(cgversions) | |
758 |
cg = changegroup. |
|
758 | cgstream = changegroup.makestream(pushop.repo, pushop.outgoing, version, | |
759 |
|
|
759 | 'push') | |
760 | version=version) |
|
760 | cgpart = bundler.newpart('changegroup', data=cgstream) | |
761 | cgpart = bundler.newpart('changegroup', data=cg) |
|
|||
762 | if cgversions: |
|
761 | if cgversions: | |
763 | cgpart.addparam('version', version) |
|
762 | cgpart.addparam('version', version) | |
764 | if 'treemanifest' in pushop.repo.requirements: |
|
763 | if 'treemanifest' in pushop.repo.requirements: | |
@@ -1621,7 +1620,7 b' def getbundlechunks(repo, source, heads=' | |||||
1621 | def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, |
|
1620 | def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, | |
1622 | b2caps=None, heads=None, common=None, **kwargs): |
|
1621 | b2caps=None, heads=None, common=None, **kwargs): | |
1623 | """add a changegroup part to the requested bundle""" |
|
1622 | """add a changegroup part to the requested bundle""" | |
1624 | cg = None |
|
1623 | cgstream = None | |
1625 | if kwargs.get('cg', True): |
|
1624 | if kwargs.get('cg', True): | |
1626 | # build changegroup bundle here. |
|
1625 | # build changegroup bundle here. | |
1627 | version = '01' |
|
1626 | version = '01' | |
@@ -1633,12 +1632,11 b' def _getbundlechangegrouppart(bundler, r' | |||||
1633 | raise ValueError(_('no common changegroup version')) |
|
1632 | raise ValueError(_('no common changegroup version')) | |
1634 | version = max(cgversions) |
|
1633 | version = max(cgversions) | |
1635 | outgoing = _computeoutgoing(repo, heads, common) |
|
1634 | outgoing = _computeoutgoing(repo, heads, common) | |
1636 |
cg = changegroup. |
|
1635 | cgstream = changegroup.makestream(repo, outgoing, version, source, | |
1637 |
|
|
1636 | bundlecaps=bundlecaps) | |
1638 | version=version) |
|
|||
1639 |
|
1637 | |||
1640 | if cg: |
|
1638 | if cgstream: | |
1641 | part = bundler.newpart('changegroup', data=cg) |
|
1639 | part = bundler.newpart('changegroup', data=cgstream) | |
1642 | if cgversions: |
|
1640 | if cgversions: | |
1643 | part.addparam('version', version) |
|
1641 | part.addparam('version', version) | |
1644 | part.addparam('nbchanges', str(len(outgoing.missing)), mandatory=False) |
|
1642 | part.addparam('nbchanges', str(len(outgoing.missing)), mandatory=False) |
General Comments 0
You need to be logged in to leave comments.
Login now