Mercurial > public > mercurial-scm > hg
comparison mercurial/sshpeer.py @ 50663:60f9602b413e
clonebundles: add support for inline (streaming) clonebundles
The idea behind inline clonebundles is to send them through
the ssh or https connection to the Mercurial server.
We've been using this specifically for streaming clonebundles,
although it works for 'regular' clonebundles as well
(but is less relevant, since pullbundles exist).
We've had this enabled for around 9 months for a part
of our users.
A few benefits are:
- no need to secure an external system,
since everything goes through the same Mercurial server
- easier scaling (in our case: no risk of inconsistencies
between multiple mercurial-server mirrors and nginx clonebundles hosts)
Remaining topics/questions right now:
- The inline clonebundles don't work for https yet.
This is because httppeer doesn't seem to support sending client
capabilities.
I didn't focus on that as my main goal was to get this working
for ssh.
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Wed, 08 Mar 2023 14:23:43 +0100 |
parents | 45c7bada5200 |
children | b11421f3daf9 |
comparison
equal
deleted
inserted
replaced
50643:c814101560d9 | 50663:60f9602b413e |
---|---|
211 def _clientcapabilities(): | 211 def _clientcapabilities(): |
212 """Return list of capabilities of this client. | 212 """Return list of capabilities of this client. |
213 | 213 |
214 Returns a list of capabilities that are supported by this client. | 214 Returns a list of capabilities that are supported by this client. |
215 """ | 215 """ |
216 protoparams = {b'partial-pull'} | 216 protoparams = {b'partial-pull', b'inlineclonebundles'} |
217 comps = [ | 217 comps = [ |
218 e.wireprotosupport().name | 218 e.wireprotosupport().name |
219 for e in util.compengines.supportedwireengines(util.CLIENTROLE) | 219 for e in util.compengines.supportedwireengines(util.CLIENTROLE) |
220 ] | 220 ] |
221 protoparams.add(b'comp=%s' % b','.join(comps)) | 221 protoparams.add(b'comp=%s' % b','.join(comps)) |