Skip to content

clonebundles: add support for inline clonebundles (main focus: streaming clonebundles)

The idea behind inline clonebundles is to send them through the ssh or https connection to the Mercurial server. This is an RFC, we've had this enabled for about 3 weeks for part of our users so far.

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)

A few unknowns/questions right now:

  • (SOLVED by adapting url.open) I'm not sure how I can reuse the initial hg connection for the inline clonebundles, I need to investigate that further, but I didn't see an obvious way.
  • (SOLVED by moving the code into mercurial/) Ideally, this would only require enabling the clonebundles extension on the server-side, but right now I put the client-side changes in the extension as well. I'm not sure if I should tackle that at this early stage already.
  • (SOLVED by removing the need for readline) I added an iterbuffer in clonebundles.py, but extending chunkbuffer with a 'readline' function might be a more logical choice. Other suggestions are welcome of course.
Edited by Mathias De Mare

Merge request reports