0 Kˆl–Ðz¾”JhŠm@‚àCp-©‹Fÿ�þE¤YÆBddr3üÿÅ „@Û?Ä_’uÐb &=LyZ¿Iœõ,CÈ_ÀÂ+-§ ^µcã)ãó.—dZddlmZmZmZdZd„Zd„ZdS)a'advertise pre-generated bundles to seed clones "clonebundles" is a server-side extension used to advertise the existence of pre-generated, externally hosted bundle files to clients that are cloning so that cloning can be faster, more reliable, and require less resources on the server. "pullbundles" is a related feature for sending pre-generated bundle files to clients as part of pull operations. Cloning can be a CPU and I/O intensive operation on servers. Traditionally, the server, in response to a client's request to clone, dynamically generates a bundle containing the entire repository content and sends it to the client. There is no caching on the server and the server will have to redundantly generate the same outgoing bundle in response to each clone request. For servers with large repositories or with high clone volume, the load from clones can make scaling the server challenging and costly. This extension provides server operators the ability to offload potentially expensive clone load to an external service. Pre-generated bundles also allow using more CPU intensive compression, reducing the effective bandwidth requirements. Here's how clone bundles work: 1. A server operator establishes a mechanism for making bundle files available on a hosting service where Mercurial clients can fetch them. 2. A manifest file listing available bundle URLs and some optional metadata is added to the Mercurial repository on the server. 3. A client initiates a clone against a clone bundles aware server. 4. The client sees the server is advertising clone bundles and fetches the manifest listing available bundles. 5. The client filters and sorts the available bundles based on what it supports and prefers. 6. The client downloads and applies an available bundle from the server-specified URL. 7. The client reconnects to the original server and performs the equivalent of :hg:`pull` to retrieve all repository data not in the bundle. (The repository could have been updated between when the bundle was created and when the client started the clone.) This may use "pullbundles". Instead of the server generating full repository bundles for every clone request, it generates full bundles once and they are subsequently reused to bootstrap new clones. The server may still transfer data at clone time. However, this is only data that has been added/changed since the bundle was created. For large, established repositories, this can reduce server load for clones to less than 1% of original. Here's how pullbundles work: 1. A manifest file listing available bundles and describing the revisions is added to the Mercurial repository on the server. 2. A new-enough client informs the server that it supports partial pulls and initiates a pull. 3. If the server has pull bundles enabled and sees the client advertising partial pulls, it checks for a matching pull bundle in the manifest. A bundle matches if the format is supported by the client, the client has the required revisions already and needs something from the bundle. 4. If there is at least one matching bundle, the server sends it to the client. 5. The client applies the bundle and notices that the server reply was incomplete. It initiates another pull. To work, this extension requires the following of server operators: * Generating bundle files of repository content (typically periodically, such as once per day). * Clone bundles: A file server that clients have network access to and that Python knows how to talk to through its normal URL handling facility (typically an HTTP/HTTPS server). * A process for keeping the bundles manifest in sync with available bundle files. Strictly speaking, using a static file hosting server isn't required: a server operator could use a dynamic service for retrieving bundle data. However, static file hosting services are simple