Show More
@@ -2859,7 +2859,7 b' def inline_clone_bundle_open(ui, url, pe' | |||||
2859 | if not peer: |
|
2859 | if not peer: | |
2860 | raise error.Abort(_(b'no remote repository supplied for %s' % url)) |
|
2860 | raise error.Abort(_(b'no remote repository supplied for %s' % url)) | |
2861 | clonebundleid = url[len(bundlecaches.CLONEBUNDLESCHEME) :] |
|
2861 | clonebundleid = url[len(bundlecaches.CLONEBUNDLESCHEME) :] | |
2862 |
peerclonebundle = peer.get_ |
|
2862 | peerclonebundle = peer.get_cached_bundle_inline(clonebundleid) | |
2863 | return util.chunkbuffer(peerclonebundle) |
|
2863 | return util.chunkbuffer(peerclonebundle) | |
2864 |
|
2864 | |||
2865 |
|
2865 |
@@ -176,8 +176,8 b' class ipeercommands(interfaceutil.Interf' | |||||
176 | Returns a set of string capabilities. |
|
176 | Returns a set of string capabilities. | |
177 | """ |
|
177 | """ | |
178 |
|
178 | |||
179 |
def get_ |
|
179 | def get_cached_bundle_inline(path): | |
180 | """Retrieve clonebundle across the wire. |
|
180 | """Retrieve a clonebundle across the wire. | |
181 |
|
181 | |||
182 | Returns a chunkbuffer |
|
182 | Returns a chunkbuffer | |
183 | """ |
|
183 | """ |
@@ -348,7 +348,7 b' class localpeer(repository.peer):' | |||||
348 | def capabilities(self): |
|
348 | def capabilities(self): | |
349 | return self._caps |
|
349 | return self._caps | |
350 |
|
350 | |||
351 |
def get_ |
|
351 | def get_cached_bundle_inline(self, path): | |
352 | # not needed with local peer |
|
352 | # not needed with local peer | |
353 | raise NotImplementedError |
|
353 | raise NotImplementedError | |
354 |
|
354 |
@@ -344,8 +344,8 b' class wirepeer(repository.peer):' | |||||
344 | def _finish_inline_clone_bundle(self, stream): |
|
344 | def _finish_inline_clone_bundle(self, stream): | |
345 | pass # allow override for httppeer |
|
345 | pass # allow override for httppeer | |
346 |
|
346 | |||
347 |
def get_ |
|
347 | def get_cached_bundle_inline(self, path): | |
348 |
stream = self._callstream(b"get_ |
|
348 | stream = self._callstream(b"get_cached_bundle_inline", path=path) | |
349 | length = util.uvarintdecodestream(stream) |
|
349 | length = util.uvarintdecodestream(stream) | |
350 |
|
350 | |||
351 | # SSH streams will block if reading more than length |
|
351 | # SSH streams will block if reading more than length |
@@ -265,8 +265,8 b' def branches(repo, proto, nodes):' | |||||
265 | return wireprototypes.bytesresponse(b''.join(r)) |
|
265 | return wireprototypes.bytesresponse(b''.join(r)) | |
266 |
|
266 | |||
267 |
|
267 | |||
268 |
@wireprotocommand(b'get_ |
|
268 | @wireprotocommand(b'get_cached_bundle_inline', b'path', permission=b'pull') | |
269 |
def get_ |
|
269 | def get_cached_bundle_inline(repo, proto, path): | |
270 | """ |
|
270 | """ | |
271 | Server command to send a clonebundle to the client |
|
271 | Server command to send a clonebundle to the client | |
272 | """ |
|
272 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now