March 25, 2014 • ∞
Welcome HgLab 1.4. This release features an exciting new feature called “LAN Optimizations”
Previously, cloning an entire Mercurial repository (55 Mb, almost 21,000 changesets) took a bit over a minute (1:16, to be exact):
Now watch this:
Fifteen seconds. That’s almost 5x speed increase for initial clones. Impressive, isn’t it? What’s even better is that no configuration tweaking is required on the client side. HgLab itself enforces this behavior, with (compatible) Mercurial clients silently obeying.
Of course, nothing in the computing world comes for free, and this is no exception. When you are enabling LAN Optimizations, you’re trading speed for bandwidth. In corporate scenarios bandwidth is practically unlimited, so enabling LAN Optimizations for, well, LANs is a no-brainer. Additionally, it saves a bit of CPU cycles since HgLab doesn’t have to do all the complex computations involved in building a bundle.
For as long as I can remember (since 2006, actually, but that’s like 50 years Internet-time), Mercurial had an unfortunately named
--uncompressed switch for
hg clone http://email@example.com/hg/mercurial/hg --uncompressed
With this flag set, Mercurial client asks server to perform for a what is called a “streamed clone”, when server just takes all the revlogs from the repository, glues them all together and streams the entire thing back to the client. With LAN Optimizations enabled, HgLab effectively enforces this streaming behavior even when client doesn’t explicitly asks for it.
Streaming clones, however, are not available if you’re doing any of the fancy-pants cloning, like
hg clone --rev,
hg clone -–branch or
hg clone http://...#revision-or-branch-or-tag. This is by design, because when you’re cloning only a subset of history, there’s no reason to transfer the repository in its entirety, so Mercurial has to revert to a traditional cloning behavior.
Just check the checkbox. Go to Administration, then to Repositories and enable “LAN Optimizations”. No reboot, no restart. Changes are effective immediately:
This release also has a number of minor User Interface tweaks, and discovering them is left as an exercise to the reader.
HgLab is a behind-the-firewall self-hosted Mercurial server and source control management system which gives you:
Interested in HgLab and Mercurial? Want to know when new releases are out? Join the HgLab HQ Mailing List for to get notified when something interesting happens.