Mercurial (HG) 3.6 was released on 1st of November. It's a regularly scheduled feature release. Mercurial follows a 3-month release cycle, and this year there has been four releases; Feb 1st, May 1st, Aug 1st and now the fourth on Nov 1st. There have also been two minor versions released after each major version, meaning that a new version of Mercurial has been released each month. This blog post will cover the interesting parts from the original release notes.
Improving clone speeds with pre-generated bundles:
Mercurial 3.6 is much about improving the clone speeds. Gregory Szorc covered the cloning improvements in his blog post even before the official Mercurial 3.6 release. One new improvement introduced in Mercurial 3.6 as a core feature is the ability to seed clones from server-advertised pre-generated bundles. What this means in practice is that by using the clonebundles extension, Mercurial server doesn't need to create a bundle from the repository content for each clone done by clients. This will help to reduce server loads and improve the performance of clones in such servers where there are lots of large repositories and lots of users.
Unfortunately, the clonebundles extension is still in an experimental stage in Mercurial 3.6, which means that there can be still backwards incompatible changes coming in the following Mercurial versions. The extension also needs to be enabled explicitly to each repository. It's said in Gregory's blog that the extension is planned to be enabled by default as well as the experimental flag removed in Mercurial 3.7 however.
Another obstacle in taking the extension into use is that there's no automation or heuristics to creating the aforementioned bundles, meaning that storing and serving the bundles needs to be implemented separately by server administrators. At least Mozilla has implemented a solution for generating and serving static bundle files through CDN. You can read more from another blog post by Gregory Szorc.
In addition to clonebundles extension, there are other performance improvements in Mercurial 3.6 as well. Caching just-added entries makes writing changelogs 25% faster. File opens and closes are reduced making especially Windows clients faster. Avoiding excessive file flushing when adding revlog entries also reduces system call counts. The aforementioned performance improvements are mostly visible when doing clones or pulls.
Lots of bug fixes and smaller improvements were also incorporated to Mercurial 3.6 release as you might expect. You may read the full list over the official release notes.
There are lots of small enhancements and bug fixes as well as the performance improvements that make upgrading to Mercurial 3.6 a no-brainer decision. You may find the official packages from their site.
Deveo can be used to manage Mercurial repositories as well as Git and Subversion repositories. Hopefully in Mercurial 3.7 the experimental flag from clonebundles extension will be removed and it will be enabled by default. We can then consider implementing support for creating and managing the bundles automatically to Deveo to improve Mercurial clone performance.
If you have experiences from managing lots of large Mercurial repositories, we would like to hear your experiences either in the form of comments to this blog post or by contacting us directly. We would be excited to exchange ideas how to provide value to Mercurial users with the help of new tools.