Show More
@@ -661,7 +661,8 b' def _pullobsolete(pullop):' | |||||
661 | pullop.repo.invalidatevolatilesets() |
|
661 | pullop.repo.invalidatevolatilesets() | |
662 | return tr |
|
662 | return tr | |
663 |
|
663 | |||
664 |
def getbundle(repo, source, heads=None, common=None, bundlecaps=None |
|
664 | def getbundle(repo, source, heads=None, common=None, bundlecaps=None, | |
|
665 | **kwargs): | |||
665 | """return a full bundle (with potentially multiple kind of parts) |
|
666 | """return a full bundle (with potentially multiple kind of parts) | |
666 |
|
667 | |||
667 | Could be a bundle HG10 or a bundle HG2X depending on bundlecaps |
|
668 | Could be a bundle HG10 or a bundle HG2X depending on bundlecaps |
@@ -106,9 +106,9 b' class localpeer(peer.peerrepository):' | |||||
106 | return self._repo.known(nodes) |
|
106 | return self._repo.known(nodes) | |
107 |
|
107 | |||
108 | def getbundle(self, source, heads=None, common=None, bundlecaps=None, |
|
108 | def getbundle(self, source, heads=None, common=None, bundlecaps=None, | |
109 | format='HG10'): |
|
109 | format='HG10', **kwargs): | |
110 | cg = exchange.getbundle(self._repo, source, heads=heads, |
|
110 | cg = exchange.getbundle(self._repo, source, heads=heads, | |
111 | common=common, bundlecaps=bundlecaps) |
|
111 | common=common, bundlecaps=bundlecaps, **kwargs) | |
112 | if bundlecaps is not None and 'HG2X' in bundlecaps: |
|
112 | if bundlecaps is not None and 'HG2X' in bundlecaps: | |
113 | # When requesting a bundle2, getbundle returns a stream to make the |
|
113 | # When requesting a bundle2, getbundle returns a stream to make the | |
114 | # wire level function happier. We need to build a proper object |
|
114 | # wire level function happier. We need to build a proper object |
@@ -325,7 +325,8 b' class wirepeer(peer.peerrepository):' | |||||
325 | bases=bases, heads=heads) |
|
325 | bases=bases, heads=heads) | |
326 | return changegroupmod.unbundle10(f, 'UN') |
|
326 | return changegroupmod.unbundle10(f, 'UN') | |
327 |
|
327 | |||
328 |
def getbundle(self, source, heads=None, common=None, bundlecaps=None |
|
328 | def getbundle(self, source, heads=None, common=None, bundlecaps=None, | |
|
329 | **kwargs): | |||
329 | self.requirecap('getbundle', _('look up remote changes')) |
|
330 | self.requirecap('getbundle', _('look up remote changes')) | |
330 | opts = {} |
|
331 | opts = {} | |
331 | if heads is not None: |
|
332 | if heads is not None: | |
@@ -334,6 +335,7 b' class wirepeer(peer.peerrepository):' | |||||
334 | opts['common'] = encodelist(common) |
|
335 | opts['common'] = encodelist(common) | |
335 | if bundlecaps is not None: |
|
336 | if bundlecaps is not None: | |
336 | opts['bundlecaps'] = ','.join(bundlecaps) |
|
337 | opts['bundlecaps'] = ','.join(bundlecaps) | |
|
338 | opts.update(kwargs) | |||
337 | f = self._callcompressable("getbundle", **opts) |
|
339 | f = self._callcompressable("getbundle", **opts) | |
338 | if bundlecaps is not None and 'HG2X' in bundlecaps: |
|
340 | if bundlecaps is not None and 'HG2X' in bundlecaps: | |
339 | return bundle2.unbundle20(self.ui, f) |
|
341 | return bundle2.unbundle20(self.ui, f) |
General Comments 0
You need to be logged in to leave comments.
Login now